From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id A862EC4167B for ; Mon, 26 Dec 2022 10:26:47 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 735984114B; Mon, 26 Dec 2022 11:26:46 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 8BBA140E2D for ; Mon, 26 Dec 2022 11:26:45 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [dpdk-dev] [PATCH v3] net/i40e: disable source pruning MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 26 Dec 2022 11:26:42 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D875F4@smartserver.smartshare.dk> In-Reply-To: X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-TNEF-Correlator: Thread-Topic: [dpdk-dev] [PATCH v3] net/i40e: disable source pruning Thread-Index: AQHXxVHVOtMgwSa1lECrabu3Rl5jN6yebejwgAAOJbCB5AjckIAADzQA References: <20211019093835.3492-1-alvinx.zhang@intel.com> <20211020012831.8480-1-alvinx.zhang@intel.com> <98CBD80474FA8B44BF855DF32C47DC35D86ECE@smartserver.smartshare.dk> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Zhang, Ke1X" , "Jiang, YuX" , "Alvin Zhang" , "Xing, Beilei" , "Guo, Junfeng" Cc: , "Zhang, AlvinX" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org +CC Ethernet API maintainers, you might have an opinion about expected = default behavior > From: Zhang, Ke1X [mailto:ke1x.zhang@intel.com] > Sent: Monday, 26 December 2022 10.04 >=20 > > From: Morten Br=F8rup > > Sent: Monday, February 21, 2022 5:35 PM > > > > > From: Jiang, YuX [mailto:yux.jiang@intel.com] > > > Sent: Monday, 21 February 2022 09.31 > > > > > > > From: dev 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 > > > > --- > > > Tested-by: Yu Jiang > > > > > > Verified patchset > > > http://patches.dpdk.org/project/dpdk/patch/20211020012831.8480-1- > > > alvinx.zhang@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=3D1 = -- > -i > > > pkt =3D Ether(src=3D"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 >=20 > Thanks for your comments @Morten Br=F8rup > After testing with other NIC like ice, source pruning is the default > action, it means it is the same action > for both ice and i40e when receiving in default. I meant NICs in general, not just Intel NICs. Is it standard behavior = for NICs in general (incl. NVIDIA, Broadcom, etc.) to perform source = pruning? They way I read the bug report, the source pruning behavior is specific = to Intel NICs. Applications should not be required to pass specific = command line parameters to make one vendor's PMDs behave like the = general behavior of PMDs from other vendors. > In this patch, the default is "not disable", it is same with other > NICs. Not other NICs in general, only other Intel NICs. I acknowledge that this patch is a workaround, and certainly an = improvement, but why not provide a fix instead? It could be backported = to older DPDK releases. If you want to stick with this workaround instead of providing a proper = fix, please also update the documentation to mention that = disable_source_pruning=3D1 is required. Please also describe how to disable source pruning at runtime. Some = applications detect the installed NICs at runtime, so passing NIC = specific parameters to the application at startup is not possible. -Morten