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 AD51DA00E6 for ; Tue, 19 Mar 2019 17:16:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8EDDB1DBD; Tue, 19 Mar 2019 17:16:32 +0100 (CET) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 7B4101B19 for ; Tue, 19 Mar 2019 17:16:31 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id v12so14222590pgq.1 for ; Tue, 19 Mar 2019 09:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y0I6ipXMlBJvl/HInscnh24swZAGgzMb9Dt7fdlktSY=; b=LdxZYUMRlGpMOOvsK3ueMc7Wd+KEtoIGzNpGE0Kde7dJLdFkhMCv2WhdWB+gtKJFCn NmOho6qfYBeDX901HndZE+OJm647H8cjVO0bdBhWzDIhZ9wHP1H6BNYeGLVgaOIM3JED zUBcUwbsF5W6FQ8PyedHHUTMOocuCSNsZdtBAwn0Yq9IbYp2QgCOdaGIs/xIrruwZYAv TEHXvm1ha0EjMWSTg9n8hfySuPqDbqL10lKJUiilBQ3PO8Qvn3H4FheUthrkcrWMR+mI 3S+iB3vBllbbVqoy0OpC3Gwn2pZFrfqAZ8ypw24TaHuRBFJE0TE5fsJsO0REhODDlBhL TmrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y0I6ipXMlBJvl/HInscnh24swZAGgzMb9Dt7fdlktSY=; b=cLuwrAWJZ56PuvH1Axh3eFFpoO9pFJyfyJE/kjH1n1AfsZC01wAj1bb2qedJmtbA57 nZS2J9mfuPyyNCiuqhc3owWOuunMOYxMKWZ73Zyc5NKheSo8UsW9pfGr51PvPpKITOvP 8YIU4CcKXOTO/IPmEU6Aiaa18gmTkpQYFFrH6sArtXLoLMqLAnOwwNzSKvZCPRUbzhWj vV/4c/pn3LxQle2tXvYtWyxSA6bKYF88OzZTFkbzc1BOhlhq4sf5ZLnptQZcKYDeQCNF nnBwf3FjC+3NwKjnd92nXd/GCL72TKfzZn3QaIupdsbBujxVng8+FjiTgv8GNwkGDmVF f4Sg== X-Gm-Message-State: APjAAAXbwdGiCPe5b53/l5lXmdiOXjNoFOSTZ9kWX0WjjLlH423/VuMW rSaDGbMyP0pWWgnfto+IXAaGtw== X-Google-Smtp-Source: APXvYqz8PYkosx3s4t6z4ejPZwk9ZcbJetfe7QlBZ0eD9regVY8tZjRB9aA2MDEZgCSt4c01ekv4/Q== X-Received: by 2002:a65:6489:: with SMTP id e9mr2555163pgv.260.1553012190631; Tue, 19 Mar 2019 09:16:30 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 14sm16490939pfh.177.2019.03.19.09.16.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 09:16:30 -0700 (PDT) Date: Tue, 19 Mar 2019 09:16:27 -0700 From: Stephen Hemminger To: Xiaolong Ye Cc: dev@dpdk.org, Qi Zhang , Karlsson Magnus , Topel Bjorn Message-ID: <20190319091627.570eb225@shemminger-XPS-13-9360> In-Reply-To: <20190319071256.26302-2-xiaolong.ye@intel.com> References: <20190301080947.91086-1-xiaolong.ye@intel.com> <20190319071256.26302-1-xiaolong.ye@intel.com> <20190319071256.26302-2-xiaolong.ye@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/6] net/af_xdp: introduce AF XDP PMD driver 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" Message-ID: <20190319161627.UUOn3Z3T_qBS5soL696EnxCIuzlG7-LDfR9IxfZezhM@z> On Tue, 19 Mar 2019 15:12:51 +0800 Xiaolong Ye wrote: > Add a new PMD driver for AF_XDP which is a proposed faster version of > AF_PACKET interface in Linux. More info about AF_XDP, please refer to [1] > [2]. > > This is the vanilla version PMD which just uses a raw buffer registered as > the umem. > > [1] https://fosdem.org/2018/schedule/event/af_xdp/ > [2] https://lwn.net/Articles/745934/ > > Signed-off-by: Xiaolong Ye > --- > MAINTAINERS | 6 + > config/common_base | 5 + > config/common_linux | 1 + > doc/guides/nics/af_xdp.rst | 45 + > doc/guides/nics/features/af_xdp.ini | 11 + > doc/guides/nics/index.rst | 1 + > doc/guides/rel_notes/release_19_05.rst | 7 + > drivers/net/Makefile | 1 + > drivers/net/af_xdp/Makefile | 33 + > drivers/net/af_xdp/meson.build | 21 + > drivers/net/af_xdp/rte_eth_af_xdp.c | 930 ++++++++++++++++++ > drivers/net/af_xdp/rte_pmd_af_xdp_version.map | 3 + > drivers/net/meson.build | 1 + > mk/rte.app.mk | 1 + > 14 files changed, 1066 insertions(+) > create mode 100644 doc/guides/nics/af_xdp.rst > create mode 100644 doc/guides/nics/features/af_xdp.ini > create mode 100644 drivers/net/af_xdp/Makefile > create mode 100644 drivers/net/af_xdp/meson.build > create mode 100644 drivers/net/af_xdp/rte_eth_af_xdp.c > create mode 100644 drivers/net/af_xdp/rte_pmd_af_xdp_version.map > > diff --git a/MAINTAINERS b/MAINTAINERS > index 452b8eb82..1cc54b439 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -468,6 +468,12 @@ M: John W. Linville > F: drivers/net/af_packet/ > F: doc/guides/nics/features/afpacket.ini > > +Linux AF_XDP > +M: Xiaolong Ye > +M: Qi Zhang > +F: drivers/net/af_xdp/ > +F: doc/guides/nics/features/af_xdp.rst > + > Amazon ENA > M: Marcin Wojtas > M: Michal Krawczyk > diff --git a/config/common_base b/config/common_base > index 0b09a9348..4044de205 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -416,6 +416,11 @@ CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n > # > CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n > > +# > +# Compile software PMD backed by AF_XDP sockets (Linux only) > +# > +CONFIG_RTE_LIBRTE_PMD_AF_XDP=n > + > # > # Compile link bonding PMD library > # > diff --git a/config/common_linux b/config/common_linux > index 75334273d..0b1249da0 100644 > --- a/config/common_linux > +++ b/config/common_linux > @@ -19,6 +19,7 @@ CONFIG_RTE_LIBRTE_VHOST_POSTCOPY=n > CONFIG_RTE_LIBRTE_PMD_VHOST=y > CONFIG_RTE_LIBRTE_IFC_PMD=y > CONFIG_RTE_LIBRTE_PMD_AF_PACKET=y > +CONFIG_RTE_LIBRTE_PMD_AF_XDP=y > CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y > CONFIG_RTE_LIBRTE_PMD_TAP=y > CONFIG_RTE_LIBRTE_AVP_PMD=y > diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst > new file mode 100644 > index 000000000..dd5654dd1 > --- /dev/null > +++ b/doc/guides/nics/af_xdp.rst > @@ -0,0 +1,45 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + Copyright(c) 2018 Intel Corporation. > + > +AF_XDP Poll Mode Driver > +========================== > + > +AF_XDP is an address family that is optimized for high performance > +packet processing. AF_XDP sockets enable the possibility for XDP program to > +redirect packets to a memory buffer in userspace. > + > +For the full details behind AF_XDP socket, you can refer to > +`AF_XDP documentation in the Kernel > +`_. > + > +This Linux-specific PMD driver creates the AF_XDP socket and binds it to a > +specific netdev queue, it allows a DPDK application to send and receive raw > +packets through the socket which would bypass the kernel network stack. > +Current implementation only supports single queue, multi-queues feature will > +be added later. > + > +Options > +------- > + > +The following options can be provided to set up an af_xdp port in DPDK. > + > +* ``iface`` - name of the Kernel interface to attach to (required); > +* ``queue`` - netdev queue id (optional, default 0); > + > +Prerequisites > +------------- > + > +This is a Linux-specific PMD, thus the following prerequisites apply: > + > +* A Linux Kernel (version > 4.18) with XDP sockets configuration enabled; > +* libbpf (within kernel version > 5.1) with latest af_xdp support installed > +* A Kernel bound interface to attach to. > + > +Set up an af_xdp interface > +----------------------------- > + > +The following example will set up an af_xdp interface in DPDK: > + > +.. code-block:: console > + > + --vdev eth_af_xdp,iface=ens786f1,queue=0 > diff --git a/doc/guides/nics/features/af_xdp.ini b/doc/guides/nics/features/af_xdp.ini > new file mode 100644 > index 000000000..7b8fcce00 > --- /dev/null > +++ b/doc/guides/nics/features/af_xdp.ini > @@ -0,0 +1,11 @@ > +; > +; Supported features of the 'af_xdp' network poll mode driver. > +; > +; Refer to default.ini for the full list of available PMD features. > +; > +[Features] > +Link status = Y > +MTU update = Y > +Promiscuous mode = Y > +Stats per queue = Y > +x86-64 = Y > \ No newline at end of file This is bad. Configure your editor to always put newline at end of file. In .emacs (setq require-final-newline t)