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 BA39F460E0; Wed, 22 Jan 2025 09:53:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F4494042C; Wed, 22 Jan 2025 09:53:19 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mails.dpdk.org (Postfix) with ESMTP id 49A8A402B2 for ; Wed, 22 Jan 2025 09:53:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737535999; x=1769071999; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zAAgttCoQ5dYH/WWTDJ7mUTihVdlUqF/+F88JHHMLb0=; b=a2GuUyX4BkEYnrxu9idgatFjkXfZC4/4XyaywI5whocH02wARuI5izH7 fLJrVsJVQeJ+8tMW0tOY+ePAl/hsDxXBj0ccOzAh1V7ladxbqI/1K2K2w g88Feyu5v4xcOsHfTb+7GvFmF2wcKClpFKkkxl78juLYDXsx67T4qzSJu m1pSylFvLjVoypxeKueJdqKdZPeDOrr9tuwKIKMde8LPVzdc6w4SCDmDU V7BZKMDIpwOLMF9BMxwuw+eLL53RcC7ex9QNXlrqcaBsxTEsCio+9Rsyw rasD6bMe7fE9ZOhyLyRbw1Uin5z6aXMUIFP2+0xdEaHZLBRJoRObJsNaa w==; X-CSE-ConnectionGUID: 8W7oQGkSR9+SD777qsDzWw== X-CSE-MsgGUID: 06SlvtvcSO61PwSmCexnRw== X-IronPort-AV: E=McAfee;i="6700,10204,11322"; a="37865375" X-IronPort-AV: E=Sophos;i="6.13,224,1732608000"; d="scan'208";a="37865375" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2025 00:53:18 -0800 X-CSE-ConnectionGUID: YtoVb9GRSPGXZFVQ3Ou3tg== X-CSE-MsgGUID: ZtKas4pdQ/ic7Op8RmjCbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,224,1732608000"; d="scan'208";a="112076318" Received: from unknown (HELO localhost.localdomain) ([10.239.252.253]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2025 00:53:16 -0800 From: Mingjin Ye To: dev@dpdk.org Cc: Mingjin Ye , Bruce Richardson , Anatoly Burakov Subject: [PATCH 1/3] net/ice/base: add ipv4 fragment related field Date: Wed, 22 Jan 2025 08:23:08 +0000 Message-Id: <20250122082310.380054-2-mingjinx.ye@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250122082310.380054-1-mingjinx.ye@intel.com> References: <20250122082310.380054-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 --- 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..3461f8dfba 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_FRAGMENT_OFFSET 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..60d640a26f 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -21,6 +21,7 @@ #define ICE_FLOW_FLD_SZ_SCTP_CHKSUM 4 #define ICE_FLOW_FLD_SZ_IP_DSCP 1 #define ICE_FLOW_FLD_SZ_IP_TTL 1 +#define ICE_FLOW_FLD_SZ_IP_FLAGS 2 #define ICE_FLOW_FLD_SZ_IP_PROT 1 #define ICE_FLOW_FLD_SZ_PORT 2 #define ICE_FLOW_FLD_SZ_TCP_FLAGS 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_OFFSET */ + ICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_IPV_FRAG, 6, + ICE_FLOW_FLD_SZ_IP_FLAGS, 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_OFFSET: 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..a87c0e4567 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_OFFSET, ICE_FLOW_FIELD_IDX_IPV4_PROT, ICE_FLOW_FIELD_IDX_IPV6_TTL, ICE_FLOW_FIELD_IDX_IPV6_PROT, -- 2.25.1