DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: junfeng.guo@intel.com, dev@dpdk.org,
	Qi Zhang <qi.z.zhang@intel.com>,
	Alice Michael <alice.michael@intel.com>
Subject: [dpdk-dev] [PATCH 09/12] net/ice/base: add GCO defines and new GCO flex descriptor
Date: Thu, 16 Sep 2021 17:53:01 +0800	[thread overview]
Message-ID: <20210916095304.3058210-10-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210916095304.3058210-1-qi.z.zhang@intel.com>

Added the memory needed for the generic checksum offload (GCO)
feature, including the new flex descriptor ICE_RXDID_GSC.

Signed-off-by: Alice Michael <alice.michael@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_common.c    |  1 +
 drivers/net/ice/base/ice_lan_tx_rx.h | 49 +++++++++++++++++++++++++++-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 107cebcb87..46b0dd11b8 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -1357,6 +1357,7 @@ const struct ice_ctx_ele ice_tlan_ctx_info[] = {
 	ICE_CTX_STORE(ice_tlan_ctx, cache_prof_idx,		2,	166),
 	ICE_CTX_STORE(ice_tlan_ctx, pkt_shaper_prof_idx,	3,	168),
 	ICE_CTX_STORE(ice_tlan_ctx, int_q_state,		122,	171),
+	ICE_CTX_STORE(ice_tlan_ctx, gsc_ena,			1,	172),
 	{ 0 }
 };
 
diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index 4255e9963e..2b6f039dcb 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -522,6 +522,46 @@ struct ice_32b_rx_flex_desc_nic {
 	} flex_ts;
 };
 
+/* Rx Flex Descriptor NIC Raw CSUM Profile
+ * RxDID Profile ID 9
+ * Flex-field 0: RSS hash lower 16-bits
+ * Flex-field 1: RSS hash upper 16-bits
+ * Flex-field 2: Flow ID lower 16-bits
+ * Flex-field 3: Raw CSUM
+ * Flex-field 4: reserved, VLAN ID taken from L2Tag
+ */
+struct ice_32b_rx_flex_desc_nic_raw_csum {
+	/* Qword 0 */
+	u8 rxdid;
+	u8 mir_id_umb_cast;
+	__le16 ptype_flexi_flags0;
+	__le16 pkt_len;
+	__le16 hdr_len_sph_flex_flags1;
+
+	/* Qword 1 */
+	__le16 status_error0;
+	__le16 l2tag1;
+	__le32 rss_hash;
+
+	/* Qword 2 */
+	__le16 status_error1; /* bit 6 Raw CSUM present */
+	u8 flexi_flags2;
+	u8 ts_low;
+	__le16 l2tag2_1st;
+	__le16 l2tag2_2nd;
+
+	/* Qword 3 */
+	__le16 flow_id;
+	__le16 raw_csum;
+	union {
+		struct {
+			__le16 rsvd;
+			__le16 flow_id_ipv6;
+		} flex;
+		__le32 ts_high;
+	} flex_ts;
+};
+
 /* Rx Flex Descriptor Switch Profile
  * RxDID Profile ID 3
  * Flex-field 0: Source VSI
@@ -708,6 +748,7 @@ enum ice_rxdid {
 	ICE_RXDID_FLEX_NIC		= 2,
 	ICE_RXDID_FLEX_NIC_2		= 6,
 	ICE_RXDID_HW			= 7,
+	ICE_RXDID_GSC			= 9,
 	ICE_RXDID_COMMS_GENERIC		= 16,
 	ICE_RXDID_COMMS_AUX_VLAN	= 17,
 	ICE_RXDID_COMMS_AUX_IPV4	= 18,
@@ -1029,10 +1070,15 @@ enum ice_tx_desc_len_fields {
 struct ice_tx_ctx_desc {
 	__le32 tunneling_params;
 	__le16 l2tag2;
-	__le16 rsvd;
+	__le16 gsc;
 	__le64 qw1;
 };
 
+#define ICE_TX_GSC_DESC_START	0  /* 7 BITS */
+#define ICE_TX_GSC_DESC_OFFSET	7  /* 4 BITS */
+#define ICE_TX_GSC_DESC_TYPE	11 /* 2 BITS */
+#define ICE_TX_GSC_DESC_ENA	13 /* 1 BIT */
+
 #define ICE_TXD_CTX_QW1_DTYPE_S	0
 #define ICE_TXD_CTX_QW1_DTYPE_M	(0xFUL << ICE_TXD_CTX_QW1_DTYPE_S)
 
@@ -1143,6 +1189,7 @@ struct ice_tlan_ctx {
 	u8 drop_ena;
 	u8 cache_prof_idx;
 	u8 pkt_shaper_prof_idx;
+	u8 gsc_ena;
 	u8 int_q_state;	/* width not needed - internal - DO NOT WRITE!!! */
 };
 
-- 
2.26.2


  parent reply	other threads:[~2021-09-16  9:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16  9:52 [dpdk-dev] [PATCH 00/12] ice base code batch 2 for DPDK 21.11 Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 01/12] net/ice/base: calculate logical PF ID Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 02/12] net/ice/base: include more E810T adapters Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 03/12] net/ice/base: use macro instead of open-coded division Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 04/12] net/ice/base: allow to enable LAN and loopback in switch Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 05/12] net/ice/base: change addr param to u16 Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 06/12] net/ice/base: allow tool access to MNG register Qi Zhang
2021-09-16  9:52 ` [dpdk-dev] [PATCH 07/12] net/ice/base: add package segment ID Qi Zhang
2021-09-16  9:53 ` [dpdk-dev] [PATCH 08/12] net/ice/base: add a helper to check for 100M speed support Qi Zhang
2021-09-16  9:53 ` Qi Zhang [this message]
2021-09-16  9:53 ` [dpdk-dev] [PATCH 10/12] net/ice/base: add get/set functions for shared parameters Qi Zhang
2021-09-16  9:53 ` [dpdk-dev] [PATCH 11/12] net/ice/base: implement support for SMA controller Qi Zhang
2021-09-22 12:43   ` Ferruh Yigit
2021-09-22 12:56     ` Machnikowski, Maciej
2021-09-22 13:51       ` Ferruh Yigit
2021-09-16  9:53 ` [dpdk-dev] [PATCH 12/12] net/ice/base: update auto generated hardware register Qi Zhang
2021-09-17  2:14 ` [dpdk-dev] [PATCH 00/12] ice base code batch 2 for DPDK 21.11 Guo, Junfeng
2021-09-17  8:48   ` Zhang, Qi Z
2021-09-22 12:45     ` Ferruh Yigit
2021-09-23  0:21       ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210916095304.3058210-10-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=alice.michael@intel.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).