[dpdk-dev] [PATCH v3] net/i40e: disable source pruning

Morten Brørup mb at smartsharesystems.com
Mon Feb 21 10:35:11 CET 2022


> From: Jiang, YuX [mailto:yux.jiang at intel.com]
> Sent: Monday, 21 February 2022 09.31
> 
> > From: dev <dev-bounces at dpdk.org> On Behalf Of Alvin Zhang
> > Sent: Wednesday, October 20, 2021 9:29 AM
> >
> > VRRP advertisement packets are dropped on i40e PF devices because
> when
> > a MAC address is added to a device, packets originating from that MAC
> > address are dropped.
> >
> > This patch adds a devarg to support disabling source pruning to work
> around
> > above issue.
> >
> > Bugzilla ID: 648
> >
> > Signed-off-by: Alvin Zhang <alvinx.zhang at intel.com>
> > ---
> Tested-by:  Yu Jiang <YuX.Jiang at intel.com>
> 
> Verified patchset
> http://patches.dpdk.org/project/dpdk/patch/20211020012831.8480-1-
> alvinx.zhang at intel.com/ on baseline dpdk22.03-rc1:ecc0dd455e
> "raw/cnxk_gpio: add option to select subset of GPIOs"
> Tested pass on Ethernet Controller XL710 for 40GbE QSFP+ 1583, OS:
> Fedora Linux 35/5.14.10-300.fc35.x86_64
> Test step as below:
>  ./dpdk-testpmd -l 1,2 -n 1 -a 18:00.0,disable_source_pruning=1 -- -i
>  pkt = Ether(src="00:00:5E:00:01:0A")/IP()/Raw("x"*60)
>  test steps:
> 1). testpmd>set verbose 1
>     testpmd>start
> 2). Send the pkt, the pkt can be received by testpmd
> 3). testpmd>mac_addr add 0 00:00:5E:00:01:0A
> 4). Re-send the pkt, the pkt still can be received by testpmd.

If source pruning is not the default behavior of all NICs, it should be disabled by default in the i40e NIC too.

A NIC shouldn't drop any packets unless it has explicitly been configured for it! And a NIC shouldn't treat any packets differently than other NICs do, unless the NIC has explicitly been configured so!

Furthermore, I would prefer that configurations for explicitly dropping certain types of packets is available through runtime APIs, e.g. RTE_FLOWS, or dedicated functions like rte_eth_promiscuous_enable/disable(). This patch doesn't support runtime detection of installed NICs performed by the application.

I am very surprised by this default behavior of a NIC. Please confirm that Source Pruning is at least disabled in Promiscuous mode?

-Morten



More information about the dev mailing list