From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7786445BC0; Tue, 29 Oct 2024 19:27:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26EF742ECA; Tue, 29 Oct 2024 19:27:52 +0100 (CET) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by mails.dpdk.org (Postfix) with ESMTP id BDBBD42E48 for ; Tue, 29 Oct 2024 19:27:50 +0100 (CET) Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4XdJcV2H1Zz6JBF3; Wed, 30 Oct 2024 02:26:34 +0800 (CST) Received: from frapeml500005.china.huawei.com (unknown [7.182.85.13]) by mail.maildlp.com (Postfix) with ESMTPS id 412AC140429; Wed, 30 Oct 2024 02:27:50 +0800 (CST) Received: from GurSIX1 (10.204.107.56) by frapeml500005.china.huawei.com (7.182.85.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 29 Oct 2024 19:27:46 +0100 From: Gur Stavi To: 'Stephen Hemminger' CC: , "John W. Linville" , Ferruh Yigit References: <20241029090950.7a4b314f@hermes.local> In-Reply-To: <20241029090950.7a4b314f@hermes.local> Subject: RE: [PATCH v01] net/af_packet: add rollover and defrag options Date: Tue, 29 Oct 2024 20:27:46 +0200 Message-ID: <000e01db2a30$46821a90$d3864fb0$@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHbKfX0aw5keSu4wkuAlso/DntGD7Kd1UcAgAA2I6A= Content-Language: en-us X-Originating-IP: [10.204.107.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To frapeml500005.china.huawei.com (7.182.85.13) 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 > On Tue, 29 Oct 2024 15:48:05 +0200 > Gur Stavi wrote: > > > net_af_packet PMD multi "queue" support relies on Linux FANOUT > capability. > > Linux FANOUT is a SW based load balancer that is similar to HW RSS > which is > > more common for DPDK PMDs. Instead of multiple HW descriptor queues, AF > PACKET > > uses multiple sockets. > > HW RSS will typically drop a packet if its selected RX queue is empty. > However, > > Linux FANOUT, as a SW load balancer, can be configured to avoid this > packet > > drop by rolling over to the next socket. > > This rollover functionality was ALWAYS enabled in net_af_packet. It is > > surrounded by ifdef, but only to allow compilation on ancient Linux > versions > > that did not have it. > > > > Since DPDK applications are usually designed for HW based PMDs, this > rollover > > functionality, which the developers are likely unaware of, could be > confusing. > > > > Another option that is part of Linux FANOUT is DEFRAG that instructs > Linux to > > compose complete IP packet out of fragments before delivering it to the > PACKET > > socket. Again, this behavior typically does not exist for HW based PMDs > and may > > confuse users. > > > > This patch adds 2 options to control these features: > > rollover=[0|1],defrag=[0|1] > > For backward compatibility both features are enabled by default even > though most > > users will probably want both of them disabled. > > > > Signed-off-by: Gur Stavi > > --- > > Makes sense to expose kernel options. But have all combinations been > tested? I tested the command line parsing of the new options. I tested that the PMD is initialized successfully with all combinations. I did not test if Linux actually behaves according to the man page. I did not test traffic at all.