DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: ferruh.yigit@intel.com
Cc: qiming.yang@intel.com, dev@dpdk.org,
	Qi Zhang <qi.z.zhang@intel.com>, Ting Xu <ting.xu@intel.com>,
	Jeff Guo <jia.guo@intel.com>
Subject: [dpdk-dev] [PATCH v2 1/6] net/ice/base: add IP fragment flags
Date: Fri, 30 Apr 2021 21:59:17 +0800	[thread overview]
Message-ID: <20210430135922.2990103-2-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210430135922.2990103-1-qi.z.zhang@intel.com>

Add the IPv6 fragment flags and the IPv4 fragment field shift.

Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_fdir.c |  2 +-
 drivers/net/ice/base/ice_fdir.h | 16 ++++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 8f9c0d346b..f6a6ff3831 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -1505,7 +1505,7 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
 		ice_pkt_insert_u8(loc, ICE_IPV4_TTL_OFFSET, input->ip.v4.ttl);
 		ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
 		if (frag)
-			loc[20] = ICE_FDIR_IPV4_PKT_FLAG_DF;
+			loc[20] = ICE_FDIR_IPV4_PKT_FLAG_MF;
 		break;
 	case ICE_FLTR_PTYPE_NONF_IPV4_UDP:
 		ice_pkt_insert_mac_addr(pkt, input->ext_data_outer.dst_mac);
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index 6573f96bc1..b679a8a1bd 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -83,12 +83,20 @@
 
 #define ICE_FDIR_MAX_FLTRS		16384
 
-/* IP v4 has 2 flag bits that enable fragment processing: DF and MF. DF
+/* IPv4 has 2 flag bits that enable fragment processing: DF and MF. DF
  * requests that the packet not be fragmented. MF indicates that a packet has
- * been fragmented.
+ * been fragmented, except that for the last fragment has a non-zero
+ * Fragment Offset field with zero MF.
  */
-#define ICE_FDIR_IPV4_PKT_FLAG_DF		0x20
-#define ICE_FDIR_IPV4_PKT_FLAG_MF		0x40
+#define ICE_FDIR_IPV4_PKT_FLAG_MF		0x20
+#define ICE_FDIR_IPV4_PKT_FLAG_MF_SHIFT	8
+#define ICE_FDIR_IPV4_PKT_FLAG_DF		0x40
+
+/* For IPv6 fragmented packets, all fragments except the last have
+ * the MF flag set.
+ */
+#define ICE_FDIR_IPV6_PKT_FLAG_MF		0x100
+#define ICE_FDIR_IPV6_PKT_FLAG_MF_SHIFT	8
 
 enum ice_fltr_prgm_desc_dest {
 	ICE_FLTR_PRGM_DESC_DEST_DROP_PKT,
-- 
2.26.2


  reply	other threads:[~2021-04-30 13:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  0:41 [dpdk-dev] [PATCH 0/6] net/ice: base update update batch 3 Qi Zhang
2021-04-29  0:41 ` [dpdk-dev] [PATCH 1/6] net/ice/base: add IP fragment flags Qi Zhang
2021-04-29  0:41 ` [dpdk-dev] [PATCH 2/6] net/ice/base: add function for post DDP download VLAN mode configuration Qi Zhang
2021-04-29  0:41 ` [dpdk-dev] [PATCH 3/6] net/ice/base: add print if DDP/FW don't support QinQ as expected Qi Zhang
2021-04-29  0:41 ` [dpdk-dev] [PATCH 4/6] net/ice/base: modififcation to support L3 DSCP QoS Qi Zhang
2021-04-29  0:41 ` [dpdk-dev] [PATCH 5/6] net/ice/base: signed External Device Package Programming Qi Zhang
2021-04-29  0:41 ` [dpdk-dev] [PATCH 6/6] net/ice/base: support IP fragment RSS and FDIR Qi Zhang
2021-04-29  2:30 ` [dpdk-dev] [PATCH 0/6] net/ice: base update update batch 3 Yang, Qiming
2021-04-29  2:50   ` Zhang, Qi Z
2021-04-30 11:57 ` Ferruh Yigit
2021-04-30 14:01   ` Zhang, Qi Z
2021-04-30 13:59 ` [dpdk-dev] [PATCH v2 " Qi Zhang
2021-04-30 13:59   ` Qi Zhang [this message]
2021-04-30 13:59   ` [dpdk-dev] [PATCH v2 2/6] net/ice/base: add function for post DDP download VLAN mode configuration Qi Zhang
2021-04-30 13:59   ` [dpdk-dev] [PATCH v2 3/6] net/ice/base: add print if DDP/FW don't support QinQ as expected Qi Zhang
2021-04-30 13:59   ` [dpdk-dev] [PATCH v2 4/6] net/ice/base: support L3 DSCP QoS Qi Zhang
2021-04-30 13:59   ` [dpdk-dev] [PATCH v2 5/6] net/ice/base: sign external device package programming Qi Zhang
2021-04-30 13:59   ` [dpdk-dev] [PATCH v2 6/6] net/ice/base: support IP fragment RSS and FDIR Qi Zhang
2021-04-30 14:02   ` [dpdk-dev] [PATCH v2 0/6] net/ice: base update update batch 3 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=20210430135922.2990103-2-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jia.guo@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=ting.xu@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).