Hi,

I am using vpp version v25.10.0.

I am trying to do ipv4 forwarding between host-interface and dpdk bound vpp interface.

my set up config is :

cat /etc/vpp/startup.conf

unix {
  nodaemon
  log /var/log/vpp/vpp.log
  full-coredump
  cli-listen /var/run/vpp/cli.sock
  gid vpp

  startup-config /etc/vpp/cli.conf
  ## run vpp in the interactive mode
  # interactive

  ## do not use colors in terminal output
  # nocolor

  ## do not display banner
  # nobanner
}

api-trace {
## This stanza controls binary API tracing. Unless there is a very strong reason,
## please leave this feature enabled.
  on
}

api-segment {
  gid vpp
}

socksvr {
  default
}

cpu {
    ## In the VPP there is one main thread and optionally the user can create worker(s)     ## The main thread and worker thread(s) can be pinned to CPU core(s) manually or automatically

    ## Manual pinning of thread(s) to CPU core(s)

    ## Set logical CPU core where main thread runs, if main core is not set
    ## VPP will use core 1 if available
     main-core 0

    ## Set logical CPU core(s) where worker threads are running
    # corelist-workers 2-3,18-19
     corelist-workers 1


}


# dpdk {
    ## Change default settings for all interfaces
#     dev default {
        ## Number of receive queues, enables RSS
        ## Default is 1
        # num-rx-queues 3
         num-rx-queues 1

        ## Number of transmit queues, Default is equal
        ## to number of worker threads or 1 if no workers treads
        # num-tx-queues 3
         num-tx-queues 1

        ## Number of descriptors in transmit and receive rings
        ## increasing or reducing number can impact performance
        ## Default is 1024 for both rx and tx
         num-rx-desc 256
         num-tx-desc 256

       }
}


 plugins {
    ## Adjusting the plugin path depending on where the VPP plugins are
    #    path /ws/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins
    ## Add additional directory to the plugin path
    #    add-path /tmp/vpp_plugins

    ## Disable all plugins by default and then selectively enable specific plugins
     plugin default { disable }
#     plugin dpdk_plugin.so { disable }
     plugin dpdk_plugin.so { enable }
     plugin bpf_trace_filter_plugin.so { enable }
     plugin acl_plugin.so { enable }
#     plugin linux_cp_plugin.so { enable }
#     plugin linux_nl_plugin.so { enable }
     plugin dhcp_plugin.so { enable }
     plugin dns_plugin.so { enable }
     plugin nat_plugin.so { enable }
#     plugin vxlan_plugin.so { enable }
#     plugin vxlan-gpe_plugin.so { enable }
#     plugin wireguard_plugin.so { enable }
     plugin vhost_plugin.so { enable }
#     plugin map_plugin.so { enable }
#     plugin ikev2_plugin.so { enable }
     plugin arping_plugin.so { enable }
#     plugin gre_plugin.so { enable }
     plugin igmp_plugin.so { enable }
     plugin af_packet_plugin.so { enable }
     plugin af_xdp_plugin.so { enable }
     plugin ping_plugin.so { enable }
     plugin memif_plugin.so { enable }
#     plugin srmpls_plugin.so { enable }

    ## Enable all plugins by default and then selectively disable specific plugins
    # plugin dpdk_plugin.so { disable }
    # plugin acl_plugin.so { disable }
    plugin linux_cp_unittest_plugin.so { disable }
    plugin lisp_unittest_plugin.so { disable }
 }



 logging {
   ## set default logging level for logging buffer
   ## logging levels: emerg, alert,crit, error, warn, notice, info, debug, disabled
    default-log-level debug
   ## set default logging level for syslog or stderr output
    default-syslog-log-level debug
   ## Set per-class configuration
   # class dpdk/cryptodev { rate-limit 100 level debug syslog-level error }
 }

cat /etc/vpp/cli.conf
#lcp lcp-sync on
#lcp lcp-auto-subint on
#lcp policy sync

set interface ip address GigabitEthernet0/3/0 192.168.11.102/24
set interface state GigabitEthernet0/3/0 up
ip route add 0.0.0.0/0 via 192.168.11.1
ip route add 192.168.56.0/24 via 192.168.56.12
create host-interface name enp0s8
set interface mac address host-enp0s8 08:00:27:15:d5:8d
set interface state host-enp0s8 up
set interface ip address host-enp0s8 192.168.56.102/24

