From patchwork Sat Dec 23 04:21:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13503901 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D43DB9440 for ; Sat, 23 Dec 2023 04:22:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="OgbQWB2d" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-67f911e9ac4so11044656d6.3 for ; Fri, 22 Dec 2023 20:22:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1703305357; x=1703910157; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=JdaKJLn3fQqnuEM3cwtCDAqVF5Ov8LNOvZAl93yulyk=; b=OgbQWB2dH8Mas5A9FuS6dGPL21V1BmHFerNQ0o10ryuooN6K9vbZJDLiGX5hzV3Phe tmRVC5McWrQmD5FebSjiLLFOzd2aU6dzkPKt9GOpZggUka5m1Mxpvi7T40pWzs4jjimP VgMwJ1qLoQugT5f/wgYqxFC2xmguKX5yRGIXI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703305357; x=1703910157; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JdaKJLn3fQqnuEM3cwtCDAqVF5Ov8LNOvZAl93yulyk=; b=djB2laizNDrhw2XAezslBgHBwVU0HrZcFCFPgs3Ix9IEJjRlQyMm2iOdFYWiF+224O vsD3vSYgp5IM1jZTX5/+RTUFAX+w0ughwEYC6a7AVZV8gdxXvGApJ76tgW7ugi1KpTnf Kp+GhTwHix+/07tRy73aZTGzmV9TXCx/rUhNexpXGoiyAi+P/1/u3tcMPWYE7zXVfAHq Hs1dQj4lCNONChCFWDLPdqyt01yyVmiRCjUKrWu7xQZfufeA8Xeg1zyVl5p203Lwh28Y b+IerpkLNw0EQvt3vC/m3SLimTpHbhJPTHh8rTc1RtK9Gg7SVUHkowo577YH/wMYgdnK X9iA== X-Gm-Message-State: AOJu0YxFKwRJC0jK5nobxJzrz2t2I1Dbtia7X59ph1JynjP8xypT9gnh VBnkRc+Wksp1nmQbVi8UvqwEhookB5Il X-Google-Smtp-Source: AGHT+IH6jxjOon3fCgjsEANubFU75nK03kfdRxtmxQfmfdjPxWexQNgM9V+ocwqKMVT3nodvQ6eEcA== X-Received: by 2002:a05:6214:ca4:b0:67f:5db:f4f2 with SMTP id s4-20020a0562140ca400b0067f05dbf4f2mr3425852qvs.52.1703305356131; Fri, 22 Dec 2023 20:22:36 -0800 (PST) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id ek5-20020ad45985000000b0067f8046a1acsm1299916qvb.144.2023.12.22.20.22.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2023 20:22:35 -0800 (PST) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com Subject: [PATCH net-next v2 00/13] bnxt_en: Add basic ntuple filter support Date: Fri, 22 Dec 2023 20:21:57 -0800 Message-Id: <20231223042210.102485-1-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org The current driver only supports ntuple filters added by aRFS. This patch series adds basic support for user defined TCP/UDP ntuple filters added by the user using ethtool. Many of the patches are refactoring patches to make the existing code more general to support both aRFS and user defined filters. aRFS filters always have the Toeplitz hash value from the NIC. A Toepliz hash function is added in patch 5 to get the same hash value for user defined filters. The hash is used to store all ntuple filters in the table and all filters must be hashed identically using the same function and key. v2: Fix compile error in patch #4 when CONFIG_BNXT_SRIOV is disabled. Michael Chan (12): bnxt_en: Refactor bnxt_ntuple_filter structure. bnxt_en: Add bnxt_l2_filter hash table. bnxt_en: Re-structure the bnxt_ntuple_filter structure. bnxt_en: Refactor L2 filter alloc/free firmware commands. bnxt_en: Add bnxt_lookup_ntp_filter_from_idx() function bnxt_en: Add new BNXT_FLTR_INSERTED flag to bnxt_filter_base struct. bnxt_en: Refactor filter insertion logic in bnxt_rx_flow_steer(). bnxt_en: Refactor the hash table logic for ntuple filters. bnxt_en: Refactor ntuple filter removal logic in bnxt_cfg_ntp_filters(). bnxt_en: Add ntuple matching flags to the bnxt_ntuple_filter structure. bnxt_en: Add support for ntuple filters added from ethtool. bnxt_en: Add support for ntuple filter deletion by ethtool. Pavan Chebbi (1): bnxt_en: Add function to calculate Toeplitz hash drivers/net/ethernet/broadcom/bnxt/bnxt.c | 719 +++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 92 ++- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 371 +++++++-- 3 files changed, 936 insertions(+), 246 deletions(-)