From patchwork Wed Feb 14 17:03:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maryam Tahhan X-Patchwork-Id: 647 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 BFE4B43B3C; Wed, 14 Feb 2024 18:04:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 370FD42E97; Wed, 14 Feb 2024 18:04:11 +0100 (CET) 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 6503242E50 for ; Wed, 14 Feb 2024 18:04:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707930250; 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=vDZO50EHf28etLwXWZdfKq3YY7silBmrNpT2LzrYsF4=; b=ThUEbsTp0zWICIh3fPYe8DAnJthgae7AB4tZIKC6Sybwyf++fJZgVLLwgorh9NXM//Vv9J ky7j/0V9yhljQJkuYSKIFOI1gpaNOdV/xEMv+xfziKN6xXXWks6W7cfuz2E96I86zcC7od 5CfVUCX89gQkFPDg79OFxlHLsu0eZnk= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-rJAEsq4NMFO2K8iixxvFVg-1; Wed, 14 Feb 2024 12:04:08 -0500 X-MC-Unique: rJAEsq4NMFO2K8iixxvFVg-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7872df79ebcso71710985a.3 for ; Wed, 14 Feb 2024 09:04:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707930248; x=1708535048; 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=vDZO50EHf28etLwXWZdfKq3YY7silBmrNpT2LzrYsF4=; b=skZtLZSCtAJosu5wexYw63c6vmOdze6/M51bXHa39VsiHx90eNgC2mqzDVZKRWm4tN IF7rW8n2JhmGQ2kytNM4WHqpvz8Hf2yvZj4SIXuPUgUhQle9mBVBS3iawkAFH/obxcTy Tdc+R0ktniPldOaSISEH/XSysIZ/dUvaM3ikcR5+TxOoi82L219SNmyrUdB1upoqMmta PNVGzLN7vUJTq/HLQm8IJbRSVRKHfcshhgksd7xdk/w0p8cQJzkc1bZRLOlMwCDJXzjm 5egaNFzRSSKDDrRltN/Tic9M7Crq9+kHVspNPCNv4a6PDc0qzvb/5/NmkNuELOOfqDSH VBXg== X-Gm-Message-State: AOJu0Yzq/PoeEWaM1EeZ9mOxeVJuP9w+sOLmXjieYfncP1A9/du6VTqO IF/y5DPs+9Ufy+fNeeu9LNKtA6Lnt+CIBOeTEUmcrS4jPkxm8A047cnqkCkvTrU8mRbClLeG0/O k/9/NQ/0lQ878234rQZ6sMijwqcf0wNPIrLP6i0f5 X-Received: by 2002:a05:620a:12c7:b0:785:a3ce:5129 with SMTP id e7-20020a05620a12c700b00785a3ce5129mr3330489qkl.44.1707930248057; Wed, 14 Feb 2024 09:04:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNHQgRSS29TibTUWBOT0kahE/oz5cxR98bmhQ/MbSjeYAVbcTU2/DCKYruHaxDZAwETbrImA== X-Received: by 2002:a05:620a:12c7:b0:785:a3ce:5129 with SMTP id e7-20020a05620a12c700b00785a3ce5129mr3330444qkl.44.1707930247543; Wed, 14 Feb 2024 09:04:07 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXDa1ChmpVvJCSXDFCRVThwudmcl1Fgzt+O1CqVJcY9yRYzTq8uJ54SjorOdNEPocPx/oJ0Z/OtPbDK/vZQP3p/286sMn3T25ZT9cA3oTHpgCc/vRxRnTQSiSurv/MrgVqJvMQOf3r55mhUbhA0DSsvsczBcm5ARMWzp4rL35mzS+jV73bK1YdGn2NuT8ni13pw2eZOgZsu7lqUsvQbztZe9IFNtsDt+RT16q1PEVzljgUxjcC3DEGmKMoRilXbUBpRTa1tBYK71NjlryQdl1IPVzTZwz/5Spt0i+hfvOjfyyhZys1Ek6M0ynpmUDkBRNMkYoki7fMqeuc= Received: from nfvsdn-06.redhat.com (nat-pool-232-132.redhat.com. [66.187.232.132]) by smtp.gmail.com with ESMTPSA id p25-20020a05620a22f900b0078719b3b55bsm1685812qki.14.2024.02.14.09.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 09:04:07 -0800 (PST) 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: [v9 0/3] net/af_xdp: fix multi interface support for K8s Date: Wed, 14 Feb 2024 12:03:50 -0500 Message-ID: <20240214170404.3318857-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 --- 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 | 349 +++++++++++++++++++++++++ doc/guides/howto/index.rst | 2 +- doc/guides/nics/af_xdp.rst | 44 +++- doc/guides/rel_notes/release_24_03.rst | 17 ++ drivers/net/af_xdp/rte_eth_af_xdp.c | 167 ++++++++---- 6 files changed, 531 insertions(+), 301 deletions(-) delete mode 100644 doc/guides/howto/af_xdp_cni.rst create mode 100644 doc/guides/howto/af_xdp_dp.rst