From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B09D64611C; Fri, 24 Jan 2025 10:44:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C27540EE1; Fri, 24 Jan 2025 10:44:48 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mails.dpdk.org (Postfix) with ESMTP id D90D2402E9 for ; Fri, 24 Jan 2025 10:44:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737711886; x=1769247886; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9t4jg2j3fDE0M2gkrAPPy2CvifqAmhC2eV3Zc89LwAc=; b=UQXS2mwZS0GmNZxY45VfpMTJzldwS1EJTHDlptQogr8h7gW0HCme8/u8 CEJJuqQidTt4xf5ECb/ax4ClY9/hsfe9RLJsiiunc1GBuVHKDyiQjpeSK hRZ9wv1PNDzJmFD9ZDSKHg5bYxosUtLl0oKMuK5AseP8B65WnoxmON86k Jqes6HAHE2ZHZ1PWJOil7ZPw3HEYMjIlsNuD1EBVdl1cJkv65N7H8jl1J pFFm6iUrKZdbnfGedxRBzkCJqrlhBAYgeAMyKbXjfD2BHT3pN2oSsxDRK TTJVIDjBgZp5woaWZO9by0nTjK574y0NQUYSqSLF8JfKYp7UiJwcFteUd Q==; X-CSE-ConnectionGUID: 2hs27ZE2ROyU/ZOYYH+Ptg== X-CSE-MsgGUID: xbRTfLrXQJK4CV/Zo/nILA== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="38341307" X-IronPort-AV: E=Sophos;i="6.12,310,1728975600"; d="scan'208";a="38341307" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2025 01:44:46 -0800 X-CSE-ConnectionGUID: SI631FheSzmkcJTP6ra5xw== X-CSE-MsgGUID: Ib3x/p2LS0KKAqn4KDplaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="107568371" Received: from unknown (HELO localhost.localdomain) ([10.239.252.253]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2025 01:44:44 -0800 From: Mingjin Ye To: dev@dpdk.org Cc: Mingjin Ye , Bruce Richardson , Anatoly Burakov Subject: [PATCH v2 1/3] net/ice/base: add ipv4 fragment related field Date: Fri, 24 Jan 2025 09:13:21 +0000 Message-Id: <20250124091324.403435-2-mingjinx.ye@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250124091324.403435-1-mingjinx.ye@intel.com> References: <20250122082310.380054-0-mingjinx.ye@intel.com> <20250124091324.403435-1-mingjinx.ye@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Added support for the Flags and Fragment Offset fields of ipv4 fragments. Field definitions are the same as in rte_ipv4_hdr. Signed-off-by: Mingjin Ye --- V2: All names standardised to *_IPV4_FRAG_OFS. --- drivers/net/ice/base/ice_fdir.h | 2 ++ drivers/net/ice/base/ice_flow.c | 5 +++++ drivers/net/ice/base/ice_flow.h | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h index 1bb8a14a5d..3dd03f93f7 100644 --- a/drivers/net/ice/base/ice_fdir.h +++ b/drivers/net/ice/base/ice_fdir.h @@ -56,6 +56,7 @@ #define ICE_IPV4_TOS_OFFSET 15 #define ICE_IPV4_ID_OFFSET 18 #define ICE_IPV4_TTL_OFFSET 22 +#define ICE_IPV4_FRAG_OFS 20 #define ICE_IPV6_TC_OFFSET 14 #define ICE_IPV6_HLIM_OFFSET 21 #define ICE_IPV6_PROTO_OFFSET 20 @@ -181,6 +182,7 @@ struct ice_fdir_v4 { u8 proto; u8 ttl; __be16 packet_id; + __be16 fragment_offset; }; #define ICE_IPV6_ADDR_LEN_AS_U32 4 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 0d64a5bb1e..cdc9ee26c5 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -19,6 +19,7 @@ #define ICE_FLOW_FLD_SZ_TCP_CHKSUM 2 #define ICE_FLOW_FLD_SZ_UDP_CHKSUM 2 #define ICE_FLOW_FLD_SZ_SCTP_CHKSUM 4 +#define ICE_FLOW_FLD_SZ_IPV4_FRAG_OFS 2 #define ICE_FLOW_FLD_SZ_IP_DSCP 1 #define ICE_FLOW_FLD_SZ_IP_TTL 1 #define ICE_FLOW_FLD_SZ_IP_PROT 1 @@ -87,6 +88,9 @@ struct ice_flow_field_info ice_flds_info[ICE_FLOW_FIELD_IDX_MAX] = { /* ICE_FLOW_FIELD_IDX_IPV4_TTL */ ICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_NONE, 8, ICE_FLOW_FLD_SZ_IP_TTL, 0xff00), + /* ICE_FLOW_FIELD_IDX_IPV4_FRAG_OFS */ + ICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_IPV_FRAG, 6, + ICE_FLOW_FLD_SZ_IPV4_FRAG_OFS, 0x3fff), /* ICE_FLOW_FIELD_IDX_IPV4_PROT */ ICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_NONE, 8, ICE_FLOW_FLD_SZ_IP_PROT, 0x00ff), @@ -1459,6 +1463,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, prot_id = ICE_PROT_IPV4_IL_IL; break; case ICE_FLOW_FIELD_IDX_IPV4_ID: + case ICE_FLOW_FIELD_IDX_IPV4_FRAG_OFS: prot_id = ICE_PROT_IPV4_OF_OR_S; break; case ICE_FLOW_FIELD_IDX_IPV6_SA: diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h index 65b261beca..6cbddef8c8 100644 --- a/drivers/net/ice/base/ice_flow.h +++ b/drivers/net/ice/base/ice_flow.h @@ -239,6 +239,7 @@ enum ice_flow_field { ICE_FLOW_FIELD_IDX_IPV4_DSCP, ICE_FLOW_FIELD_IDX_IPV6_DSCP, ICE_FLOW_FIELD_IDX_IPV4_TTL, + ICE_FLOW_FIELD_IDX_IPV4_FRAG_OFS, ICE_FLOW_FIELD_IDX_IPV4_PROT, ICE_FLOW_FIELD_IDX_IPV6_TTL, ICE_FLOW_FIELD_IDX_IPV6_PROT, -- 2.25.1