From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: xiaolong.ye@intel.com, dev@dpdk.org,
Qi Zhang <qi.z.zhang@intel.com>,
Henry Tieman <henry.w.tieman@intel.com>,
Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Subject: [dpdk-dev] [PATCH 05/12] net/ice/base: flexbytes should match on header data
Date: Thu, 5 Dec 2019 20:38:40 +0800 [thread overview]
Message-ID: <20191205123847.39579-6-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20191205123847.39579-1-qi.z.zhang@intel.com>
Change the extraction sequence generated by flow director flexbytes to
use package mac protocol. Without this change data in packet headers
cannot be used for flexbyte matching. The old extraction for flex bytes
started at the beginning of the payload which is after the header.
Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_flow.c | 17 ++++-------------
drivers/net/ice/base/ice_flow.h | 2 +-
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 391df1b54..eaa7a3b96 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -868,20 +868,11 @@ ice_flow_xtract_raws(struct ice_hw *hw, struct ice_flow_prof_params *params,
raw = ¶ms->prof->segs[seg].raws[i];
- /* Only support matching raw fields in the payload */
- if (raw->off < hdrs_sz)
- return ICE_ERR_PARAM;
-
- /* Convert the segment-relative offset into payload-relative
- * offset.
- */
- off = raw->off - hdrs_sz;
-
/* Storing extraction information */
- raw->info.xtrct.prot_id = ICE_PROT_PAY;
- raw->info.xtrct.off = (off / ICE_FLOW_FV_EXTRACT_SZ) *
+ raw->info.xtrct.prot_id = ICE_PROT_MAC_OF_OR_S;
+ raw->info.xtrct.off = (raw->off / ICE_FLOW_FV_EXTRACT_SZ) *
ICE_FLOW_FV_EXTRACT_SZ;
- raw->info.xtrct.disp = (off % ICE_FLOW_FV_EXTRACT_SZ) *
+ raw->info.xtrct.disp = (raw->off % ICE_FLOW_FV_EXTRACT_SZ) *
BITS_PER_BYTE;
raw->info.xtrct.idx = params->es_cnt;
@@ -909,7 +900,7 @@ ice_flow_xtract_raws(struct ice_hw *hw, struct ice_flow_prof_params *params,
else
idx = params->es_cnt;
- params->es[idx].prot_id = ICE_PROT_PAY;
+ params->es[idx].prot_id = raw->info.xtrct.prot_id;
params->es[idx].off = off;
params->es_cnt++;
off += ICE_FLOW_FV_EXTRACT_SZ;
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 4686274af..d7b10ccc3 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -282,8 +282,8 @@ struct ice_flow_fld_info {
};
struct ice_flow_seg_fld_raw {
- int off; /* Offset from the start of the segment */
struct ice_flow_fld_info info;
+ u16 off; /* Offset from the start of the segment */
};
struct ice_flow_seg_info {
--
2.13.6
next prev parent reply other threads:[~2019-12-05 12:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 12:38 [dpdk-dev] [PATCH 00/12] base code update Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 01/12] net/ice/base: whitelist register for NVM access Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 02/12] net/ice/base: support MAC/VLAN with TCP/UDP in switch Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 03/12] net/ice/base: do not wait for PE unit to load Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 04/12] net/ice/base: cleanup format of static const declarations Qi Zhang
2019-12-05 12:38 ` Qi Zhang [this message]
2019-12-05 12:38 ` [dpdk-dev] [PATCH 06/12] net/ice/base: enable clearing of the HW tables Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 07/12] net/ice/base: fix loop limit Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 08/12] net/ice/base: increase PF reset wait timeout Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 09/12] net/ice/base: change fdir desc preparation Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 10/12] net/ice/base: support add MAC rules on specific port Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 11/12] net/ice: support 1/10G device IDs Qi Zhang
2019-12-05 12:38 ` [dpdk-dev] [PATCH 12/12] net/ice/base: minor code clean Qi Zhang
2020-01-02 6:00 ` [dpdk-dev] [PATCH 00/12] base code update Yang, Qiming
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 " Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 01/12] net/ice/base: whitelist register for NVM access Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 02/12] net/ice/base: support MAC/VLAN with TCP/UDP in switch Qi Zhang
2020-01-06 4:00 ` Patil, Kiran
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 03/12] net/ice/base: do not wait for PE unit to load Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 04/12] net/ice/base: cleanup format of static const declarations Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 05/12] net/ice/base: flexbytes should match on header data Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 06/12] net/ice/base: enable clearing of the HW tables Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 07/12] net/ice/base: fix loop limit Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 08/12] net/ice/base: increase PF reset wait timeout Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 09/12] net/ice/base: change fdir desc preparation Qi Zhang
2020-01-06 4:01 ` Patil, Kiran
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 10/12] net/ice/base: support add MAC rules on specific port Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 11/12] net/ice: support 1/10G device IDs Qi Zhang
2020-01-06 3:38 ` [dpdk-dev] [PATCH v2 12/12] net/ice/base: minor code clean Qi Zhang
2020-01-09 4:38 ` [dpdk-dev] [PATCH v2 00/12] base code update Ye Xiaolong
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=20191205123847.39579-6-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=henry.w.tieman@intel.com \
--cc=paul.m.stillwell.jr@intel.com \
--cc=qiming.yang@intel.com \
--cc=xiaolong.ye@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).