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 A49BCA0546; Thu, 27 May 2021 10:06:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7144B410F5; Thu, 27 May 2021 10:06:03 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 97C32410D8 for ; Thu, 27 May 2021 10:06:01 +0200 (CEST) IronPort-SDR: sw+RRnVl1zzi2iT3WzqrncJF7EeA04Kf7vSaU/jewPcdnnvDFFVjMQUmbOcZUeXB/QTtm4vWnJ gXchQWwBR5QA== X-IronPort-AV: E=McAfee;i="6200,9189,9996"; a="223877741" X-IronPort-AV: E=Sophos;i="5.82,334,1613462400"; d="scan'208";a="223877741" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2021 01:06:01 -0700 IronPort-SDR: Zvdf5lzNLxMmjQtKl76TduSJDSJxEGQRV7Ld9JC4hkguTW6IK4ya49o+Mabi8VCDeGEeNP1obl VL6fXE/vxRIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,334,1613462400"; d="scan'208";a="477382038" Received: from wuwenjun.sh.intel.com ([10.67.110.159]) by orsmga001.jf.intel.com with ESMTP; 27 May 2021 01:05:59 -0700 From: Wenjun Wu To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com Cc: Wenjun Wu Date: Thu, 27 May 2021 15:48:40 +0800 Message-Id: <20210527074845.1263679-2-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210527074845.1263679-1-wenjun1.wu@intel.com> References: <20210527074845.1263679-1-wenjun1.wu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1 1/6] 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