From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 121E9A0471 for ; Mon, 17 Jun 2019 10:56:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0FDF1BE71; Mon, 17 Jun 2019 10:56:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 49FEE1BE5C for ; Mon, 17 Jun 2019 10:56:57 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 01:56:56 -0700 X-ExtLoop1: 1 Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.186]) by orsmga004.jf.intel.com with ESMTP; 17 Jun 2019 01:56:55 -0700 Date: Mon, 17 Jun 2019 23:39:06 +0800 From: Ye Xiaolong To: David Marchand Cc: Qi Zhang , Karlsson Magnus , Topel Bjorn , yuan.peng@intel.com, dev Message-ID: <20190617153906.GD76301@intel.com> References: <20190617142303.85240-1-xiaolong.ye@intel.com> <20190617152723.GC76301@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v1] net/af_xdp: support need wakeup feature X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 06/17, David Marchand wrote: >On Mon, Jun 17, 2019 at 10:45 AM Ye Xiaolong wrote: > >> On 06/17, David Marchand wrote: >> >On Mon, Jun 17, 2019 at 9:42 AM Xiaolong Ye >> wrote: >> > >> >> This patch adds a new devarg to support the need_wakeup flag for Tx and >> >> fill rings, when this flag is set by the driver, it means that the >> >> userspace application has to explicitly wake up the kernel Rx or kernel >> Tx >> >> processing by issuing a syscall. Poll() can wake up both and sendto() or >> >> its alternatives will wake up Tx processing only. >> >> >> >> This feature is to provide efficient support for case that application >> and >> >> driver are executing on the same core. >> >> >> >> Signed-off-by: Xiaolong Ye >> >> --- >> >> >> >> Original busy poll feature has morphed into need_wakeup flag in >> >> kernel side, the main purpose is the same, that is to support both >> >> application and driver executing on the same core efficiently. >> >> >> >> kernel side patchset can be found at netdev mailing list. >> >> >> >> >> https://lore.kernel.org/netdev/CAJ8uoz2szX=+JXXAMyuVmvSsMXZuDqp6a8rjDQpTioxbZwxFmQ@mail.gmail.com/T/#t >> >> >> >> It is targeted for v5.3 >> >> >> > >> >- Is this really optional? Adding too many options is just a nightmare >> >later... >> >> Hmm, I think we can remove this option and alway turn the need_wakeup flag >> on >> since it provides better performance for 1 core case and doesn't downgrage >> the >> 2 core case performance. >> >> > >> >- I suppose this will break compilation with kernels that have af_xdp but >> >are < 5.3. >> >> Yes, that is true. It will break the compilation with early kernel, I feel >> it's >> sort of common issue, we enable some features in dpdk that's based on >> kernel >> features, then kernel side features keep evolving, we need to keep the >> pace, >> but it will hurt the compatiblity with the old kernel. >> >> What's dpdk's convention for handling this kind of case? Add some notes in >> doc >> to reminder the prerequisite or use the KERNEL_VERSION macro in code? >> > >Rather than a kernel version, you can check that XDP_USE_NEED_WAKEUP is >defined (present in the uapi kernel header). Sounds better, will try. Thanks, Xiaolong > > >-- >David Marchand