version info:
vpp v16.09
DPDK 16.07.0
DPDK EAL init args: -c 1 -n 4 --huge-dir /run/vpp/hugepages --file-prefix vpp -b 0000:00:03.0 --master-lcore 0 --socket-mem 256
Test Case:
I have tested the SNAT plugin with following config:
set interface snat in GigabitEthernet0/4/0 out GigabitEthernet0/5/0
snat add address 1.1.1.0 - 1.1.1.31
After sending some packets, I ran "sh snat verbose" and I saw the reporting ports didn't match with actual ports.
I checked the code and saw in format_snat_key (u8 * s, va_list * args) function, clib_host_to_net_u16() is not used for solve machine specific feature (big/little endian)
s = format (s, "%U proto %s port %d fib %d",
format_ip4_address, &key->addr, protocol_string,
key->port, key->fib_index);