From patchwork Thu Feb 8 17:41:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 629 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 6974343AD9; Thu, 8 Feb 2024 18:51:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10D5B40273; Thu, 8 Feb 2024 18:51:03 +0100 (CET) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id 559E140273 for ; Thu, 8 Feb 2024 18:51:02 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6de3141f041so89833b3a.0 for ; Thu, 08 Feb 2024 09:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1707414661; x=1708019461; 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=G1obz4WVAKspN7h7UDI2CNBDryq2l5R8FZLBCZqjdwA=; b=j9BM1zYN4fBOBwLe+22tBiCObw9GVJPth8ziMrJsP4oT/GD4xGujAb1nXH4QBo/sLd sZynbw4PF+N4Jm5dNTiPhyFXsO18x3sllycruHkgVTuBlKpBkzuq5Vb7sV5f0yVBh65z 6fDcT01vjWlV+xlcRk9Yct6R4uyV6BIsVaKouwCgeZyta0y1DiCsTUmuVdI9r7tOpRYX Hw1KLq/ARUpWdB6KsRLmsVqmDdal1Kb/4ChaXzIVsbcv88wwUXvSZUo+dKBrPR71b4lN O+8tkYAZJ9mceFjsvRay5bxNPy4oTuWevqNXdvdDPxV4u7Zw3qfgaP6ZJFhxb8/29QcX ZK4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707414661; x=1708019461; 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=G1obz4WVAKspN7h7UDI2CNBDryq2l5R8FZLBCZqjdwA=; b=Xmi1AnX29HHFu3WjLrw1ne9lW1/pY2VMlx/vmsbQGoD6qBtEHSvnInX9XUJlta9Utb KMweO9tGGpuRU+kPV/y2AFCi4b52aK1dl3SBVsZaF1HhIrvBRcvM91yQxlGITm6PkcaG tcAiVEJpZDrfxWZDTvv6Y8iKZ5X/wZmuBanVUekJ2+2v8pVYvWPR7FY2e79zV/m7mSPE hLuJMV6CbGeBwv2966igzb7px/i1KdUo8uBiVK2pgmZHlMQxjcWjlKxz2DB+HgmYgHsl 5TDCAzyDljY9XaClUnfIKyYp63k4DLL536Gwr2OW7y4NLjyQ6Sk/6xV1meSsLaSrXnfP NYkw== X-Gm-Message-State: AOJu0YzUtNOwVBtWRNt46Opuv6tdP3TQC7LlPu7iOW2q22cZyThX+UAz c3jciUYd8bqCU4hnTt+BiJUkUCq962OiqJWSSFeZ/38FRP/pqB16PuNtckpacUESeAgTH+H0c7R Y4JY= X-Google-Smtp-Source: AGHT+IEVonoX8MXunbtEM7m0IZp1lDeEHAo9P789hUr5yvAff/rXckKl71GKFM4IRZ5HU3+bvCrmtg== X-Received: by 2002:a62:e807:0:b0:6db:7073:f845 with SMTP id c7-20020a62e807000000b006db7073f845mr6303786pfi.18.1707414661247; Thu, 08 Feb 2024 09:51:01 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id f19-20020a056a00229300b006dbda7bcf3csm5030pfe.83.2024.02.08.09.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 09:51:00 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/7] net/tap: RSS using BPF overhaul Date: Thu, 8 Feb 2024 09:41:24 -0800 Message-ID: <20240208175051.326550-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 components and if not there will stub out to not supported. This patch series is mostly the same as the original RFC, most of the changes are to split it up and always build the BPF from source. v3 - fix handling of case where libbpf not present and therefore the not supported needs to be returned. Stephen Hemminger (7): net/tap: remove unused RSS hash types net/tap: validate and setup parameters for BPF RSS 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 MAINTAINERS: add maintainer for TAP device .gitignore | 3 - MAINTAINERS | 1 + drivers/net/tap/bpf/Makefile | 19 - drivers/net/tap/bpf/README | 12 + 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 | 81 ++ drivers/net/tap/bpf/tap_bpf_program.c | 255 ---- drivers/net/tap/bpf/tap_bpf_program.o | Bin 0 -> 28080 bytes drivers/net/tap/bpf/tap_rss.c | 272 ++++ drivers/net/tap/meson.build | 26 +- drivers/net/tap/rte_eth_tap.c | 2 + drivers/net/tap/rte_eth_tap.h | 9 +- 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 | 521 +++----- drivers/net/tap/tap_flow.h | 11 +- drivers/net/tap/tap_rss.h | 14 +- drivers/net/tap/tap_tcmsgs.h | 4 +- 21 files changed, 534 insertions(+), 3165 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_bpf_program.o 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