Message ID | 20240426155125.125910-1-stephen@networkplumber.org (mailing list archive) |
---|---|
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]) by inbox.dpdk.org (Postfix) with ESMTP id DD8B943B8D; Fri, 26 Apr 2024 17:51:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1AD243EC8; Fri, 26 Apr 2024 17:51:36 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id CD40443D7A for <dev@dpdk.org>; Fri, 26 Apr 2024 17:51:35 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2a2d82537efso1635844a91.2 for <dev@dpdk.org>; Fri, 26 Apr 2024 08:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714146695; x=1714751495; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c7jwmEplM5nMKQmNUWD+ZVwc3v97wSKR3t4XyoZQ0OM=; b=TiEO8Jddd4TaVw9dzVrgzmTB39l8QYk1mHsTIFKtBWWL1f+SuZyICMoGY9cbsj0PnS pxZp6bt9j8s93JbAvvZOeBwybx50KibApBe1aJeUOGnGdvJ1b3mfDFjgi+NOKQ2uMVTH o8hqcmDRI2WLRDA10ae4WqtCjUyxcxkigFpKlHAUsXFMiqBLg5XEUhDkPY3eCwlwfzkF 71TyZJOFTDc8V+d3rphzhTkID13SNzXL9bvDHP6risRLVbu78Ex675IZuLeQdeihbwkI qeFRUp1ZHERkwTxa8cVLvGUOMq/1cSaPiw7aS/S2UnzYqN4RD2zA52JfrRaOXd509/6g mBqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714146695; x=1714751495; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c7jwmEplM5nMKQmNUWD+ZVwc3v97wSKR3t4XyoZQ0OM=; b=VWLFnjcp3dV3cOsz1sDDyqf5T2ygJzTIqbw4hGm6wqp2kPggC5iZDKB9/V7sVgBzMp 06jBA5z3itCRhHZgp4mV8t5Kh8VLGAaUHz4EVsl38+1q+S10J3JriQy6EaFIT7thCQEP JjSB7s/3r9Lxgba46v0Pf7+hwjpyBoO99NuP+AGAds/GCwm4lxfjX6zsrvtigrpcxMhs ihuFmLMA/hzAZ6fYFcf8I3+nDBTvSSg498pS6BOtfnfNb1tfLmaf5KzVcfD1oCF2MYSp pOobkTn2IGIwWryT8BcON9yzxTj/eWRtXUihSiEDH6QUPGqZ5Sa0AIIM0TKyRciUuN7Y AmjQ== X-Gm-Message-State: AOJu0YyLgtC/s+ZmxUAIZOqn1lQOFXXWFtkVMpp7zTCyNSWO+GpJeN2w 3otv8ijpEQUcGjJMjS08td4eaE0+sADyefmg3I5puEZRsVBRheQ/Or6+Tbb1s0WC33DBLuiU9H/ ht9w= X-Google-Smtp-Source: AGHT+IFS9bz3wbX8D9XPrF3bAV/4bloVtEVM8Db0bjOaC180ZSfSwOxLn7tOSUXHr0Y2FPrV8AcdPA== X-Received: by 2002:a17:90a:5ac3:b0:2a2:97cd:9c94 with SMTP id n61-20020a17090a5ac300b002a297cd9c94mr3499582pji.40.1714146694744; Fri, 26 Apr 2024 08:51:34 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id ns5-20020a17090b250500b002a5f44353d2sm16770978pjb.7.2024.04.26.08.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:51:34 -0700 (PDT) From: Stephen Hemminger <stephen@networkplumber.org> To: dev@dpdk.org Cc: Stephen Hemminger <stephen@networkplumber.org> Subject: [PATCH v9 0/9] net/tap: fix RSS (BPF) support Date: Fri, 26 Apr 2024 08:48:50 -0700 Message-ID: <20240426155125.125910-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240130034925.44869-1-stephen@networkplumber.org> References: <20240130034925.44869-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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>, <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>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
net/tap: fix RSS (BPF) support
|
|
Message
Stephen Hemminger
April 26, 2024, 3:48 p.m. UTC
The support of doing RSS for rte_flow_action was a cool idea but it has been broken for several releases of DPDK as the kernel and BPF infrastructure changed. This series cleans up the BPF program, implements several features that were never completed in the original code and changes to use the current BPF toolchain. The result should be easier to read and maintain. I do not intend to support backporting this to stable releases due to lack of demand and dealing with older distros. v9 - rebase and keep max queues at 16 Stephen Hemminger (9): net/tap: do not duplicate fd's net/tap: remove unused fields net/tap: validate and setup parameters for BPF RSS net/tap: do not build flow support if header is out of date net/tap: rewrite the RSS BPF program net/tap: use libbpf to load new BPF program net/tap: remove no longer used files doc: update documentation of TAP PMD net/tap: simplify the internal structure .gitignore | 3 - doc/guides/linux_gsg/sys_reqs.rst | 3 + doc/guides/nics/tap.rst | 274 ++-- drivers/net/tap/bpf/Makefile | 19 - drivers/net/tap/bpf/README | 38 + drivers/net/tap/bpf/bpf_api.h | 276 ---- drivers/net/tap/bpf/bpf_elf.h | 53 - drivers/net/tap/bpf/bpf_extract.py | 86 -- drivers/net/tap/bpf/meson.build | 107 ++ drivers/net/tap/bpf/tap_bpf_program.c | 255 ---- drivers/net/tap/bpf/tap_rss.c | 267 ++++ drivers/net/tap/meson.build | 42 +- drivers/net/tap/rte_eth_tap.c | 267 ++-- drivers/net/tap/rte_eth_tap.h | 32 +- drivers/net/tap/tap_bpf.h | 121 -- drivers/net/tap/tap_bpf_api.c | 190 --- drivers/net/tap/tap_bpf_insns.h | 1743 ------------------------- drivers/net/tap/tap_flow.c | 559 +++----- drivers/net/tap/tap_flow.h | 17 +- drivers/net/tap/tap_intr.c | 7 +- drivers/net/tap/tap_rss.h | 21 +- drivers/net/tap/tap_tcmsgs.h | 4 +- 22 files changed, 833 insertions(+), 3551 deletions(-) delete mode 100644 drivers/net/tap/bpf/Makefile create mode 100644 drivers/net/tap/bpf/README delete mode 100644 drivers/net/tap/bpf/bpf_api.h delete mode 100644 drivers/net/tap/bpf/bpf_elf.h delete mode 100644 drivers/net/tap/bpf/bpf_extract.py create mode 100644 drivers/net/tap/bpf/meson.build delete mode 100644 drivers/net/tap/bpf/tap_bpf_program.c create mode 100644 drivers/net/tap/bpf/tap_rss.c delete mode 100644 drivers/net/tap/tap_bpf.h delete mode 100644 drivers/net/tap/tap_bpf_api.c delete mode 100644 drivers/net/tap/tap_bpf_insns.h
Comments
On 4/26/2024 4:48 PM, Stephen Hemminger wrote: > The support of doing RSS for rte_flow_action was a cool idea > but it has been broken for several releases of DPDK as the > kernel and BPF infrastructure changed. > > This series cleans up the BPF program, implements several > features that were never completed in the original code > and changes to use the current BPF toolchain. > > The result should be easier to read and maintain. I do not > intend to support backporting this to stable releases due > to lack of demand and dealing with older distros. > > v9 - rebase and keep max queues at 16 > > Stephen Hemminger (9): > net/tap: do not duplicate fd's > net/tap: remove unused fields > net/tap: validate and setup parameters for BPF RSS > net/tap: do not build flow support if header is out of date > net/tap: rewrite the RSS BPF program > net/tap: use libbpf to load new BPF program > net/tap: remove no longer used files > doc: update documentation of TAP PMD > net/tap: simplify the internal structure > Thanks for reviving tap eBPF support, I am for merging this set (as early as possible). But I have two concerns, 1. Build environment header file dependencies and external library dependency version changed. Not sure if this will impact users. What do you think at least to update release notes to notify users? 2. We need this to be tested, either by users or test teams. I will bring the issue in next release status meeting to see if we have anyone testing tap eBPF support. Thanks, ferruh
On Wed, 1 May 2024 12:18:16 +0100 Ferruh Yigit <ferruh.yigit@amd.com> wrote: > Thanks for reviving tap eBPF support, I am for merging this set (as > early as possible). > > But I have two concerns, > 1. Build environment header file dependencies and external library > dependency version changed. Not sure if this will impact users. > What do you think at least to update release notes to notify users? Added a short note in release notes. > > 2. We need this to be tested, either by users or test teams. I will > bring the issue in next release status meeting to see if we have anyone > testing tap eBPF support. Agreed. I ended up doing lots of manual tests. That is how it was discovered that > 1 flow rule never worked with TAP. There is a bigger issue here. There is no basic test suite for PMD's. I see lots of differences creeping in with statistics etc. And there is no test suite for rte_flow. Lots of untested code paths and driver differences. Testing actual flows is hard, but basic functional tests should be possible. Like: - try all possible flow rules and actions - make sure that any supported flow rule accepts a valid parameter. and for those supported flow rules pass invalid data (like queue > nrx queue). - make sure validate and create work the same. - make sure that validate doesn't actually create state in hw/sw. should be possible to validate same rule 10,000 times without leaks blowing up.