From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A84143DD2; Mon, 8 Apr 2024 23:24:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C610A402F0; Mon, 8 Apr 2024 23:24:42 +0200 (CEST) Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) by mails.dpdk.org (Postfix) with ESMTP id 88DCE402E3 for ; Mon, 8 Apr 2024 23:24:41 +0200 (CEST) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-5aa17c69cf7so1591735eaf.2 for ; Mon, 08 Apr 2024 14:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712611480; x=1713216280; 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=25NEDq/Q42iw/VXwERY398ZNEvQSGAqcSJr0MEZDyrs=; b=xljf42mgiz4+h6ZijfwI2nckn/WV35r73z+RKAJY9eZj99kutTQHU+kuNknqLGJ7G4 xIXrIkuxPNeM+dpIZpNbugQy7Y1p2n6v0w3wrSGLbT4ztEoFVfHPtt1pttOv4GbXYWep HUZnotrOrA/z5SpwhfpbPqxY9rcpmd3GMmx0IRtC6iLxcsGEABSmNMenAHyvHHlQoJVV tp4MzHlL/y6g02lnJQgzF52161I/bGTLVW9dL/mwQbPO3BJTdOIYIFiOdd9Dp+Re9uMh yOBJozBYCX09IQprDBCcbcRGSXefbCIdygKO14n/xZ2Oy/4PMvmp2cYSl5TU1bgHT9xs Nk6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712611480; x=1713216280; 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=25NEDq/Q42iw/VXwERY398ZNEvQSGAqcSJr0MEZDyrs=; b=dQDdnknT0K6aeoetf9+Znx7sUAsrCqBoRshFCaEhVrjY0FRsNsnTdsicPNafNwFSjf zBI8h4mznENMh6+1amxJgResXFlJjo2m1qcPAPaUUXPXmmDSH6N4/gYWldlP0lcj4G7Y FjuY6GJDseSx45hghhvpJ3uWSYHkbBdB3wjFKMot+A3OLr15UeaD0+g/09jSIhvrdrGE 2tK1EzFvpWonX22rzowOaGlv25mRI8j05RZnzTDR6qaSlzbYJtdv5ZVM/u9J+ComX8V0 1Vf6VSDoWn5hUIcpbBonWQzPs5lcYjbLG2t181vWSB0p01VJ2XTcMAhRkU8YaTBXao+Z LS4Q== X-Gm-Message-State: AOJu0YwP5q9bn7Cf9W6AK+i5zdTzsn2xuTeBuP3SxMzamaodEupC8zL7 YdvPSRSOqMA4p9U7IeJrkNLXgID5ttQOsttygP1sSZoROMy45H25PfrbT6BW60Dj30zJKScwVTN 6Zh0= X-Google-Smtp-Source: AGHT+IF5MCwOLo8EJ4ie+8cKoAbgqzo0UcFZMolNc6G7liYdntU5QpOO7RPHOp2BwXsFS/TG4SzNeg== X-Received: by 2002:a05:6870:13ca:b0:22e:7ba2:ced4 with SMTP id 10-20020a05687013ca00b0022e7ba2ced4mr8696162oat.18.1712611480639; Mon, 08 Apr 2024 14:24:40 -0700 (PDT) Received: from hermes.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id f16-20020a633810000000b005e43cce33f8sm6924725pga.88.2024.04.08.14.24.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 14:24:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v7 0/8] net/tap: cleanups and fix BPF support Date: Mon, 8 Apr 2024 14:18:31 -0700 Message-ID: <20240408212438.414099-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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. v7 - use BPF CO:RE to handle build vs runtime in skb offsets. - update documentation - workaround for older distributions where support for TC flower won't work. No flower == No flow support Stephen Hemminger (8): 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 .gitignore | 3 - doc/guides/linux_gsg/sys_reqs.rst | 3 + doc/guides/nics/tap.rst | 268 +--- 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 | 109 ++ drivers/net/tap/bpf/tap_bpf_program.c | 255 ---- drivers/net/tap/bpf/tap_rss.c | 267 ++++ drivers/net/tap/meson.build | 40 +- drivers/net/tap/rte_eth_tap.c | 225 ++-- drivers/net/tap/rte_eth_tap.h | 20 +- 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 | 549 ++------ 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, 786 insertions(+), 3528 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 -- 2.43.0