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 99567A0524; Wed, 2 Jun 2021 04:41:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D4D6410E1; Wed, 2 Jun 2021 04:41:21 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id C748D410E0 for ; Wed, 2 Jun 2021 04:41:19 +0200 (CEST) IronPort-SDR: wdX3u/x6Yxh3ao8/jx+DPZBRT0I1SNHpMZmL/Pb1iGilK9j+kQR5uWcXo7nZYIEscCMN/MD/l6 9fp7iYtfrSdQ== X-IronPort-AV: E=McAfee;i="6200,9189,10002"; a="190799240" X-IronPort-AV: E=Sophos;i="5.83,241,1616482800"; d="scan'208";a="190799240" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2021 19:41:19 -0700 IronPort-SDR: s3seYUgG5Vhix6vDVASWSNuY0XvAheTA/nLhRm5dbSLBVfCn6ZVdNn4rH5kikU4SaWSWioBNq4 6jPC+jFgtjng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,241,1616482800"; d="scan'208";a="447221330" Received: from wuwenjun.sh.intel.com ([10.67.110.207]) by fmsmga008.fm.intel.com with ESMTP; 01 Jun 2021 19:41:16 -0700 From: Wenjun Wu To: dev@dpdk.org, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: Wenjun Wu Date: Wed, 2 Jun 2021 10:24:39 +0800 Message-Id: <20210602022442.264961-2-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210602022442.264961-1-wenjun1.wu@intel.com> References: <20210527074845.1263679> <20210602022442.264961-1-wenjun1.wu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/4] net/iavf: support flow pattern for GRE 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 Sender: "dev" Add GRE pattern support for AVF FDIR and RSS. Patterns are listed below: 1. eth/ipv4/gre/ipv4 2. eth/ipv4/gre/ipv6 3. eth/ipv6/gre/ipv4 4. eth/ipv6/gre/ipv6 5. eth/ipv4/gre/ipv4/tcp 6. eth/ipv4/gre/ipv6/tcp 7. eth/ipv4/gre/ipv4/udp 8. eth/ipv4/gre/ipv6/udp 9. eth/ipv6/gre/ipv4/tcp 10. eth/ipv6/gre/ipv6/tcp 11. eth/ipv6/gre/ipv4/udp 12. eth/ipv6/gre/ipv6/udp Signed-off-by: Wenjun Wu --- drivers/net/iavf/iavf_generic_flow.c | 105 +++++++++++++++++++++++++++ drivers/net/iavf/iavf_generic_flow.h | 14 ++++ 2 files changed, 119 insertions(+) diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index 242bb4abc5..d9ba5735b2 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -822,6 +822,111 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_ecpri[] = { RTE_FLOW_ITEM_TYPE_END, }; +/* GRE */ +enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv4[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv6[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv4[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv6[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv4_tcp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_TCP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv4_udp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv6_tcp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_TCP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv6_udp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv4_tcp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_TCP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv4_udp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv6_tcp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_TCP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv6_udp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_GRE, + RTE_FLOW_ITEM_TYPE_IPV6, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_END, +}; + typedef struct iavf_flow_engine * (*parse_engine_t)(struct iavf_adapter *ad, struct rte_flow *flow, struct iavf_parser_list *parser_list, diff --git a/drivers/net/iavf/iavf_generic_flow.h b/drivers/net/iavf/iavf_generic_flow.h index e19da15518..48fd03a973 100644 --- a/drivers/net/iavf/iavf_generic_flow.h +++ b/drivers/net/iavf/iavf_generic_flow.h @@ -308,6 +308,20 @@ extern enum rte_flow_item_type iavf_pattern_eth_ipv6_pfcp[]; extern enum rte_flow_item_type iavf_pattern_eth_ecpri[]; extern enum rte_flow_item_type iavf_pattern_eth_ipv4_ecpri[]; +/* GRE */ +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv4[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv6[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv4[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv6[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv4_tcp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv6_tcp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv4_udp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gre_ipv6_udp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv4_tcp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv6_tcp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv4_udp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv6_gre_ipv6_udp[]; + extern const struct rte_flow_ops iavf_flow_ops; /* pattern structure */ -- 2.25.1