Hi Ben, Sorry I wasn’t clear with interface stats. It is not the rx/tx counter but drop counter. Drop counter is accumulated along the forwarding path. If a packet is dropped after bond-input or l2-fwd after RX intf is replaced with bond or bvi sw_if_index, the drop will be counted under the new interface. But SONiC expects the drop to be counted under the member interface.
In SONiC, it uses linux networking stack. For example, we create a VLAN 10 with member interfaces Ethernet0 and Ethernet1. In linux kernel, Vlan10 bridge is created and Ethernet0 and Ethernet1 are added to the bridge. In sonic-vpp, Ethernet0 and Ethernet1 are tap interfaces created by LCP plugin. LCP also creates a tap interface for Vlan10 as a pair of bvi interface. For the IP unicast, an example is a packet with DST-MAC of the BVI mac, DST-IP of a loopback address. Packet is received by bobm0 (physical interface of Ethernet0) of the bridge. The packet will go through ethernet-input -> l2-input -> l2-input-vtr -> l2-learn -> l2-fwd -> l2-ouput -> ip4-input -> ip4-lookup -> ip4-local -> linux-cp-punt-xc. Current behavior of linux-cp-punt-xc is to punt the packet to the LCP pair interface of the current RX interface, which is BVI. But SONiC expects the packet to be punted to the Ethernet0, which is LCP pair of the original rx interface. Please let me know if you need further clarification. Thanks, Fred From: [email protected] <[email protected]> on behalf of Benoit Ganne (bganne) via lists.fd.io <[email protected]> Date: Wednesday, June 3, 2026 at 3:56 AM To: [email protected] <[email protected]> Cc: murali Venkateshaiah (muraliv) <[email protected]> Subject: Re: [vpp-dev] Add a field to keep original rx interface Hi Fred, RX/TX statistics should already be available per interface under /interfaces/<ifname>/{rx,tx,drops} etc. Isn't that sufficient for that stat case? Regarding punting, can you describe the packet path a bit more? You have a packet destined to the address of the BVI, but you want to punt it somewhere through a specific interface? Best ben ________________________________________ From: [email protected] <[email protected]> on behalf of Yue Gao (yuega2) via lists.fd.io <[email protected]> Sent: Tuesday, June 2, 2026 23:12 To: [email protected] Cc: murali Venkateshaiah (muraliv) Subject: [vpp-dev] Add a field to keep original rx interface Hello, When working with sonic integration, we found there are a few cases we need to remember the rx interface. 1. SONIC expects rx packets to be counted under member interface, not bond interface. 2. In VLAN bridge with bvi, ip unicast packets to the host with bvi as nexthop should be punted to the member interface of the bridge, not bvi. For these cases, we need to remember the original rx sw_if_index (u32) in vnet_buffer_opaque2_t, for example. Do you think if this change is reasonable? Thanks, Fred
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#27030): https://lists.fd.io/g/vpp-dev/message/27030 Mute This Topic: https://lists.fd.io/mt/119619157/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
