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 77E64A0A0F; Wed, 30 Jun 2021 14:23:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DEBC40141; Wed, 30 Jun 2021 14:23:58 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 3CBD640040 for ; Wed, 30 Jun 2021 14:23:57 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10030"; a="208377363" X-IronPort-AV: E=Sophos;i="5.83,312,1616482800"; d="scan'208";a="208377363" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2021 05:23:53 -0700 X-IronPort-AV: E=Sophos;i="5.83,312,1616482800"; d="scan'208";a="408542132" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.221.90]) ([10.213.221.90]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2021 05:23:52 -0700 To: dheemanth , dev@dpdk.org References: <1607642153-24347-1-git-send-email-dheemanthm@vmware.com> From: Ferruh Yigit Message-ID: <4a427759-55cd-b06b-85a9-a7e8f1506cfc@linux.intel.com> Date: Wed, 30 Jun 2021 13:23:48 +0100 MIME-Version: 1.0 In-Reply-To: <1607642153-24347-1-git-send-email-dheemanthm@vmware.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 2/2] linux/kni: Added support for KNI multiple fifos 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 Sender: "dev" On 12/10/2020 11:15 PM, dheemanth wrote: > In order to improve performance, the KNI is made to > support multiple fifos, So that multiple threads pinned > to multiple cores can process packets in parallel. > Hi Dheemanth, As far as I know, in KNI the bottle neck is in the kernel thread. In this patch FIFO between userspace and kernelspace converted into multiple FIFOs but in kernel side still same thread process all FIFOs, so only userspace can scale to more cores, I wonder how this imporves the performance, can you please share use case and some numbers? Also FIFOs seems converted from simple single producer, single consumer to multi producer and multi consumer. What is the performance impact of this? And why this is needed? In the dpdk application, is there N-N relation between cores and fifos, again can you please clarifiy your usecase? In the kernel to userspace transfer, packets distributed to multiple FIFOs based on packet hash, this should be additional load to the kernel thread. The sample application and unit test (also kni pmd) is not using this new feature but they only use single fifo. They also should be updated to use this feature, that helps as sample and helps to demonstrade the usecase. Btw, can you please clarify why 'queues_num' is used? Is it expected to be same with 'fifos_num'? Also documentation needs to be updated, but before more change I think the benefit of the work needs to be clarified to decide to proceed or not with the set. > Signed-off-by: dheemanth > --- > app/test/test_kni.c | 4 +- > drivers/net/kni/rte_eth_kni.c | 5 +- > examples/kni/main.c | 4 +- > kernel/linux/kni/kni_dev.h | 11 +- > kernel/linux/kni/kni_fifo.h | 190 ++++++++++++++++++++++++++++++----- > kernel/linux/kni/kni_misc.c | 189 +++++++++++++++++++++-------------- > kernel/linux/kni/kni_net.c | 88 ++++++++++------ > lib/librte_kni/rte_kni.c | 216 ++++++++++++++++++++++++++-------------- > lib/librte_kni/rte_kni.h | 11 +- > lib/librte_kni/rte_kni_common.h | 10 +- > lib/librte_port/rte_port_kni.c | 12 +-- > 11 files changed, 514 insertions(+), 226 deletions(-) > <...> > @@ -292,51 +292,69 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, > { > struct kni_net *knet = net_generic(net, kni_net_id); > int ret; > - struct rte_kni_device_info dev_info; > + unsigned int i, tx_queues_num; > + struct rte_kni_device_info *dev_info; > struct net_device *net_dev = NULL; > struct kni_dev *kni, *dev, *n; > > pr_info("Creating kni...\n"); > + > + /* allocate dev_info from stack to avoid Wframe-larger-than=1024 > + * compile error. > + */ s/stack/heap > + dev_info = kzalloc(sizeof(struct rte_kni_device_info), GFP_KERNEL); > + if (!dev_info) > + return -ENOMEM; > + <...>