From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2967A04F1; Wed, 17 Jun 2020 04:45:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDA321BFE3; Wed, 17 Jun 2020 04:45:45 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 89F601BFE3 for ; Wed, 17 Jun 2020 04:45:44 +0200 (CEST) IronPort-SDR: Y0huq3MszD9xlq3W2Uddb8kZO9PY1bmVNUYCRDucrA4M9UQGR1AO2jZDLPyjPTOGRGtAMY15Iw QI54InrkcmWw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2020 19:45:43 -0700 IronPort-SDR: BC2ValbmbvQ37TKmHB9lnTYyDj/lX//VsVNHUDMswNAQzlHlZSS5MoxtG+lzPng4TMpyL61L8H 4EqlU1FV7hzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,520,1583222400"; d="scan'208";a="420985656" Received: from dpdk-junfengguo-v3.sh.intel.com ([10.67.119.102]) by orsmga004.jf.intel.com with ESMTP; 16 Jun 2020 19:45:40 -0700 From: Junfeng Guo To: qi.z.zhang@intel.com, xiaolong.ye@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, jia.guo@intel.com, junfeng.guo@intel.com, simei.su@intel.com Date: Wed, 17 Jun 2020 10:43:55 +0800 Message-Id: <20200617024355.44220-3-junfeng.guo@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200617024355.44220-1-junfeng.guo@intel.com> References: <20200615050441.55224-1-junfeng.guo@intel.com> <20200617024355.44220-1-junfeng.guo@intel.com> Subject: [dpdk-dev] [PATCH v3 2/2] net/iavf: add FD support for GTPU with outer IP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add FDir support for MAC_IPV6_GTPU type with outer IP address, teid and qfi fields matching. Note that outer IP matching fields here includes both SRC & DST of both IPv4 & IPv6. Signed-off-by: Junfeng Guo --- drivers/net/iavf/iavf_fdir.c | 18 ++++++++++++++---- drivers/net/iavf/iavf_generic_flow.c | 22 +++++++++++++++++++++- drivers/net/iavf/iavf_generic_flow.h | 12 ++++++++++-- 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index 264c47d83..f584e5624 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -68,14 +68,22 @@ IAVF_INSET_IPV6_TC | IAVF_INSET_IPV6_HOP_LIMIT | \ IAVF_INSET_SCTP_SRC_PORT | IAVF_INSET_SCTP_DST_PORT) -#define IAVF_FDIR_INSET_GTPU (\ +#define IAVF_FDIR_INSET_IPV4_GTPU (\ IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \ IAVF_INSET_GTPU_TEID) -#define IAVF_FDIR_INSET_GTPU_EH (\ +#define IAVF_FDIR_INSET_IPV4_GTPU_EH (\ IAVF_INSET_IPV4_SRC | IAVF_INSET_IPV4_DST | \ IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI) +#define IAVF_FDIR_INSET_IPV6_GTPU (\ + IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \ + IAVF_INSET_GTPU_TEID) + +#define IAVF_FDIR_INSET_IPV6_GTPU_EH (\ + IAVF_INSET_IPV6_SRC | IAVF_INSET_IPV6_DST | \ + IAVF_INSET_GTPU_TEID | IAVF_INSET_GTPU_QFI) + #define IAVF_FDIR_INSET_L2TPV3OIP (\ IAVF_L2TPV3OIP_SESSION_ID) @@ -106,8 +114,10 @@ static struct iavf_pattern_match_item iavf_fdir_pattern[] = { {iavf_pattern_eth_ipv6_udp, IAVF_FDIR_INSET_ETH_IPV6_UDP, IAVF_INSET_NONE}, {iavf_pattern_eth_ipv6_tcp, IAVF_FDIR_INSET_ETH_IPV6_TCP, IAVF_INSET_NONE}, {iavf_pattern_eth_ipv6_sctp, IAVF_FDIR_INSET_ETH_IPV6_SCTP, IAVF_INSET_NONE}, - {iavf_pattern_eth_ipv4_gtpu, IAVF_FDIR_INSET_GTPU, IAVF_INSET_NONE}, - {iavf_pattern_eth_ipv4_gtpu_eh, IAVF_FDIR_INSET_GTPU_EH, IAVF_INSET_NONE}, + {iavf_pattern_eth_ipv4_gtpu, IAVF_FDIR_INSET_IPV4_GTPU, IAVF_INSET_NONE}, + {iavf_pattern_eth_ipv4_gtpu_eh, IAVF_FDIR_INSET_IPV4_GTPU_EH, IAVF_INSET_NONE}, + {iavf_pattern_eth_ipv6_gtpu, IAVF_FDIR_INSET_IPV6_GTPU, IAVF_INSET_NONE}, + {iavf_pattern_eth_ipv6_gtpu_eh, IAVF_FDIR_INSET_IPV6_GTPU_EH, IAVF_INSET_NONE}, {iavf_pattern_eth_ipv4_l2tpv3, IAVF_FDIR_INSET_L2TPV3OIP, IAVF_INSET_NONE}, {iavf_pattern_eth_ipv6_l2tpv3, IAVF_FDIR_INSET_L2TPV3OIP, IAVF_INSET_NONE}, {iavf_pattern_eth_ipv4_esp, IAVF_FDIR_INSET_ESP, IAVF_INSET_NONE}, diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index b6c26c4fd..c6d48f081 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -315,7 +315,7 @@ enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[] = { RTE_FLOW_ITEM_TYPE_END, }; -/* GTPU */ +/* IPV4 GTPU (EH) */ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[] = { RTE_FLOW_ITEM_TYPE_ETH, RTE_FLOW_ITEM_TYPE_IPV4, @@ -333,6 +333,25 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[] = { RTE_FLOW_ITEM_TYPE_END, }; +/* IPV6 GTPU (EH) */ +enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_GTP_PSC, + RTE_FLOW_ITEM_TYPE_END, +}; + +/* IPV4 GTPU IPv4 */ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = { RTE_FLOW_ITEM_TYPE_ETH, RTE_FLOW_ITEM_TYPE_IPV4, @@ -342,6 +361,7 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = { RTE_FLOW_ITEM_TYPE_END, }; +/* IPV4 GTPU EH IPv4 */ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[] = { RTE_FLOW_ITEM_TYPE_ETH, RTE_FLOW_ITEM_TYPE_IPV4, diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h index 978d0716b..8a6687542 100644 --- a/drivers/net/iavf/iavf_generic_flow.h +++ b/drivers/net/iavf/iavf_generic_flow.h @@ -182,10 +182,18 @@ extern enum rte_flow_item_type iavf_pattern_eth_ipv6_icmp6[]; extern enum rte_flow_item_type iavf_pattern_eth_vlan_ipv6_icmp6[]; extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[]; -/* GTPU */ +/* IPv4 GTPU (EH) */ extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu[]; -extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[]; extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[]; + +/* IPv6 GTPU (EH) */ +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gtpu_eh[]; + +/* IPv4 GTPU IPv4 */ +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[]; + +/* IPv4 GTPU EH IPv4 */ extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4[]; extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp[]; extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp[]; -- 2.17.1