From patchwork Mon Sep 27 13:25:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipun Gupta X-Patchwork-Id: 99792 X-Patchwork-Delegate: thomas@monjalon.net 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 27361A0548; Mon, 27 Sep 2021 15:26:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AAE241122; Mon, 27 Sep 2021 15:25:33 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id DBA1D410DF for ; Mon, 27 Sep 2021 15:25:23 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BBA7D2013D8; Mon, 27 Sep 2021 15:25:23 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 57C3B201116; Mon, 27 Sep 2021 15:25:23 +0200 (CEST) Received: from lsv03274.swis.in-blr01.nxp.com (lsv03274.swis.in-blr01.nxp.com [92.120.147.114]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id B370B183AD15; Mon, 27 Sep 2021 21:25:22 +0800 (+08) From: nipun.gupta@nxp.com To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com, sachin.saxena@nxp.com, Vanshika Shukla Date: Mon, 27 Sep 2021 18:55:15 +0530 Message-Id: <20210927132519.19264-8-nipun.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210927132519.19264-1-nipun.gupta@nxp.com> References: <20210927122650.30881-1-nipun.gupta@nxp.com> <20210927132519.19264-1-nipun.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v1 07/11] net/dpaa2: update RSS to support additional distributions 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 Sender: "dev" From: Vanshika Shukla This patch updates the RSS support to support following additional distributions: - VLAN - ESP - AH - PPPOE Signed-off-by: Vanshika Shukla --- drivers/net/dpaa2/base/dpaa2_hw_dpni.c | 70 +++++++++++++++++++++++++- drivers/net/dpaa2/dpaa2_ethdev.h | 7 ++- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c index 641e7027f1..08f49af768 100644 --- a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c +++ b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c @@ -210,6 +210,10 @@ dpaa2_distset_to_dpkg_profile_cfg( int l2_configured = 0, l3_configured = 0; int l4_configured = 0, sctp_configured = 0; int mpls_configured = 0; + int vlan_configured = 0; + int esp_configured = 0; + int ah_configured = 0; + int pppoe_configured = 0; memset(kg_cfg, 0, sizeof(struct dpkg_profile_cfg)); while (req_dist_set) { @@ -217,6 +221,7 @@ dpaa2_distset_to_dpkg_profile_cfg( dist_field = 1ULL << loop; switch (dist_field) { case ETH_RSS_L2_PAYLOAD: + case ETH_RSS_ETH: if (l2_configured) break; @@ -231,7 +236,70 @@ dpaa2_distset_to_dpkg_profile_cfg( kg_cfg->extracts[i].extract.from_hdr.type = DPKG_FULL_FIELD; i++; - break; + break; + + case ETH_RSS_PPPOE: + if (pppoe_configured) + break; + kg_cfg->extracts[i].extract.from_hdr.prot = + NET_PROT_PPPOE; + kg_cfg->extracts[i].extract.from_hdr.field = + NH_FLD_PPPOE_SID; + kg_cfg->extracts[i].type = + DPKG_EXTRACT_FROM_HDR; + kg_cfg->extracts[i].extract.from_hdr.type = + DPKG_FULL_FIELD; + i++; + break; + + case ETH_RSS_ESP: + if (esp_configured) + break; + esp_configured = 1; + + kg_cfg->extracts[i].extract.from_hdr.prot = + NET_PROT_IPSEC_ESP; + kg_cfg->extracts[i].extract.from_hdr.field = + NH_FLD_IPSEC_ESP_SPI; + kg_cfg->extracts[i].type = + DPKG_EXTRACT_FROM_HDR; + kg_cfg->extracts[i].extract.from_hdr.type = + DPKG_FULL_FIELD; + i++; + break; + + case ETH_RSS_AH: + if (ah_configured) + break; + ah_configured = 1; + + kg_cfg->extracts[i].extract.from_hdr.prot = + NET_PROT_IPSEC_AH; + kg_cfg->extracts[i].extract.from_hdr.field = + NH_FLD_IPSEC_AH_SPI; + kg_cfg->extracts[i].type = + DPKG_EXTRACT_FROM_HDR; + kg_cfg->extracts[i].extract.from_hdr.type = + DPKG_FULL_FIELD; + i++; + break; + + case ETH_RSS_C_VLAN: + case ETH_RSS_S_VLAN: + if (vlan_configured) + break; + vlan_configured = 1; + + kg_cfg->extracts[i].extract.from_hdr.prot = + NET_PROT_VLAN; + kg_cfg->extracts[i].extract.from_hdr.field = + NH_FLD_VLAN_TCI; + kg_cfg->extracts[i].type = + DPKG_EXTRACT_FROM_HDR; + kg_cfg->extracts[i].extract.from_hdr.type = + DPKG_FULL_FIELD; + i++; + break; case ETH_RSS_MPLS: diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index 5cdd2f6418..734ef17a9a 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -70,7 +70,12 @@ ETH_RSS_UDP | \ ETH_RSS_TCP | \ ETH_RSS_SCTP | \ - ETH_RSS_MPLS) + ETH_RSS_MPLS | \ + ETH_RSS_C_VLAN | \ + ETH_RSS_S_VLAN | \ + ETH_RSS_ESP | \ + ETH_RSS_AH | \ + ETH_RSS_PPPOE) /* LX2 FRC Parsed values (Little Endian) */ #define DPAA2_PKT_TYPE_ETHER 0x0060