From patchwork Tue Apr 2 17:12:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 828 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 B616C43DC3; Tue, 2 Apr 2024 19:17:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 431A44025D; Tue, 2 Apr 2024 19:17:55 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id E7ACD4021F for ; Tue, 2 Apr 2024 19:17:53 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6ead4093f85so5102846b3a.3 for ; Tue, 02 Apr 2024 10:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712078273; x=1712683073; 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=G1RBQkvn7r+evBZvjnXez/VGlDQJKon7ABn/Wv7Dy4c=; b=wxryEzV6APoSEsML2B3Imxuer1LBD+hn50QW5/2fpLB2Leof2n2VIClZTebd4iCUSD Yen4ZyALDBAN9SZLZhr8iSkw1XzTvANrEACqpvfgJN87cPoh6bcWgPiE51zhb5C5C3Vu g7a0/N3ymnTYUYKB/vR1nMR/JBpi3wuOHZ34753ZTq5H7KWYV6hTROZoKdvJ5QCjwSj1 8AouKvMhQXXAtgOKt9ER6tZRp0tGVlFLgVy/gpfwGE1nyc5v3fOCi+EIOBB+0uXY1IPR i2bZGNLXadKIb/YEOmHhXWgkldrGKQsZ8JTFwbjV2dPIhdJiU+HA8d+UG+mdzLwfrUY+ 72bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712078273; x=1712683073; 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=G1RBQkvn7r+evBZvjnXez/VGlDQJKon7ABn/Wv7Dy4c=; b=FCSeb7MxNZgruOOKF0vYCNkofgr+EjHAOKFLvxXArKP/yz5O2pqK79MKNvtzCDClHH x8EB2vORGzkffJD11HRMGpKscMnxgJxAydcqVWFV97sH9zsTI9+8jh8Y35NFWB14k7Ce OK8Yf/1uIRqgBJlv0GhJbSMeR4uq/lLOp6LeLyPL5rTFLok2Sv3rRH+zyyhq13uyJraF TQGD+qkobvAb4TZ5WgXD3amwE8L69wkuf+zOBOFc4Swm/xipODLS43rcOrH+OIN2ejt6 ehgFrHEC/8y/K9afs01TPk+p+dMibG4dc6cwGk4Ht6FdoZLQY8eUFrllpIHD2XQkH9WS V+Uw== X-Gm-Message-State: AOJu0Ywcm8ZIRb/QBxZzjLwcq+DoooTseu+LHm+r8+a2gohLAJWsJUYw y9tcHrTQRM/0o4bJxNuLHO0+6SKet7oddXXjNiFoEI8VjkyFcSZ1K96i4Btbxh5yyEIv+IHCyun U X-Google-Smtp-Source: AGHT+IEy5lYRZom62OdVOVFtSk8hvUNTkEaPcH5UeIy8XyklYsOwO0U8IISij2seaf6fBYVBrV8DcA== X-Received: by 2002:a17:903:452:b0:1e2:849e:13a4 with SMTP id iw18-20020a170903045200b001e2849e13a4mr1039926plb.35.1712078273016; Tue, 02 Apr 2024 10:17:53 -0700 (PDT) Received: from hermes.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id q15-20020a170902a3cf00b001e264b50964sm2219815plb.205.2024.04.02.10.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 10:17:52 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v5 0/8] net/tap: cleanups and fix BPF flow Date: Tue, 2 Apr 2024 10:12:32 -0700 Message-ID: <20240402171751.138324-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 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. The build process checks for the required componen Stephen Hemminger (8): net/tap: do not duplicate fd's doc: fix the requirements and building of TAP flow net/tap: remove unused RSS hash types net/tap: validate and setup parameters for BPF RSS net/tap: stop "vendoring" linux bpf headers net/tap: rewrite the RSS BPF program net/tap: use libbpf to load new BPF program net/tap: remove no longer used files .gitignore | 3 - doc/guides/linux_gsg/sys_reqs.rst | 3 + doc/guides/nics/tap.rst | 95 +- 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 | 91 ++ drivers/net/tap/bpf/tap_bpf_program.c | 255 ---- drivers/net/tap/bpf/tap_rss.c | 264 ++++ drivers/net/tap/meson.build | 29 +- drivers/net/tap/rte_eth_tap.c | 199 ++- drivers/net/tap/rte_eth_tap.h | 12 +- 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 | 16 +- drivers/net/tap/tap_intr.c | 7 +- drivers/net/tap/tap_rss.h | 21 +- drivers/net/tap/tap_tcmsgs.h | 4 +- 22 files changed, 680 insertions(+), 3394 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