From patchwork Thu Dec 21 22:02:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13502679 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 6B3A077640 for ; Thu, 21 Dec 2023 22:02:58 +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="d45rrE0d" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-67f7bd86cafso7640746d6.0 for ; Thu, 21 Dec 2023 14:02:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1703196177; x=1703800977; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=YZJggQtrDrfHG57lYVy6oUE/LXF6hBbNstgrAJUUy6g=; b=d45rrE0djtlxvkhcUWJUShTJm8kl7B4rQ6UyhRw/2iOFxY8nZnago9q3FERhoHtt9G ea+gyCkXCZE7zwPmtOkULCwnNp9oTitfqLikEo+l0rggbPgVod2dHtZvryXbyd5Av/1Z Li2u/2kURYUEYG6TBpieyDbIP4JwsI7NR1Dxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703196177; x=1703800977; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YZJggQtrDrfHG57lYVy6oUE/LXF6hBbNstgrAJUUy6g=; b=aHwFxW6qQXIeo35a2OVcfysXv1OSgatyTB7xpenKszvkR6V4oPkEjxsvVuXj7SPyFH SmIMGvj0ahj9zDrom9KiPsWAnrIui82QFtA1SHWrB1hfkmKRAkVynKvBT1V3hnW7X/Ds +0r0BiuYo6mSv964Ihsrjtxq4X5dW/OsLhBGsalJJBAYQmslgg4l96WfPWMrhTdcRfdQ sn+sKSqZxqyzfd9gbaYSO5Ci0zbnD8xN1VZZgGsUGlr+aljgJPj3/BGI07YbuI5028c/ aa/a6A02dAlOAeu0uhwsavZ1D0mZQb2lrrAxo6VbRLReNu7ezobxYmrB5YGGvU4hk5pG iYNg== X-Gm-Message-State: AOJu0YyItMbufvRiJSWGq7bZyAav8BqpRnG9BuRiFO6mXn9N6JHPJIyh E/7kKmFUmgFrqNh8bTEI2hfnXmtrHBJY X-Google-Smtp-Source: AGHT+IFfE1brD3CThas02RNK3gdEih2GwQYVCHYR4O/IJNQeJ9P0pwKJRw0M/w7AeXfGGkF1LNKJeA== X-Received: by 2002:ad4:5ba8:0:b0:67a:bb2a:e108 with SMTP id 8-20020ad45ba8000000b0067abb2ae108mr459546qvq.37.1703196177033; Thu, 21 Dec 2023 14:02:57 -0800 (PST) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id ee14-20020a0562140a4e00b0067f712874fbsm905198qvb.129.2023.12.21.14.02.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Dec 2023 14:02:56 -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 00/13] bnxt_en: Add basic ntuple filter support Date: Thu, 21 Dec 2023 14:02:05 -0800 Message-Id: <20231221220218.197386-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. 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 | 715 +++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 92 ++- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 371 +++++++-- 3 files changed, 932 insertions(+), 246 deletions(-)