From patchwork Thu Apr 4 13:24:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maryam Tahhan X-Patchwork-Id: 836 Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id 1A15643DFA; Thu, 4 Apr 2024 15:25:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1A1540268; Thu, 4 Apr 2024 15:24:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 309144025D for ; Thu, 4 Apr 2024 15:24:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712237097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6y6M1Gn0Tv3otSJUulvwF/UZOTQX6PNbXXdBKAsYyCk=; b=Gfa7BG9d262PCe84f4ZVBvB1KRfneHHB74CIDqLoXqqrYQZP1Pi3X60S6i5IBtY8BvDWRw 1ulA0N4VIf9PStxABEb2xLHrs6jxIVTHOhZH2giXZ/jOL3LEle7IegefCrIuMnxzR/QwKn 6S3jh26LWMx+L3xG9QCIuohpSMUFO8o= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-rb80Dj02P5aPHd7xo725Rg-1; Thu, 04 Apr 2024 09:24:56 -0400 X-MC-Unique: rb80Dj02P5aPHd7xo725Rg-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-698f85bf400so8134426d6.3 for ; Thu, 04 Apr 2024 06:24:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712237095; x=1712841895; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6y6M1Gn0Tv3otSJUulvwF/UZOTQX6PNbXXdBKAsYyCk=; b=rZFY0+W9D07/OXg9Z3E8dda8JUqv9JHlH1J5LOPd4tSddCDXN5xdbsYpSZlAfy8Hxw oxtlcSXyt3vpgrgNlIf0J9Q+2iB2JUljbycunfiuyFzWbFdgUFRlzliutK7POuQu6Lkj LJjnIqafWpcrs7BpjWjLdL7NA7CUJPV1iINDQCFEcCJTAK5pDiJhiF25Ia+zkxb4odAm hrV6YWonlRXnDoe5WINfZvoNA8aXLJrq48hi/ebtB1A3IGVNdaX19VjdBNadtGz2ZDJr 0u3vmrOvZny7so0jzLekazZKzRGqSH8qTrP7MjhMAMpwocQWDedmSRomijksS52J1cLa qQ/A== X-Gm-Message-State: AOJu0YxmUa1C7m90EDH7OMgJs6bU70cDjilBMnNnwXWOH0LjwQ0d+U8o tK2QmRpDAixpXglgldzTWVJZxpOEkwP7MaVCmLuhbqp+jsZlhXjZvSl4RAIs1MngcG5i9Q3xFV4 RIliSXsiJSdId7Of9qS9n69AvjAPvTS3An3at8jBs X-Received: by 2002:a0c:aa14:0:b0:699:39fd:bbcc with SMTP id d20-20020a0caa14000000b0069939fdbbccmr352086qvb.26.1712237095572; Thu, 04 Apr 2024 06:24:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwTW1XIPj72rTvHxrp4cAcSUqdj1MOxRlcc72xAtdOAbKgrFe92GNy8Apqpxu1IM4qSfraBw== X-Received: by 2002:a0c:aa14:0:b0:699:39fd:bbcc with SMTP id d20-20020a0caa14000000b0069939fdbbccmr352069qvb.26.1712237095218; Thu, 04 Apr 2024 06:24:55 -0700 (PDT) Received: from nfvsdn-06.redhat.com (nat-pool-232-132.redhat.com. [66.187.232.132]) by smtp.gmail.com with ESMTPSA id r9-20020a056214124900b00698f0a22f5csm6398700qvv.130.2024.04.04.06.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 06:24:54 -0700 (PDT) From: Maryam Tahhan To: ferruh.yigit@amd.com, stephen@networkplumber.org, lihuisong@huawei.com, fengchengwen@huawei.com, liuyonglong@huawei.com, david.marchand@redhat.com, shibin.koikkara.reeny@intel.com, ciara.loftus@intel.com Cc: dev@dpdk.org, Maryam Tahhan Subject: [v12 0/3] net/af_xdp: fix multi interface support for K8s Date: Thu, 4 Apr 2024 09:24:47 -0400 Message-ID: <20240404132452.1186627-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 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The original `use_cni` implementation was limited to supporting only a single netdev in a DPDK pod. This patchset aims to fix this limitation transparently to the end user. It will also enable compatibility with the latest AF_XDP Device Plugin. Signed-off-by: Maryam Tahhan --- v12: * Ensure backwards compability with libbpf versions that don't support xsk_socket__update_xskmap(). v11: * Fixed up typos picked up by checkpatch. v10: * Add UDS acronym * Update `use_cni` in docs with ``use_cni`` * Remove reference to limitations and simply document behaviour before and after DPDK 23.11. v9: * Fixup checkpatch issues. v8: * Go back to using `use_cni` vdev argument * Introduce `use_map_pinning` vdev param. * Rename `uds_path` to `dp_path` so that it can be used with map pinning as well as `use_cni`. * Set `dp_path` internally in the AF_XDP PMD if it's not configured by the user. * Clean up the original `use_cni` documentation separately to coding changes. v7: * Give a more descriptive commit msg headline. * Fixup typos in documentation. v6: * Add link to PR 81 in commit message * Add release notes changes to this patchset v5: * Fix alignment for ETH_AF_XDP_USE_DP_UDS_PATH_ARG * Remove use_cni references in af_xdp.rst v4: * Rename af_xdp_cni.rst to af_xdp_dp.rst * Removed all incorrect references to CNI throughout af_xdp PMD file. * Fixed Typos in af_xdp_dp.rst v3: * Remove `use_cni` vdev argument as it's no longer needed. * Update incorrect CNI references for the AF_XDP DP in the documentation. * Update the documentation to run a simple example with the AF_XDP DP plugin in K8s. v2: * Rename sock_path to uds_path. * Update documentation to reflect when CAP_BPF is needed. * Fix testpmd arguments in the provided example for Pods. * Use AF_XDP API to update the xskmap entry. Maryam Tahhan (3): docs: AF_XDP Device Plugin net/af_xdp: fix multi interface support for K8s net/af_xdp: support AF_XDP DP pinned maps doc/guides/howto/af_xdp_cni.rst | 253 ------------------ doc/guides/howto/af_xdp_dp.rst | 340 +++++++++++++++++++++++++ doc/guides/howto/index.rst | 2 +- doc/guides/nics/af_xdp.rst | 44 +++- doc/guides/rel_notes/release_24_07.rst | 17 ++ drivers/net/af_xdp/compat.h | 15 ++ drivers/net/af_xdp/meson.build | 4 + drivers/net/af_xdp/rte_eth_af_xdp.c | 171 +++++++++---- 8 files changed, 544 insertions(+), 302 deletions(-) delete mode 100644 doc/guides/howto/af_xdp_cni.rst create mode 100644 doc/guides/howto/af_xdp_dp.rst