From: Yahui Cao <yahui.cao@intel.com>
To: Qiming Yang <qiming.yang@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
Yahui Cao <yahui.cao@intel.com>,
Xiaolong Ye <xiaolong.ye@intel.com>,
Ying A Wang <ying.a.wang@intel.com>,
Simei Su <simei.su@intel.com>,
Chenmin Sun <chenmin.sun@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header
Date: Wed, 20 Nov 2019 21:28:36 +0800 [thread overview]
Message-ID: <20191120132836.75142-3-yahui.cao@intel.com> (raw)
In-Reply-To: <20191120132836.75142-1-yahui.cao@intel.com>
Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC
extension header.
Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel")
Cc: yahui.cao@intel.com
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 9e251cee5..7214380ea 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -68,6 +68,9 @@
ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
#define ICE_FDIR_INSET_GTPU_IPV4 (\
+ ICE_INSET_GTPU_TEID)
+
+#define ICE_FDIR_INSET_GTPU_EH_IPV4 (\
ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
@@ -123,6 +126,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
{pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp,
ICE_FDIR_INSET_VXLAN_IPV4_SCTP, ICE_INSET_NONE},
{pattern_eth_ipv4_gtpu_ipv4, ICE_FDIR_INSET_GTPU_IPV4, ICE_INSET_NONE},
+ {pattern_eth_ipv4_gtpu_eh_ipv4,
+ ICE_FDIR_INSET_GTPU_EH_IPV4, ICE_INSET_NONE},
};
static struct ice_flow_parser ice_fdir_parser_os;
@@ -837,6 +842,7 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow,
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP:
case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER:
ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH |
+ ICE_FLOW_SEG_HDR_GTPU_IP |
ICE_FLOW_SEG_HDR_IPV4);
break;
default:
@@ -1733,6 +1739,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
filter->input.gtpu_data.teid = gtp_spec->teid;
}
+
+ tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU;
break;
case RTE_FLOW_ITEM_TYPE_GTP_PSC:
gtp_psc_spec = item->spec;
@@ -1745,8 +1753,6 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
filter->input.gtpu_data.qfi =
gtp_psc_spec->qfi;
}
-
- tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU;
break;
default:
rte_flow_error_set(error, EINVAL,
--
2.17.1
next prev parent reply other threads:[~2019-11-20 5:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 13:28 [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU Yahui Cao
2019-11-20 13:28 ` [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix Yahui Cao
2019-11-20 13:28 ` Yahui Cao [this message]
2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao
2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao
2019-11-20 9:17 ` Zhang, Qi Z
2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao
2019-11-20 9:18 ` Zhang, Qi Z
2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao
2019-11-21 3:58 ` Zhang, Qi Z
2019-11-21 5:27 ` Ye Xiaolong
2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 1/2] net/ice: fix pattern name of GTPU with extension header Yahui Cao
2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 2/2] net/ice: add missing FDIR support for GTPU without " Yahui Cao
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=20191120132836.75142-3-yahui.cao@intel.com \
--to=yahui.cao@intel.com \
--cc=chenmin.sun@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=simei.su@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=xiaolong.ye@intel.com \
--cc=ying.a.wang@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).