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 X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDADEC31E44 for ; Mon, 17 Jun 2019 08:52:06 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 6D5652080A for ; Mon, 17 Jun 2019 08:52:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D5652080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 969451BE7B; Mon, 17 Jun 2019 10:52:05 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 2D4001BE7B for ; Mon, 17 Jun 2019 10:52:04 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id u124so5632802vsu.2 for ; Mon, 17 Jun 2019 01:52:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T+B2OhjkNNmwscIt43iQZObrh7o4aPiN9cqvMKnkr5I=; b=sXnPMKZHBpcOnhAqErK9DdEq+aG86CpqUPyUTVhXLtJujzgxpiXdEM9g7YukxudjWR mxuPkGV81dgkYvUYoEQdo6ik92QDoJItTTvtu1dS5ZPvl+tsCjs57+axuCV8YlBv7Av6 tYOG6aFcwbFYTsvNtPDlVWTA08E5sgUxc5j6C/smXMHSHX9lP55ZHKVWtb0wJfLB9qes 0tagYeCqOfkrgPfQcgvg56MPlf8ibBaKXcJWvueIPx4fEsb1Q+/HBHeia0zYmyMGTdA/ tTCB+1MGyKvmVkXldtnCyN0Kic0Qxz+q+mfWVtDAmVKnHPc14nVJ7Z1e03Slo21XFQtN cIaQ== X-Gm-Message-State: APjAAAXrxjR4GTF6o6ep3jjpQrewgEzGPEwYLStnVn7j9I+w8eaYVsmg fVHKkJDnPb74e1mAIOOKbJe14bNY5JPYXfgRHcFAQQ== X-Google-Smtp-Source: APXvYqwidgClpmxIS9IlqPLtrle83i9TedkmzU2puNN6DUtIYEou/1+9GHwRwTzORrmTysTg9/nmuowsyIeMWlY7CLE= X-Received: by 2002:a67:f998:: with SMTP id b24mr48601422vsq.180.1560761523531; Mon, 17 Jun 2019 01:52:03 -0700 (PDT) MIME-Version: 1.0 References: <20190617142303.85240-1-xiaolong.ye@intel.com> <20190617152723.GC76301@intel.com> In-Reply-To: <20190617152723.GC76301@intel.com> From: David Marchand Date: Mon, 17 Jun 2019 10:51:52 +0200 Message-ID: To: Ye Xiaolong Cc: Qi Zhang , Karlsson Magnus , Topel Bjorn , yuan.peng@intel.com, dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 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). -- David Marchand