get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134810,
    "url": "http://patchwork.dpdk.org/api/patches/134810/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231204103101.2124374-1-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": "<20231204103101.2124374-1-mtahhan@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231204103101.2124374-1-mtahhan@redhat.com",
    "date": "2023-12-04T10:31:01",
    "name": "[v2] net/af_xdp: enable a sock path alongside use_cni",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "906114984da84dc5762150c0613b6db721cba525",
    "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/20231204103101.2124374-1-mtahhan@redhat.com/mbox/",
    "series": [
        {
            "id": 30442,
            "url": "http://patchwork.dpdk.org/api/series/30442/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30442",
            "date": "2023-12-04T10:31:01",
            "name": "[v2] net/af_xdp: enable a sock path alongside use_cni",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/30442/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/134810/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/134810/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 EDEBF4366A;\n\tMon,  4 Dec 2023 11:31:07 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DC98940DDE;\n\tMon,  4 Dec 2023 11:31:07 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id CAC9440DD8\n for <dev@dpdk.org>; Mon,  4 Dec 2023 11:31:06 +0100 (CET)",
            "from mail-qk1-f199.google.com (mail-qk1-f199.google.com\n [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-648-P57opxz5O46dmU_UdsnkGA-1; Mon, 04 Dec 2023 05:31:05 -0500",
            "by mail-qk1-f199.google.com with SMTP id\n af79cd13be357-77d7b2e8623so643438185a.0\n for <dev@dpdk.org>; Mon, 04 Dec 2023 02:31:05 -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 qh13-20020a05620a668d00b0077d85d22e89sm4131287qkn.63.2023.12.04.02.31.03\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 04 Dec 2023 02:31:04 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1701685866;\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 bh=AmdkCgTPQaE22e7PvWQ580M7edLakH6qvLG0zz6BO14=;\n b=WmjkLgqsdbkvucrEBJCTfdkpZXQTN29riTTBFtYdIfrQy80RjhSpyZYXEpue6puZWFDBww\n TmcsNGSpUtg9pkBXfbbhY56cmYZhPHj4hXWXSyQHki9oR3cEvaTfunmZieHBEpBqQ0Vf0K\n GaKohl0EItezw267WExu04yxHKPTXuM=",
        "X-MC-Unique": "P57opxz5O46dmU_UdsnkGA-1",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1701685865; x=1702290665;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=AmdkCgTPQaE22e7PvWQ580M7edLakH6qvLG0zz6BO14=;\n b=Pa8ddc3lQKUwSxrLvmKz0ungN8rc9eW5nKXXgDwy26yIx5huvyzckOT/srMSx17Ofj\n KV3NDy5aTUYA/4fZBl4fQ6YfsbIIFaD1mwh1+MFbj+WD+EFxRNac+OBGxdZ9zdiSZDw/\n Eq/8r+Lx5lf+bqTQe2OU/Uak76UBzZY0Vk1s2SuV1fQMtu0ilo0Mv2SLFlAcHwsoU1Bp\n v5kimgkJVmP8JIV0Qzy4pttSr/CY7CYCm3SQRtezfdP5oN61oqIKWPjdbXu0P2ibhJcY\n DiFr/ExpmgcsVxuV30MsJVqHqratxHWjVqCvMd9utWvQbdewJ9Iqs9GSOCql7hMxCcCK\n faVQ==",
        "X-Gm-Message-State": "AOJu0YxMqh7VnUSvytnRFxdsHpcRkAD/yim31de20Dz5PmNeiFhsYMYo\n WrwpMNrges9o4p1kJsX2uvS3KFYqTXtN4UzOj7RVT1L51b+44xBhionauesTbHTCiM5pxr75AA7\n 6kGE=",
        "X-Received": [
            "by 2002:a05:620a:d55:b0:77e:fba3:759e with SMTP id\n o21-20020a05620a0d5500b0077efba3759emr3423694qkl.150.1701685864822;\n Mon, 04 Dec 2023 02:31:04 -0800 (PST)",
            "by 2002:a05:620a:d55:b0:77e:fba3:759e with SMTP id\n o21-20020a05620a0d5500b0077efba3759emr3423678qkl.150.1701685864430;\n Mon, 04 Dec 2023 02:31:04 -0800 (PST)"
        ],
        "X-Google-Smtp-Source": "\n AGHT+IHi6qpTgR9IFjzNU2QByafs+0xBU5r1DdsaLdAwyHe+ENbduLoG7amy6h+6RbxWKLQUPvnhjQ==",
        "From": "Maryam Tahhan <mtahhan@redhat.com>",
        "To": "ferruh.yigit@amd.com, stephen@networkplumber.org, lihuisong@huawei.com,\n fengchengwen@huawei.com, liuyonglong@huawei.com,\n shibin.koikkara.reeny@intel.com",
        "Cc": "dev@dpdk.org,\n\tMaryam Tahhan <mtahhan@redhat.com>",
        "Subject": "[v2] net/af_xdp: enable a sock path alongside use_cni",
        "Date": "Mon,  4 Dec 2023 05:31:01 -0500",
        "Message-ID": "<20231204103101.2124374-1-mtahhan@redhat.com>",
        "X-Mailer": "git-send-email 2.41.0",
        "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": "With the original 'use_cni' implementation, (using a\nhardcoded socket rather than a configurable one),\nif a single pod is requesting multiple net devices\nand these devices are from different pools, then\nthe container attempts to mount all the netdev UDSes\nin the pod as /tmp/afxdp.sock. Which means that at best\nonly 1 netdev will handshake correctly with the AF_XDP\nDP. This patch addresses this by making the socket\nparameter configurable alongside the 'use_cni' param.\nTested with the AF_XDP DP CNI PR 81.\n\nv2:\n* Rename sock_path to uds_path.\n* Update documentation to reflect when CAP_BPF is needed.\n* Fix testpmd arguments in the provided example for Pods.\n* Use AF_XDP API to update the xskmap entry.\n\nSigned-off-by: Maryam Tahhan <mtahhan@redhat.com>\n---\n doc/guides/howto/af_xdp_cni.rst     | 24 ++++++-----\n drivers/net/af_xdp/rte_eth_af_xdp.c | 62 ++++++++++++++++++-----------\n 2 files changed, 54 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/doc/guides/howto/af_xdp_cni.rst b/doc/guides/howto/af_xdp_cni.rst\nindex a1a6d5b99c..7829526b40 100644\n--- a/doc/guides/howto/af_xdp_cni.rst\n+++ b/doc/guides/howto/af_xdp_cni.rst\n@@ -38,9 +38,10 @@ 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+The EAL vdev arguments ``use_cni`` and ``uds_path`` are used to indicate that\n+the user wishes to run the PMD in unprivileged mode and to receive the XSKMAP\n+file descriptor from the CNI.\n+\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@@ -49,7 +50,7 @@ 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+   The Unix Domain Socket file path appears to the end user at \"/tmp/afxdp_dp/<netdev>/afxdp.sock\".\n \n \n Prerequisites\n@@ -223,8 +224,7 @@ Howto run dpdk-testpmd with CNI plugin:\n          securityContext:\n           capabilities:\n              add:\n-               - CAP_NET_RAW\n-               - CAP_BPF\n+               - NET_RAW\n          resources:\n            requests:\n              hugepages-2Mi: 2Gi\n@@ -239,14 +239,20 @@ Howto run dpdk-testpmd with CNI plugin:\n \n   .. _pod.yaml: https://github.com/intel/afxdp-plugins-for-kubernetes/blob/v0.0.2/test/e2e/pod-1c1d.yaml\n \n+.. note::\n+\n+   For Kernel versions older than 5.19 `CAP_BPF` is also required in\n+   the container capabilities stanza.\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+           /<Path>/dpdk-testpmd -l 0-2 --no-pci --main-lcore=2 \\\n+           --vdev net_af_xdp0,iface=<interface name>,use_cni=1,uds_path=/tmp/afxdp_dp/<interface name>/afxdp.sock \\\n+           --vdev net_af_xdp1,iface=e<interface name>,use_cni=1,uds_path=/tmp/afxdp_dp/<interface name>/afxdp.sock \\\n+           -- -i --a --nb-cores=2 --rxq=1 --txq=1 --forward-mode=macswap;\n \n For further reference please use the `e2e`_ test case in `AF_XDP Plugin for Kubernetes`_\n \ndiff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex 353c8688ec..505ed6cf1e 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -88,7 +88,6 @@ RTE_LOG_REGISTER_DEFAULT(af_xdp_logtype, NOTICE);\n #define UDS_MAX_CMD_LEN\t\t\t64\n #define UDS_MAX_CMD_RESP\t\t128\n #define UDS_XSK_MAP_FD_MSG\t\t\"/xsk_map_fd\"\n-#define UDS_SOCK\t\t\t\"/tmp/afxdp.sock\"\n #define UDS_CONNECT_MSG\t\t\t\"/connect\"\n #define UDS_HOST_OK_MSG\t\t\t\"/host_ok\"\n #define UDS_HOST_NAK_MSG\t\t\"/host_nak\"\n@@ -171,6 +170,7 @@ struct pmd_internals {\n \tbool custom_prog_configured;\n \tbool force_copy;\n \tbool use_cni;\n+\tchar uds_path[PATH_MAX];\n \tstruct bpf_map *map;\n \n \tstruct rte_ether_addr eth_addr;\n@@ -191,6 +191,7 @@ struct pmd_process_private {\n #define ETH_AF_XDP_BUDGET_ARG\t\t\t\"busy_budget\"\n #define ETH_AF_XDP_FORCE_COPY_ARG\t\t\"force_copy\"\n #define ETH_AF_XDP_USE_CNI_ARG\t\t\t\"use_cni\"\n+#define ETH_AF_XDP_USE_CNI_UDS_PATH_ARG\t\"uds_path\"\n \n static const char * const valid_arguments[] = {\n \tETH_AF_XDP_IFACE_ARG,\n@@ -201,6 +202,7 @@ static const char * const valid_arguments[] = {\n \tETH_AF_XDP_BUDGET_ARG,\n \tETH_AF_XDP_FORCE_COPY_ARG,\n \tETH_AF_XDP_USE_CNI_ARG,\n+\tETH_AF_XDP_USE_CNI_UDS_PATH_ARG,\n \tNULL\n };\n \n@@ -1351,7 +1353,7 @@ configure_preferred_busy_poll(struct pkt_rx_queue *rxq)\n }\n \n static int\n-init_uds_sock(struct sockaddr_un *server)\n+init_uds_sock(struct sockaddr_un *server, const char *uds_path)\n {\n \tint sock;\n \n@@ -1362,7 +1364,7 @@ init_uds_sock(struct sockaddr_un *server)\n \t}\n \n \tserver->sun_family = AF_UNIX;\n-\tstrlcpy(server->sun_path, UDS_SOCK, sizeof(server->sun_path));\n+\tstrlcpy(server->sun_path, uds_path, sizeof(server->sun_path));\n \n \tif (connect(sock, (struct sockaddr *)server, sizeof(struct sockaddr_un)) < 0) {\n \t\tclose(sock);\n@@ -1382,7 +1384,7 @@ struct msg_internal {\n };\n \n static int\n-send_msg(int sock, char *request, int *fd)\n+send_msg(int sock, char *request, int *fd, const char *uds_path)\n {\n \tint snd;\n \tstruct iovec iov;\n@@ -1393,7 +1395,7 @@ send_msg(int sock, char *request, int *fd)\n \n \tmemset(&dst, 0, sizeof(dst));\n \tdst.sun_family = AF_UNIX;\n-\tstrlcpy(dst.sun_path, UDS_SOCK, sizeof(dst.sun_path));\n+\tstrlcpy(dst.sun_path, uds_path, sizeof(dst.sun_path));\n \n \t/* Initialize message header structure */\n \tmemset(&msgh, 0, sizeof(msgh));\n@@ -1471,7 +1473,7 @@ read_msg(int sock, char *response, struct sockaddr_un *s, int *fd)\n \n static int\n make_request_cni(int sock, struct sockaddr_un *server, char *request,\n-\t\t int *req_fd, char *response, int *out_fd)\n+\t\t int *req_fd, char *response, int *out_fd, const char *uds_path)\n {\n \tint rval;\n \n@@ -1483,7 +1485,7 @@ make_request_cni(int sock, struct sockaddr_un *server, char *request,\n \tif (req_fd == NULL)\n \t\trval = write(sock, request, strlen(request));\n \telse\n-\t\trval = send_msg(sock, request, req_fd);\n+\t\trval = send_msg(sock, request, req_fd, uds_path);\n \n \tif (rval < 0) {\n \t\tAF_XDP_LOG(ERR, \"Write error %s\\n\", strerror(errno));\n@@ -1507,7 +1509,7 @@ check_response(char *response, char *exp_resp, long size)\n }\n \n static int\n-get_cni_fd(char *if_name)\n+get_cni_fd(char *if_name, const char *uds_path)\n {\n \tchar request[UDS_MAX_CMD_LEN], response[UDS_MAX_CMD_RESP];\n \tchar hostname[MAX_LONG_OPT_SZ], exp_resp[UDS_MAX_CMD_RESP];\n@@ -1520,14 +1522,14 @@ get_cni_fd(char *if_name)\n \t\treturn -1;\n \n \tmemset(&server, 0, sizeof(server));\n-\tsock = init_uds_sock(&server);\n+\tsock = init_uds_sock(&server, uds_path);\n \tif (sock < 0)\n \t\treturn -1;\n \n \t/* Initiates handshake to CNI send: /connect,hostname */\n \tsnprintf(request, sizeof(request), \"%s,%s\", UDS_CONNECT_MSG, hostname);\n \tmemset(response, 0, sizeof(response));\n-\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {\n+\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd, uds_path) < 0) {\n \t\tAF_XDP_LOG(ERR, \"Error in processing cmd [%s]\\n\", request);\n \t\tgoto err_close;\n \t}\n@@ -1541,7 +1543,7 @@ get_cni_fd(char *if_name)\n \t/* Request for \"/version\" */\n \tstrlcpy(request, UDS_VERSION_MSG, UDS_MAX_CMD_LEN);\n \tmemset(response, 0, sizeof(response));\n-\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {\n+\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd, uds_path) < 0) {\n \t\tAF_XDP_LOG(ERR, \"Error in processing cmd [%s]\\n\", request);\n \t\tgoto err_close;\n \t}\n@@ -1549,7 +1551,7 @@ get_cni_fd(char *if_name)\n \t/* Request for file descriptor for netdev name*/\n \tsnprintf(request, sizeof(request), \"%s,%s\", UDS_XSK_MAP_FD_MSG, if_name);\n \tmemset(response, 0, sizeof(response));\n-\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {\n+\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd, uds_path) < 0) {\n \t\tAF_XDP_LOG(ERR, \"Error in processing cmd [%s]\\n\", request);\n \t\tgoto err_close;\n \t}\n@@ -1571,7 +1573,7 @@ get_cni_fd(char *if_name)\n \t/* Initiate close connection */\n \tstrlcpy(request, UDS_FIN_MSG, UDS_MAX_CMD_LEN);\n \tmemset(response, 0, sizeof(response));\n-\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd) < 0) {\n+\tif (make_request_cni(sock, &server, request, NULL, response, &out_fd, uds_path) < 0) {\n \t\tAF_XDP_LOG(ERR, \"Error in processing cmd [%s]\\n\", request);\n \t\tgoto err_close;\n \t}\n@@ -1695,17 +1697,16 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,\n \t}\n \n \tif (internals->use_cni) {\n-\t\tint err, fd, map_fd;\n+\t\tint err, map_fd;\n \n \t\t/* get socket fd from CNI plugin */\n-\t\tmap_fd = get_cni_fd(internals->if_name);\n+\t\tmap_fd = get_cni_fd(internals->if_name, internals->uds_path);\n \t\tif (map_fd < 0) {\n \t\t\tAF_XDP_LOG(ERR, \"Failed to receive CNI plugin fd\\n\");\n \t\t\tgoto out_xsk;\n \t\t}\n-\t\t/* get socket fd */\n-\t\tfd = xsk_socket__fd(rxq->xsk);\n-\t\terr = bpf_map_update_elem(map_fd, &rxq->xsk_queue_idx, &fd, 0);\n+\n+\t\terr = xsk_socket__update_xskmap(rxq->xsk, map_fd);\n \t\tif (err) {\n \t\t\tAF_XDP_LOG(ERR, \"Failed to insert unprivileged xsk in map.\\n\");\n \t\t\tgoto out_xsk;\n@@ -2023,7 +2024,8 @@ xdp_get_channels_info(const char *if_name, int *max_queues,\n static int\n parse_parameters(struct rte_kvargs *kvlist, char *if_name, int *start_queue,\n \t\t int *queue_cnt, int *shared_umem, char *prog_path,\n-\t\t int *busy_budget, int *force_copy, int *use_cni)\n+\t\t int *busy_budget, int *force_copy, int *use_cni,\n+\t\t char *uds_path)\n {\n \tint ret;\n \n@@ -2069,6 +2071,11 @@ parse_parameters(struct rte_kvargs *kvlist, char *if_name, int *start_queue,\n \tif (ret < 0)\n \t\tgoto free_kvlist;\n \n+\tret = rte_kvargs_process(kvlist, ETH_AF_XDP_USE_CNI_UDS_PATH_ARG,\n+\t\t\t\t &parse_prog_arg, uds_path);\n+\tif (ret < 0)\n+\t\tgoto free_kvlist;\n+\n free_kvlist:\n \trte_kvargs_free(kvlist);\n \treturn ret;\n@@ -2108,7 +2115,7 @@ static struct rte_eth_dev *\n init_internals(struct rte_vdev_device *dev, const char *if_name,\n \t       int start_queue_idx, int queue_cnt, int shared_umem,\n \t       const char *prog_path, int busy_budget, int force_copy,\n-\t       int use_cni)\n+\t\t   int use_cni, const char *uds_path)\n {\n \tconst char *name = rte_vdev_device_name(dev);\n \tconst unsigned int numa_node = dev->device.numa_node;\n@@ -2138,6 +2145,7 @@ init_internals(struct rte_vdev_device *dev, const char *if_name,\n \tinternals->shared_umem = shared_umem;\n \tinternals->force_copy = force_copy;\n \tinternals->use_cni = use_cni;\n+\tstrlcpy(internals->uds_path, uds_path, PATH_MAX);\n \n \tif (xdp_get_channels_info(if_name, &internals->max_queue_cnt,\n \t\t\t\t  &internals->combined_queue_cnt)) {\n@@ -2328,6 +2336,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)\n \tint busy_budget = -1, ret;\n \tint force_copy = 0;\n \tint use_cni = 0;\n+\tchar uds_path[PATH_MAX] = {'\\0'};\n \tstruct rte_eth_dev *eth_dev = NULL;\n \tconst char *name = rte_vdev_device_name(dev);\n \n@@ -2370,7 +2379,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)\n \n \tif (parse_parameters(kvlist, if_name, &xsk_start_queue_idx,\n \t\t\t     &xsk_queue_cnt, &shared_umem, prog_path,\n-\t\t\t     &busy_budget, &force_copy, &use_cni) < 0) {\n+\t\t\t\t &busy_budget, &force_copy, &use_cni, uds_path) < 0) {\n \t\tAF_XDP_LOG(ERR, \"Invalid kvargs value\\n\");\n \t\treturn -EINVAL;\n \t}\n@@ -2387,6 +2396,12 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)\n \t\t\treturn -EINVAL;\n \t}\n \n+\tif (use_cni && !strnlen(uds_path, PATH_MAX)) {\n+\t\tAF_XDP_LOG(ERR, \"When '%s' parameter is used, '%s' must also be provided\\n\",\n+\t\t\tETH_AF_XDP_USE_CNI_ARG, ETH_AF_XDP_USE_CNI_UDS_PATH_ARG);\n+\t\t\treturn -EINVAL;\n+\t}\n+\n \tif (strlen(if_name) == 0) {\n \t\tAF_XDP_LOG(ERR, \"Network interface must be specified\\n\");\n \t\treturn -EINVAL;\n@@ -2410,7 +2425,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)\n \n \teth_dev = init_internals(dev, if_name, xsk_start_queue_idx,\n \t\t\t\t xsk_queue_cnt, shared_umem, prog_path,\n-\t\t\t\t busy_budget, force_copy, use_cni);\n+\t\t\t\t busy_budget, force_copy, use_cni, uds_path);\n \tif (eth_dev == NULL) {\n \t\tAF_XDP_LOG(ERR, \"Failed to init internals\\n\");\n \t\treturn -1;\n@@ -2471,4 +2486,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_xdp,\n \t\t\t      \"xdp_prog=<string> \"\n \t\t\t      \"busy_budget=<int> \"\n \t\t\t      \"force_copy=<int> \"\n-\t\t\t      \"use_cni=<int> \");\n+\t\t\t      \"use_cni=<int> \"\n+\t\t\t      \"uds_path=<string> \");\n",
    "prefixes": [
        "v2"
    ]
}