nat44 plugin enable
nat44 add interface address GigabitEthernet0/3/0
set interface nat44 in host-enp0s8 out GigabitEthernet0/3/0

Linux config:

root@debian-12-5:/home/sysadmin# /sbin/ifconfig
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a00:27ff:fe15:d58d  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:15:d5:8d  txqueuelen 1000  (Ethernet)
        RX packets 65770  bytes 6332850 (6.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1699  bytes 105152 (102.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.58.101  netmask 255.255.255.0  broadcast 192.168.58.255
        inet6 fe80::a00:27ff:fed6:72f2  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:d6:72:f2  txqueuelen 1000  (Ethernet)
        RX packets 9069  bytes 775547 (757.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5930  bytes 1069266 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

client1 machine 192.168.56.12:

client2 machine 192.168.11.9:


Test:

ping 192.168.56.102 works

ping 192.168.56.11.102 works without nat, fails with nat.

ping 192.168.11.9 fail.

Logs on vpp:

show nat44 sessions
NAT44 ED sessions:
-------- thread 0 vpp_main: 0 sessions --------
-------- thread 1 vpp_wk_0: 1 sessions --------
    i2o 192.168.56.12 proto ICMP port 1416 fib 0
    o2i 192.168.11.102 proto ICMP port 1416 fib 0
       external host 192.168.11.9:1416
       i2o flow: match: saddr 192.168.56.12 sport 1416 daddr 192.168.11.9 dport 1416 proto ICMP fib_idx 0 rewrite: saddr 192.168.11.102 daddr 192.168.11.9 icmp-id 1416 txfib 0        o2i flow: match: saddr 192.168.11.9 sport 1416 daddr 192.168.11.102 dport 1416 proto ICMP fib_idx 0 rewrite: saddr 192.168.11.9 daddr 192.168.56.12 icmp-id 1416 txfib 0
       index 0
       last heard 55691.72
       timeout in 59.19
       total pkts 7, total bytes 588
       dynamic translation

show error
   Count                  Node Reason               Severity
         1             ip4-glean                      ARP requests sent            info          5             ip4-local             ip4 spoofed local-address packet dr   error          1    GigabitEthernet0/3/0-output             interface is down            error      14845      nat44-ed-out2in-slowpath                no translation             error        806             igmp-input             IGMP not enabled on this interface   error     557441             dpdk-input                          no error                error      60509          af-packet-input                    timed out block             error      60509          af-packet-input                  total received block          error       2586             arp-reply                       ARP replies sent            info          1             arp-reply             IP4 destination address not local t   error          1             arp-reply             ARP request IP4 source address lear   info        107             ip4-glean                      ARP requests sent            info        415              ip4-arp                     ARP requests throttled         info        419              ip4-arp                       ARP requests sent            info       3094             ip4-input                  Multicast RPF check failed       error         11             ip4-local             ip4 spoofed local-address packet dr   error      50151           ip4-icmp-input                      unknown type              error      50208           ip4-icmp-input                   echo replies sent            info         54             llc-input                    unknown llc ssap/dsap          error         27           ethernet-input                        no error                error       8638      GigabitEthernet0/3/0-tx       Tx packet drops (dpdk tx failure)    error

trace add af-packet-input 50
vpp# show trace
------------------- Start of thread 0 vpp_main -------------------
No packets in trace buffer
------------------- Start of thread 1 vpp_wk_0 -------------------
Packet 1

15:28:42:505514: af-packet-input
  af_packet: hw_if_index 3 rx-queue 0 next-index 4
    block 119:
      address 0x7fad87b70000 version 2 seq_num 60600 pkt_num 0
    tpacket3_hdr:
      status 0x1 len 98 snaplen 98 mac 92 net 106
      sec 0x6ae03608 nsec 0xdf85296 vlan 0 vlan_tpid 0
    vnet-hdr:
      flags 0x00 gso_type 0x00 hdr_len 0
      gso_size 0 csum_start 0 csum_offset 0
15:28:42:505523: ethernet-input
  IP4: 08:00:27:f2:46:63 -> 08:00:27:15:d5:8d
15:28:42:505527: ip4-input
  ICMP: 192.168.56.12 -> 192.168.11.9
    tos 0x00, ttl 64, length 84, checksum 0x00d4 dscp CS0 ecn NON_ECN
    fragment id 0x756f, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x7271 id 55630
15:28:42:505531: ip4-sv-reassembly-feature
  [not-fragmented]
15:28:42:505533: nat-pre-in2out
  in2out next_index 2 arc_next_index 10
15:28:42:505535: nat44-ed-in2out
  NAT44_IN2OUT_ED_FAST_PATH: sw_if_index 3, next index 10, session 4, translation result 'success' via i2of   i2of match: saddr 192.168.56.12 sport 55630 daddr 192.168.11.9 dport 55630 proto ICMP fib_idx 0 rewrite: saddr 192.168.11.102 daddr 192.168.11.9 icmp-id 55630 txfib 0   o2if match: saddr 192.168.11.9 sport 55630 daddr 192.168.11.102 dport 55630 proto ICMP fib_idx 0 rewrite: saddr 192.168.11.9 daddr 192.168.56.12 icmp-id 55630 txfib 0   search key local 192.168.56.12:55630 remote 192.168.11.9:55630 proto ICMP fib 0 thread-index 0 session-index 0
15:28:42:505538: ip4-lookup
  fib 0 dpo-idx 6 flow hash: 0x00000000
  ICMP: 192.168.11.102 -> 192.168.11.9
    tos 0x00, ttl 64, length 84, checksum 0x2d7a dscp CS0 ecn NON_ECN
    fragment id 0x756f, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x7271 id 55630
15:28:42:505541: ip4-rewrite
  tx_sw_if_index 1 dpo-idx 6 : ipv4 via 192.168.11.9 GigabitEthernet0/3/0: mtu:9000 next:4 flags:[] 00e04c1a7d70080027f0bcb40800 flow hash: 0x00000000   00000000: 00e04c1a7d70080027f0bcb4080045000054756f40003f012e7ac0a80b66c0a8
  00000020: 0b0908007271d94e00730b36e06a00000000f8580900000000001011
15:28:42:505542: GigabitEthernet0/3/0-output
  GigabitEthernet0/3/0 flags 0x00380005
  IP4: 08:00:27:f0:bc:b4 -> 00:e0:4c:1a:7d:70
  ICMP: 192.168.11.102 -> 192.168.11.9
    tos 0x00, ttl 63, length 84, checksum 0x2e7a dscp CS0 ecn NON_ECN
    fragment id 0x756f, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x7271 id 55630
15:28:42:505545: GigabitEthernet0/3/0-tx
  GigabitEthernet0/3/0 tx queue 1
  buffer 0x89af5: current data 0, length 98, buffer-pool 0, ref-count 1, trace handle 0x1000000
                  natted l2-hdr-offset 0 l3-hdr-offset 14
  PKT MBUF: port 65535, nb_segs 1, pkt_len 98
    buf_len 2176, data_len 98, ol_flags 0x0, data_off 128, phys_addr 0x6d86bdc0
    packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
    rss 0x0 fdir.hi 0x0 fdir.lo 0x0
  IP4: 08:00:27:f0:bc:b4 -> 00:e0:4c:1a:7d:70
  ICMP: 192.168.11.102 -> 192.168.11.9
    tos 0x00, ttl 63, length 84, checksum 0x2e7a dscp CS0 ecn NON_ECN
    fragment id 0x756f, flags DONT_FRAGMENT
  ICMP echo_request checksum 0x7271 id 55630

Packet 2

tcpdump -nn -e -r /tmp/dpdk-tx.pcap
reading from file /tmp/dpdk-tx.pcap, link-type EN10MB (Ethernet), snapshot length 65536 19:55:59.855915 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 352, length 64 19:56:00.879593 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 353, length 64 19:56:01.910346 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 354, length 64 19:56:02.927761 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 355, length 64 19:56:03.951673 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 356, length 64 19:56:04.991974 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 357, length 64 19:56:05.999607 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 358, length 64 19:56:07.023608 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 359, length 64 19:56:08.048068 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 360, length 64 19:56:09.071624 08:00:27:f0:bc:b4 > 00:e0:4c:1a:7d:70, ethertype IPv4 (0x0800), length 98: 192.168.11.102 > 192.168.11.9: ICMP echo request, id 22357, seq 361, length 64

Pl help me to find my GigabitEthernet0/3/0 drops packets.

regards.

rajesh


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#27296): https://lists.fd.io/g/vpp-dev/message/27296
Mute This Topic: https://lists.fd.io/mt/121955940/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to