get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/137491/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 137491,
    "url": "http://patchwork.dpdk.org/api/patches/137491/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240229132129.656166-2-mtahhan@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240229132129.656166-2-mtahhan@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240229132129.656166-2-mtahhan@redhat.com",
    "date": "2024-02-29T13:21:20",
    "name": "[v11,1/3] docs: AF_XDP Device Plugin",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "6f2e7934ad751cfa054f7b2ab8415fab8c90b322",
    "submitter": {
        "id": 3236,
        "url": "http://patchwork.dpdk.org/api/people/3236/?format=api",
        "name": "Maryam Tahhan",
        "email": "mtahhan@redhat.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240229132129.656166-2-mtahhan@redhat.com/mbox/",
    "series": [
        {
            "id": 31296,
            "url": "http://patchwork.dpdk.org/api/series/31296/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31296",
            "date": "2024-02-29T13:21:19",
            "name": "net/af_xdp: fix multi interface support for K8s",
            "version": 11,
            "mbox": "http://patchwork.dpdk.org/series/31296/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/137491/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/137491/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2169243C0C;\n\tThu, 29 Feb 2024 14:21:41 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 804DD40E6E;\n\tThu, 29 Feb 2024 14:21:40 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id B8EDA402AE\n for <dev@dpdk.org>; Thu, 29 Feb 2024 14:21:38 +0100 (CET)",
            "from mail-oi1-f198.google.com (mail-oi1-f198.google.com\n [209.85.167.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-255-hWbMBQ6zPqCVp-neJfM2QQ-1; Thu, 29 Feb 2024 08:21:35 -0500",
            "by mail-oi1-f198.google.com with SMTP id\n 5614622812f47-3c1c1e68dc5so903122b6e.3\n for <dev@dpdk.org>; Thu, 29 Feb 2024 05:21:35 -0800 (PST)",
            "from nfvsdn-06.redhat.com (nat-pool-232-132.redhat.com.\n [66.187.232.132]) by smtp.gmail.com with ESMTPSA id\n g22-20020ac84b76000000b0042e6d2dd6bbsm698133qts.11.2024.02.29.05.21.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 29 Feb 2024 05:21:33 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1709212898;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=DCl9GMX+djO4+6Pw6+YP9GrOL1H/g1c5P0w/rKZLbWM=;\n b=fzubfa+X5IijsVNOIREZjiL0VAP8wqKo1PwJqV/RtzNpF9EERCR4efskqurqKjCbfoKT+I\n rV/CbDX6t0Y5zi1/RRd9VYX6Sn2/XSRKPw2xOnp7SUyHCRtOB+o1hgL6yCd4MXPoPPza9U\n 5NcdD7C6xrEwWhufEfXxPQX76FSAwUs=",
        "X-MC-Unique": "hWbMBQ6zPqCVp-neJfM2QQ-1",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1709212894; x=1709817694;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=DCl9GMX+djO4+6Pw6+YP9GrOL1H/g1c5P0w/rKZLbWM=;\n b=vMkzU8+OyEuV9lxIZTK8nLUF1CRmqViJd8Bw10+qje6CYVTlrruQ/LFDvDaCj+xXbc\n YrX8MrWHTiOOxy4aHtZ8Nq67xDdB3yp2fqUrUWAp7P1cbRpg7qfpfxLYZe3d6BI5uqmM\n PGMeALVrmbs8zEbTHyVeijUzom+QBqKNN+wVmG/2VT9JdMufK5YPD5v0BG3dcbwnAc3/\n s691zd/yyR8Xx7Inrf3BTXWS79WlyJuoOGx4XYqb+R7Prb8tpeBriByBONUjpMdHWt64\n t9+jSPKhDdoNbI+JYoOFNG1d2NFRAEFmTHnJbuRDU676BPTZGuZma4bTBfTJWHENugBe\n oP5Q==",
        "X-Gm-Message-State": "AOJu0YyS1JRh0RhLYjA5KjhPg2cFjXpzLfgrnpTTi/y2GoIL/Yf1fHV2\n icqBuz76FDzSEaild5sxSg1TiVoHBsbgwoKdU2zLkk7CleVW5guxDSI1tWRXEdGgdn+7bwz9Ghk\n 11n52+IfnzOojjb+acfupT7e2R+VMK7kXFSMacCrO",
        "X-Received": [
            "by 2002:a05:6808:152c:b0:3c1:5f1f:b951 with SMTP id\n u44-20020a056808152c00b003c15f1fb951mr2015862oiw.42.1709212894272;\n Thu, 29 Feb 2024 05:21:34 -0800 (PST)",
            "by 2002:a05:6808:152c:b0:3c1:5f1f:b951 with SMTP id\n u44-20020a056808152c00b003c15f1fb951mr2015836oiw.42.1709212893823;\n Thu, 29 Feb 2024 05:21:33 -0800 (PST)"
        ],
        "X-Google-Smtp-Source": "\n AGHT+IHO2YLNjn9qsAOCusVX9UQ9MFwtmXahpPmI6V5BgnTe0JnVTnzEBWLDcZHjLCKcQ9tt9xqoDA==",
        "From": "Maryam Tahhan <mtahhan@redhat.com>",
        "To": "ferruh.yigit@amd.com, stephen@networkplumber.org, lihuisong@huawei.com,\n fengchengwen@huawei.com, liuyonglong@huawei.com, david.marchand@redhat.com,\n shibin.koikkara.reeny@intel.com, ciara.loftus@intel.com",
        "Cc": "dev@dpdk.org,\n\tMaryam Tahhan <mtahhan@redhat.com>,\n\tstable@dpdk.org",
        "Subject": "[v11 1/3] docs: AF_XDP Device Plugin",
        "Date": "Thu, 29 Feb 2024 08:21:20 -0500",
        "Message-ID": "<20240229132129.656166-2-mtahhan@redhat.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "In-Reply-To": "<20240229132129.656166-1-mtahhan@redhat.com>",
        "References": "<20240229132129.656166-1-mtahhan@redhat.com>",
        "MIME-Version": "1.0",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Fixup the references to the AF_XDP Device Plugin in\nthe documentation (was referred to as CNI previously)\nand document the single netdev limitation for deploying\nan AF_XDP based DPDK pod. Also renames af_xdp_cni.rst to\naf_xdp_dp.rst\n\nFixes: 7fc6ae50369d (\"net/af_xdp: support CNI Integration\")\nCc: stable@dpdk.org\n\nSigned-off-by: Maryam Tahhan <mtahhan@redhat.com>\n---\n doc/guides/howto/af_xdp_cni.rst | 253 ---------------------------\n doc/guides/howto/af_xdp_dp.rst  | 299 ++++++++++++++++++++++++++++++++\n doc/guides/howto/index.rst      |   2 +-\n doc/guides/nics/af_xdp.rst      |   4 +-\n 4 files changed, 302 insertions(+), 256 deletions(-)\n delete mode 100644 doc/guides/howto/af_xdp_cni.rst\n create mode 100644 doc/guides/howto/af_xdp_dp.rst",
    "diff": "diff --git a/doc/guides/howto/af_xdp_cni.rst b/doc/guides/howto/af_xdp_cni.rst\ndeleted file mode 100644\nindex a1a6d5b99c..0000000000\n--- a/doc/guides/howto/af_xdp_cni.rst\n+++ /dev/null\n@@ -1,253 +0,0 @@\n-.. SPDX-License-Identifier: BSD-3-Clause\n-   Copyright(c) 2023 Intel Corporation.\n-\n-Using a CNI with the AF_XDP driver\n-==================================\n-\n-Introduction\n-------------\n-\n-CNI, the Container Network Interface, is a technology for configuring\n-container network interfaces\n-and which can be used to setup Kubernetes networking.\n-AF_XDP is a Linux socket Address Family that enables an XDP program\n-to redirect packets to a memory buffer in userspace.\n-\n-This document explains how to enable the `AF_XDP Plugin for Kubernetes`_ within\n-a DPDK application using the :doc:`../nics/af_xdp` to connect and use these technologies.\n-\n-.. _AF_XDP Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes\n-\n-\n-Background\n-----------\n-\n-The standard :doc:`../nics/af_xdp` initialization process involves loading an eBPF program\n-onto the kernel netdev to be used by the PMD.\n-This operation requires root or escalated Linux privileges\n-and thus prevents the PMD from working in an unprivileged container.\n-The AF_XDP CNI plugin handles this situation\n-by providing a device plugin that performs the program loading.\n-\n-At a technical level the CNI opens a Unix Domain Socket and listens for a client\n-to make requests over that socket.\n-A DPDK application acting as a client connects and initiates a configuration \"handshake\".\n-The client then receives a file descriptor which points to the XSKMAP\n-associated with the loaded eBPF program.\n-The XSKMAP is a BPF map of AF_XDP sockets (XSK).\n-The client can then proceed with creating an AF_XDP socket\n-and inserting that socket into the XSKMAP pointed to by the descriptor.\n-\n-The EAL vdev argument ``use_cni`` is used to indicate that the user wishes\n-to run the PMD in unprivileged mode and to receive the XSKMAP file descriptor\n-from the CNI.\n-When this flag is set,\n-the ``XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD`` libbpf flag\n-should be used when creating the socket\n-to instruct libbpf not to load the default libbpf program on the netdev.\n-Instead the loading is handled by the CNI.\n-\n-.. note::\n-\n-   The Unix Domain Socket file path appear in the end user is \"/tmp/afxdp.sock\".\n-\n-\n-Prerequisites\n--------------\n-\n-Docker and container prerequisites:\n-\n-* Set up the device plugin\n-  as described in the instructions for `AF_XDP Plugin for Kubernetes`_.\n-\n-* The Docker image should contain the libbpf and libxdp libraries,\n-  which are dependencies for AF_XDP,\n-  and should include support for the ``ethtool`` command.\n-\n-* The Pod should have enabled the capabilities ``CAP_NET_RAW`` and ``CAP_BPF``\n-  for AF_XDP along with support for hugepages.\n-\n-* Increase locked memory limit so containers have enough memory for packet buffers.\n-  For example:\n-\n-  .. code-block:: console\n-\n-     cat << EOF | sudo tee /etc/systemd/system/containerd.service.d/limits.conf\n-     [Service]\n-     LimitMEMLOCK=infinity\n-     EOF\n-\n-* dpdk-testpmd application should have AF_XDP feature enabled.\n-\n-  For further information see the docs for the: :doc:`../../nics/af_xdp`.\n-\n-\n-Example\n--------\n-\n-Howto run dpdk-testpmd with CNI plugin:\n-\n-* Clone the CNI plugin\n-\n-  .. code-block:: console\n-\n-     # git clone https://github.com/intel/afxdp-plugins-for-kubernetes.git\n-\n-* Build the CNI plugin\n-\n-  .. code-block:: console\n-\n-     # cd afxdp-plugins-for-kubernetes/\n-     # make build\n-\n-  .. note::\n-\n-     CNI plugin has a dependence on the config.json.\n-\n-  Sample Config.json\n-\n-  .. code-block:: json\n-\n-     {\n-        \"logLevel\":\"debug\",\n-        \"logFile\":\"afxdp-dp-e2e.log\",\n-        \"pools\":[\n-           {\n-              \"name\":\"e2e\",\n-              \"mode\":\"primary\",\n-              \"timeout\":30,\n-              \"ethtoolCmds\" : [\"-L -device- combined 1\"],\n-              \"devices\":[\n-                 {\n-                    \"name\":\"ens785f0\"\n-                 }\n-              ]\n-           }\n-        ]\n-     }\n-\n-  For further reference please use the `config.json`_\n-\n-  .. _config.json: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/config.json\n-\n-* Create the Network Attachment definition\n-\n-  .. code-block:: console\n-\n-     # kubectl create -f nad.yaml\n-\n-  Sample nad.yml\n-\n-  .. code-block:: yaml\n-\n-      apiVersion: \"k8s.cni.cncf.io/v1\"\n-      kind: NetworkAttachmentDefinition\n-      metadata:\n-        name: afxdp-e2e-test\n-        annotations:\n-          k8s.v1.cni.cncf.io/resourceName: afxdp/e2e\n-      spec:\n-        config: '{\n-            \"cniVersion\": \"0.3.0\",\n-            \"type\": \"afxdp\",\n-            \"mode\": \"cdq\",\n-            \"logFile\": \"afxdp-cni-e2e.log\",\n-            \"logLevel\": \"debug\",\n-            \"ipam\": {\n-              \"type\": \"host-local\",\n-              \"subnet\": \"192.168.1.0/24\",\n-              \"rangeStart\": \"192.168.1.200\",\n-              \"rangeEnd\": \"192.168.1.216\",\n-              \"routes\": [\n-                { \"dst\": \"0.0.0.0/0\" }\n-              ],\n-              \"gateway\": \"192.168.1.1\"\n-            }\n-          }'\n-\n-  For further reference please use the `nad.yaml`_\n-\n-  .. _nad.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/nad.yaml\n-\n-* Build the Docker image\n-\n-  .. code-block:: console\n-\n-     # docker build -t afxdp-e2e-test -f Dockerfile .\n-\n-  Sample Dockerfile:\n-\n-  .. code-block:: console\n-\n-     FROM ubuntu:20.04\n-     RUN apt-get update -y\n-     RUN apt install build-essential libelf-dev -y\n-     RUN apt-get install iproute2  acl -y\n-     RUN apt install python3-pyelftools ethtool -y\n-     RUN apt install libnuma-dev libjansson-dev libpcap-dev net-tools -y\n-     RUN apt-get install clang llvm -y\n-     COPY ./libbpf<version>.tar.gz /tmp\n-     RUN cd /tmp && tar -xvmf libbpf<version>.tar.gz && cd libbpf/src && make install\n-     COPY ./libxdp<version>.tar.gz /tmp\n-     RUN cd /tmp && tar -xvmf libxdp<version>.tar.gz && cd libxdp && make install\n-\n-  .. note::\n-\n-     All the files that need to COPY-ed should be in the same directory as the Dockerfile\n-\n-* Run the Pod\n-\n-  .. code-block:: console\n-\n-     # kubectl create -f pod.yaml\n-\n-  Sample pod.yaml:\n-\n-  .. code-block:: yaml\n-\n-     apiVersion: v1\n-     kind: Pod\n-     metadata:\n-       name: afxdp-e2e-test\n-       annotations:\n-         k8s.v1.cni.cncf.io/networks: afxdp-e2e-test\n-     spec:\n-       containers:\n-       - name: afxdp\n-         image: afxdp-e2e-test:latest\n-         imagePullPolicy: Never\n-         env:\n-         - name: LD_LIBRARY_PATH\n-           value: /usr/lib64/:/usr/local/lib/\n-         command: [\"tail\", \"-f\", \"/dev/null\"]\n-         securityContext:\n-          capabilities:\n-             add:\n-               - CAP_NET_RAW\n-               - CAP_BPF\n-         resources:\n-           requests:\n-             hugepages-2Mi: 2Gi\n-             memory: 2Gi\n-             afxdp/e2e: '1'\n-           limits:\n-             hugepages-2Mi: 2Gi\n-             memory: 2Gi\n-             afxdp/e2e: '1'\n-\n-  For further reference please use the `pod.yaml`_\n-\n-  .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/pod-1c1d.yaml\n-\n-* Run DPDK with a command like the following:\n-\n-  .. code-block:: console\n-\n-     kubectl exec -i <Pod name> --container <containers name> -- \\\n-           /<Path>/dpdk-testpmd -l 0,1 --no-pci \\\n-           --vdev=net_af_xdp0,use_cni=1,iface=<interface name> \\\n-           -- --no-mlockall --in-memory\n-\n-For further reference please use the `e2e`_ test case in `AF_XDP Plugin for Kubernetes`_\n-\n-  .. _e2e: https://github.com/intel/afxdp-plugins-for-kubernetes/tree/v0.0.2/test/e2e\ndiff --git a/doc/guides/howto/af_xdp_dp.rst b/doc/guides/howto/af_xdp_dp.rst\nnew file mode 100644\nindex 0000000000..7166d904bd\n--- /dev/null\n+++ b/doc/guides/howto/af_xdp_dp.rst\n@@ -0,0 +1,299 @@\n+.. SPDX-License-Identifier: BSD-3-Clause\n+   Copyright(c) 2023 Intel Corporation.\n+\n+Using the AF_XDP driver in Kubernetes\n+=====================================\n+\n+Introduction\n+------------\n+\n+Two infrastructure components are needed in order to provision a pod that is\n+using the AF_XDP PMD in Kubernetes:\n+\n+1. AF_XDP Device Plugin (DP).\n+2. AF_XDP Container Network Interface (CNI) binary.\n+\n+Both of these components are available through the `AF_XDP Device Plugin for Kubernetes`_\n+repository.\n+\n+The AF_XDP DP provisions and advertises networking interfaces to Kubernetes,\n+while the CNI configures and plumbs network interfaces for the Pod.\n+\n+This document explains how to use the `AF_XDP Device Plugin for Kubernetes`_ with\n+a DPDK application using the :doc:`../nics/af_xdp`.\n+\n+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes\n+\n+Background\n+----------\n+\n+The standard :doc:`../nics/af_xdp` initialization process involves loading an eBPF program\n+onto the kernel netdev to be used by the PMD.\n+This operation requires root or escalated Linux privileges\n+and thus prevents the PMD from working in an unprivileged container.\n+The AF_XDP Device Plugin handles this situation\n+by managing the eBPF program(s) on behalf of the Pod, outside of the pod context.\n+\n+At a technical level the AF_XDP Device Plugin opens a Unix Domain Socket (UDS) and listens for a client\n+to make requests over that socket.\n+A DPDK application acting as a client connects and initiates a configuration \"handshake\".\n+After some validation on the Device Plugin side, the client receives a file descriptor which points to the XSKMAP\n+associated with the loaded eBPF program.\n+The XSKMAP is an eBPF map of AF_XDP sockets (XSK).\n+The client can then proceed with creating an AF_XDP socket\n+and inserting that socket into the XSKMAP pointed to by the descriptor.\n+\n+The EAL vdev argument ``use_cni`` is used to indicate that the user wishes\n+to run the PMD in unprivileged mode and to receive the XSKMAP file descriptor\n+from the CNI.\n+When this flag is set,\n+the ``XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD`` libbpf flag\n+should be used when creating the socket\n+to instruct libbpf not to load the default libbpf program on the netdev.\n+Instead the loading is handled by the AF_XDP Device Plugin.\n+\n+Limitations\n+-----------\n+\n+For DPDK versions <= v23.11 the Unix Domain Socket file path appears in\n+the pod at \"/tmp/afxdp.sock\". The handshake implementation in the AF_XDP PMD\n+is only compatible with the AF_XDP Device Plugin up to commit id `38317c2`_\n+and the pod is limited to a single netdev.\n+\n+.. note::\n+\n+    DPDK AF_XDP PMD <= v23.11 will not work with the latest version of the\n+    AF_XDP Device Plugin.\n+\n+The issue is if a single pod requests different devices from different pools it\n+results in multiple UDS servers serving the pod with the container using only a\n+single mount point for their UDS as ``/tmp/afxdp.sock``. This means that at best one\n+device might be able to complete the handshake. This has been fixed in the AF_XDP\n+Device Plugin so that the mount point in the pods for the UDS appear at\n+``/tmp/afxdp_dp/<netdev>/afxdp.sock``. Later versions of DPDK fix this hardcoded path\n+in the PMD alongside the ``use_cni`` parameter.\n+\n+.. _38317c2: https://github.com/intel/afxdp-plugins-for-kubernetes/commit/38317c256b5c7dfb39e013a0f76010c2ded03669\n+\n+\n+Prerequisites\n+-------------\n+\n+Device Plugin and DPDK container prerequisites:\n+\n+* Create a DPDK container image.\n+\n+* Set up the device plugin and prepare the Pod Spec as described in\n+  the instructions for `AF_XDP Device Plugin for Kubernetes`_.\n+\n+* The Docker image should contain the libbpf and libxdp libraries,\n+  which are dependencies for AF_XDP,\n+  and should include support for the ``ethtool`` command.\n+\n+* The Pod should have enabled the capabilities ``CAP_NET_RAW`` for\n+  AF_XDP socket creation, ``IPC_LOCK`` for umem creation and\n+  ``CAP_BPF`` (for Kernel < 5.19) along with support for hugepages.\n+\n+  .. note::\n+\n+    For Kernel versions < 5.19, all BPF sys calls required CAP_BPF, to access maps shared\n+    between the eBFP program and the userspace program. Kernels >= 5.19, only requires CAP_BPF\n+    for map creation (BPF_MAP_CREATE) and loading programs (BPF_PROG_LOAD).\n+\n+* Increase locked memory limit so containers have enough memory for packet buffers.\n+  For example:\n+\n+  .. code-block:: console\n+\n+     cat << EOF | sudo tee /etc/systemd/system/containerd.service.d/limits.conf\n+     [Service]\n+     LimitMEMLOCK=infinity\n+     EOF\n+\n+* dpdk-testpmd application should have AF_XDP feature enabled.\n+\n+  For further information see the docs for the: :doc:`../../nics/af_xdp`.\n+\n+\n+Example\n+-------\n+\n+Build a DPDK container image (using Docker)\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+1. Create a Dockerfile (should be placed in top level DPDK directory):\n+\n+  .. code-block:: console\n+\n+    FROM fedora:38\n+\n+    # Setup container to build DPDK applications\n+    RUN dnf -y upgrade && dnf -y install \\\n+        libbsd-devel \\\n+        numactl-libs \\\n+        libbpf-devel \\\n+        libbpf \\\n+        meson \\\n+        ninja-build \\\n+        libxdp-devel \\\n+        libxdp \\\n+        numactl-devel \\\n+        python3-pyelftools \\\n+        python38 \\\n+        iproute\n+    RUN dnf groupinstall -y 'Development Tools'\n+\n+    # Create DPDK dir and copy over sources\n+    # Create DPDK dir and copy over sources\n+    COPY ./ /dpdk\n+    WORKDIR /dpdk\n+\n+    # Build DPDK\n+    RUN meson setup build\n+    RUN ninja -C build\n+\n+2. Build a DPDK container image (using Docker)\n+\n+  .. code-block:: console\n+\n+    # docker build -t dpdk -f Dockerfile\n+\n+Run dpdk-testpmd with the AF_XDP Device Plugin + CNI\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+* Clone the AF_XDP Device plugin and CNI\n+\n+  .. code-block:: console\n+\n+     # git clone https://github.com/intel/afxdp-plugins-for-kubernetes.git\n+\n+  .. note::\n+\n+    Ensure you have the AF_XDP Device Plugin + CNI prerequisites installed.\n+\n+* Build the AF_XDP Device plugin and CNI\n+\n+  .. code-block:: console\n+\n+     # cd afxdp-plugins-for-kubernetes/\n+     # make image\n+\n+* Make sure to modify the image used by the `daemonset.yml`_ file in the deployments directory with\n+  the following configuration:\n+\n+   .. _daemonset.yml : https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/deployments/daemonset.yml\n+\n+  .. code-block:: yaml\n+\n+    image: afxdp-device-plugin:latest\n+\n+  .. note::\n+\n+    This will select the AF_XDP DP image that was built locally. Detailed configuration\n+    options can be found in the AF_XDP Device Plugin `readme`_ .\n+\n+  .. _readme: https://github.com/intel/afxdp-plugins-for-kubernetes#readme\n+\n+* Deploy the AF_XDP Device Plugin and CNI\n+\n+  .. code-block:: console\n+\n+    # kubectl create -f deployments/daemonset.yml\n+\n+* Create the Network Attachment definition\n+\n+  .. code-block:: console\n+\n+     # kubectl create -f nad.yaml\n+\n+  Sample nad.yml\n+\n+  .. code-block:: yaml\n+\n+    apiVersion: \"k8s.cni.cncf.io/v1\"\n+    kind: NetworkAttachmentDefinition\n+    metadata:\n+      name: afxdp-network\n+      annotations:\n+        k8s.v1.cni.cncf.io/resourceName: afxdp/myPool\n+    spec:\n+      config: '{\n+          \"cniVersion\": \"0.3.0\",\n+          \"type\": \"afxdp\",\n+          \"mode\": \"primary\",\n+          \"logFile\": \"afxdp-cni.log\",\n+          \"logLevel\": \"debug\",\n+          \"ethtoolCmds\" : [\"-N -device- rx-flow-hash udp4 fn\",\n+                           \"-N -device- flow-type udp4 dst-port 2152 action 22\"\n+                        ],\n+          \"ipam\": {\n+            \"type\": \"host-local\",\n+            \"subnet\": \"192.168.1.0/24\",\n+            \"rangeStart\": \"192.168.1.200\",\n+            \"rangeEnd\": \"192.168.1.220\",\n+            \"routes\": [\n+              { \"dst\": \"0.0.0.0/0\" }\n+            ],\n+            \"gateway\": \"192.168.1.1\"\n+          }\n+        }'\n+\n+  For further reference please use the example provided by the AF_XDP DP `nad.yaml`_\n+\n+  .. _nad.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/network-attachment-definition.yaml\n+\n+* Run the Pod\n+\n+  .. code-block:: console\n+\n+     # kubectl create -f pod.yaml\n+\n+  Sample pod.yaml:\n+\n+  .. code-block:: yaml\n+\n+    apiVersion: v1\n+    kind: Pod\n+    metadata:\n+     name: dpdk\n+     annotations:\n+       k8s.v1.cni.cncf.io/networks: afxdp-network\n+    spec:\n+      containers:\n+      - name: testpmd\n+        image: dpdk:latest\n+        command: [\"tail\", \"-f\", \"/dev/null\"]\n+        securityContext:\n+          capabilities:\n+            add:\n+              - NET_RAW\n+              - IPC_LOCK\n+        resources:\n+          requests:\n+            afxdp/myPool: '1'\n+          limits:\n+            hugepages-1Gi: 2Gi\n+            cpu: 2\n+            memory: 256Mi\n+            afxdp/myPool: '1'\n+        volumeMounts:\n+        - name: hugepages\n+          mountPath: /dev/hugepages\n+      volumes:\n+      - name: hugepages\n+        emptyDir:\n+          medium: HugePages\n+\n+  For further reference please use the `pod.yaml`_\n+\n+  .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/main/examples/pod-spec.yaml\n+\n+* Run DPDK with a command like the following:\n+\n+  .. code-block:: console\n+\n+     kubectl exec -i <Pod name> --container <containers name> -- \\\n+           /<Path>/dpdk-testpmd -l 0,1 --no-pci \\\n+           --vdev=net_af_xdp0,use_cni=1,iface=<interface name> \\\n+           --no-mlockall --in-memory \\\n+           -- -i --a --nb-cores=2 --rxq=1 --txq=1 --forward-mode=macswap;\ndiff --git a/doc/guides/howto/index.rst b/doc/guides/howto/index.rst\nindex 71a3381c36..a7692e8a97 100644\n--- a/doc/guides/howto/index.rst\n+++ b/doc/guides/howto/index.rst\n@@ -8,7 +8,7 @@ HowTo Guides\n     :maxdepth: 2\n     :numbered:\n \n-    af_xdp_cni\n+    af_xdp_dp\n     lm_bond_virtio_sriov\n     lm_virtio_vhost_user\n     flow_bifurcation\ndiff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst\nindex 1932525d4d..4dd9c73742 100644\n--- a/doc/guides/nics/af_xdp.rst\n+++ b/doc/guides/nics/af_xdp.rst\n@@ -155,9 +155,9 @@ use_cni\n ~~~~~~~\n \n The EAL vdev argument ``use_cni`` is used to indicate that the user wishes to\n-enable the `AF_XDP Plugin for Kubernetes`_ within a DPDK application.\n+enable the `AF_XDP Device Plugin for Kubernetes`_ with a DPDK application/pod.\n \n-.. _AF_XDP Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes\n+.. _AF_XDP Device Plugin for Kubernetes: https://github.com/intel/afxdp-plugins-for-kubernetes\n \n .. code-block:: console\n \n",
    "prefixes": [
        "v11",
        "1/3"
    ]
}