From patchwork Fri Jul 3 11:16:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73029 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE021A0519; Fri, 3 Jul 2020 16:39:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08CEE1DC6D; Fri, 3 Jul 2020 16:37:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A2A081D8CF for ; Fri, 3 Jul 2020 13:17:12 +0200 (CEST) IronPort-SDR: zYC4HizHWDoLGhyjugmFo7bIiC+UiORA+9Ug53OE81NJcdsLnAsGwI4IPn/oPpCJNKvVLHjT+7 jmHMy8X0Mf/w== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220533" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220533" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:12 -0700 IronPort-SDR: ZVbzZayO6mxkL4iOll4HFswblMMGUj2ffp809ueh2X4ehKRkWTrlPGQx51j9PKmKJgBU/coSQo mSQHUwXUvC8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780281" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:11 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com, Qi Zhang Date: Fri, 3 Jul 2020 12:16:37 +0100 Message-Id: <20200703111644.73351-2-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 1/8] common/iavf: add large queue VC ops 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" From: Qi Zhang Add VC ops to support 64 queue VIRTCHNL_OP_ENABLE_LARGE_QUEUES VIRTCHNL_OP_DISABLE_LARGE_QUEUES VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP Signed-off-by: Qi Zhang --- drivers/common/iavf/virtchnl.h | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index 79515ee8b..5b0455fb4 100644 --- a/drivers/common/iavf/virtchnl.h +++ b/drivers/common/iavf/virtchnl.h @@ -140,6 +140,9 @@ enum virtchnl_ops { VIRTCHNL_OP_ADD_FDIR_FILTER = 47, VIRTCHNL_OP_DEL_FDIR_FILTER = 48, VIRTCHNL_OP_QUERY_FDIR_FILTER = 49, + VIRTCHNL_OP_ENABLE_LARGE_QUEUES = 50, + VIRTCHNL_OP_DISABLE_LARGE_QUEUES = 51, + VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP = 52, }; /* These macros are used to generate compilation errors if a structure/union @@ -258,6 +261,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource); #define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC 0X04000000 #define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF 0X08000000 #define VIRTCHNL_VF_OFFLOAD_FDIR_PF 0X10000000 +#define VIRTCHNL_VF_OFFLOAD_LARGE_VF 0X20000000 /* 0X80000000 is reserved */ /* Define below the capability flags that are not offloads */ @@ -396,6 +400,18 @@ struct virtchnl_vector_map { VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_vector_map); +struct virtchnl_large_vector_map { + u64 rxq_map; + u64 txq_map; + u16 vsi_id; + u16 vector_id; + u16 rxitr_idx; + u16 txitr_idx; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_large_vector_map); + + struct virtchnl_irq_map_info { u16 num_vectors; struct virtchnl_vector_map vecmap[1]; @@ -403,6 +419,14 @@ struct virtchnl_irq_map_info { VIRTCHNL_CHECK_STRUCT_LEN(14, virtchnl_irq_map_info); +struct virtchnl_large_irq_map_info { + u16 num_vectors; + struct virtchnl_large_vector_map vecmap[1]; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(32, virtchnl_large_irq_map_info); + + /* VIRTCHNL_OP_ENABLE_QUEUES * VIRTCHNL_OP_DISABLE_QUEUES * VF sends these message to enable or disable TX/RX queue pairs. @@ -423,6 +447,16 @@ struct virtchnl_queue_select { VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select); +struct virtchnl_large_queue_select { + u64 rx_queues; + u64 tx_queues; + u16 vsi_id; + u16 pad; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_large_queue_select); + + /* VIRTCHNL_OP_ADD_ETH_ADDR * VF sends this message in order to add one or more unicast or multicast * address filters for the specified VSI. @@ -771,6 +805,10 @@ enum virtchnl_vector_limits { VIRTCHNL_OP_ENABLE_CHANNELS_MAX = ((u16)(~0) - sizeof(struct virtchnl_tc_info)) / sizeof(struct virtchnl_channel_info), + + VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP_MAX = + ((u16)(~0) - sizeof(struct virtchnl_large_irq_map_info)) / + sizeof(struct virtchnl_large_vector_map), }; /* VF reset states - these are written into the RSTAT register: @@ -1163,10 +1201,31 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode, sizeof(struct virtchnl_vector_map)); } break; + case VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP: + valid_len = sizeof(struct virtchnl_large_irq_map_info); + if (msglen >= valid_len) { + struct virtchnl_large_irq_map_info *vimi = + (struct virtchnl_large_irq_map_info *)msg; + + if (vimi->num_vectors == 0 || vimi->num_vectors > + VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP_MAX) { + err_msg_format = true; + break; + } + + valid_len += (vimi->num_vectors * + sizeof(struct virtchnl_large_vector_map)); + } + break; + case VIRTCHNL_OP_ENABLE_QUEUES: case VIRTCHNL_OP_DISABLE_QUEUES: valid_len = sizeof(struct virtchnl_queue_select); break; + case VIRTCHNL_OP_ENABLE_LARGE_QUEUES: + case VIRTCHNL_OP_DISABLE_LARGE_QUEUES: + valid_len = sizeof(struct virtchnl_large_queue_select); + break; case VIRTCHNL_OP_ADD_ETH_ADDR: case VIRTCHNL_OP_DEL_ETH_ADDR: valid_len = sizeof(struct virtchnl_ether_addr_list); From patchwork Fri Jul 3 11:16:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73030 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06D2BA0519; Fri, 3 Jul 2020 16:39:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61FD21DC73; Fri, 3 Jul 2020 16:37:58 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 287331D8CF for ; Fri, 3 Jul 2020 13:17:14 +0200 (CEST) IronPort-SDR: pJEuUekdQQKRxqnp0mxj5ziobpuNHAUb5U/ze0pAEv67pCFs8NE2b0Mts31eXxoT09nwTgFRGc B+dLrbqFD6Sw== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220537" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220537" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:13 -0700 IronPort-SDR: AHupWBQINvN85QuPmxiVbxIhn9sI+ECcrImiE0q9SHvcsUIu+h5iM0XtUssjPpfjLmIM0RmKoI gr52+bi2qF2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780297" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:12 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com, Qi Zhang Date: Fri, 3 Jul 2020 12:16:38 +0100 Message-Id: <20200703111644.73351-3-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 2/8] net/iavf: support 64 queues 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" From: Qi Zhang Enlarge max queue number from 16 to 64 by using "large" vc ops. Signed-off-by: Qi Zhang --- drivers/net/iavf/iavf.h | 4 ++-- drivers/net/iavf/iavf_vchnl.c | 35 ++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index 9be8a2381..039517af9 100644 --- a/drivers/net/iavf/iavf.h +++ b/drivers/net/iavf/iavf.h @@ -19,7 +19,7 @@ #define IAVF_FRAME_SIZE_MAX 9728 #define IAVF_QUEUE_BASE_ADDR_UNIT 128 -#define IAVF_MAX_NUM_QUEUES 16 +#define IAVF_MAX_NUM_QUEUES 64 #define IAVF_NUM_MACADDR_MAX 64 @@ -138,7 +138,7 @@ struct iavf_info { uint16_t nb_msix; /* number of MSI-X interrupts on Rx */ uint16_t msix_base; /* msix vector base from */ /* queue bitmask for each vector */ - uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS]; + uint64_t rxq_map[IAVF_MAX_MSIX_VECTORS]; struct iavf_flow_list flow_list; rte_spinlock_t flow_ops_lock; struct iavf_parser_list rss_parser_list; diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 33acea54a..2b28d0577 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -383,7 +383,8 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) caps = IAVF_BASIC_OFFLOAD_CAPS | VIRTCHNL_VF_CAP_ADV_LINK_SPEED | VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | VIRTCHNL_VF_OFFLOAD_FDIR_PF | - VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF; + VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF | + VIRTCHNL_VF_OFFLOAD_LARGE_VF; args.in_args = (uint8_t *)∩︀ args.in_args_size = sizeof(caps); @@ -450,7 +451,7 @@ int iavf_enable_queues(struct iavf_adapter *adapter) { struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - struct virtchnl_queue_select queue_select; + struct virtchnl_large_queue_select queue_select; struct iavf_cmd_info args; int err; @@ -460,7 +461,7 @@ iavf_enable_queues(struct iavf_adapter *adapter) queue_select.rx_queues = BIT(adapter->eth_dev->data->nb_rx_queues) - 1; queue_select.tx_queues = BIT(adapter->eth_dev->data->nb_tx_queues) - 1; - args.ops = VIRTCHNL_OP_ENABLE_QUEUES; + args.ops = VIRTCHNL_OP_ENABLE_LARGE_QUEUES; args.in_args = (u8 *)&queue_select; args.in_args_size = sizeof(queue_select); args.out_buffer = vf->aq_resp; @@ -468,7 +469,7 @@ iavf_enable_queues(struct iavf_adapter *adapter) err = iavf_execute_vf_cmd(adapter, &args); if (err) { PMD_DRV_LOG(ERR, - "Failed to execute command of OP_ENABLE_QUEUES"); + "Failed to execute command of OP_ENABLE_LARGE_QUEUES"); return err; } return 0; @@ -478,7 +479,7 @@ int iavf_disable_queues(struct iavf_adapter *adapter) { struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - struct virtchnl_queue_select queue_select; + struct virtchnl_large_queue_select queue_select; struct iavf_cmd_info args; int err; @@ -488,7 +489,7 @@ iavf_disable_queues(struct iavf_adapter *adapter) queue_select.rx_queues = BIT(adapter->eth_dev->data->nb_rx_queues) - 1; queue_select.tx_queues = BIT(adapter->eth_dev->data->nb_tx_queues) - 1; - args.ops = VIRTCHNL_OP_DISABLE_QUEUES; + args.ops = VIRTCHNL_OP_DISABLE_LARGE_QUEUES; args.in_args = (u8 *)&queue_select; args.in_args_size = sizeof(queue_select); args.out_buffer = vf->aq_resp; @@ -496,7 +497,7 @@ iavf_disable_queues(struct iavf_adapter *adapter) err = iavf_execute_vf_cmd(adapter, &args); if (err) { PMD_DRV_LOG(ERR, - "Failed to execute command of OP_DISABLE_QUEUES"); + "Failed to execute command of OP_DISABLE_LARGE_QUEUES"); return err; } return 0; @@ -507,7 +508,7 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid, bool rx, bool on) { struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - struct virtchnl_queue_select queue_select; + struct virtchnl_large_queue_select queue_select; struct iavf_cmd_info args; int err; @@ -519,9 +520,9 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid, queue_select.tx_queues |= 1 << qid; if (on) - args.ops = VIRTCHNL_OP_ENABLE_QUEUES; + args.ops = VIRTCHNL_OP_ENABLE_LARGE_QUEUES; else - args.ops = VIRTCHNL_OP_DISABLE_QUEUES; + args.ops = VIRTCHNL_OP_DISABLE_LARGE_QUEUES; args.in_args = (u8 *)&queue_select; args.in_args_size = sizeof(queue_select); args.out_buffer = vf->aq_resp; @@ -529,7 +530,7 @@ iavf_switch_queue(struct iavf_adapter *adapter, uint16_t qid, err = iavf_execute_vf_cmd(adapter, &args); if (err) PMD_DRV_LOG(ERR, "Failed to execute command of %s", - on ? "OP_ENABLE_QUEUES" : "OP_DISABLE_QUEUES"); + on ? "OP_ENABLE_LARGE_QUEUES" : "OP_DISABLE_LARGE_QUEUES"); return err; } @@ -686,13 +687,13 @@ int iavf_config_irq_map(struct iavf_adapter *adapter) { struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - struct virtchnl_irq_map_info *map_info; - struct virtchnl_vector_map *vecmap; + struct virtchnl_large_irq_map_info *map_info; + struct virtchnl_large_vector_map *vecmap; struct iavf_cmd_info args; int len, i, err; - len = sizeof(struct virtchnl_irq_map_info) + - sizeof(struct virtchnl_vector_map) * vf->nb_msix; + len = sizeof(struct virtchnl_large_irq_map_info) + + sizeof(struct virtchnl_large_vector_map) * vf->nb_msix; map_info = rte_zmalloc("map_info", len, 0); if (!map_info) @@ -708,14 +709,14 @@ iavf_config_irq_map(struct iavf_adapter *adapter) vecmap->rxq_map = vf->rxq_map[vf->msix_base + i]; } - args.ops = VIRTCHNL_OP_CONFIG_IRQ_MAP; + args.ops = VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP; args.in_args = (u8 *)map_info; args.in_args_size = len; args.out_buffer = vf->aq_resp; args.out_size = IAVF_AQ_BUF_SZ; err = iavf_execute_vf_cmd(adapter, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command OP_CONFIG_IRQ_MAP"); + PMD_DRV_LOG(ERR, "fail to execute command OP_CONFIG_LARGE_IRQ_MAP"); rte_free(map_info); return err; From patchwork Fri Jul 3 11:16:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73031 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B712EA0519; Fri, 3 Jul 2020 16:39:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8D0C01DC7D; Fri, 3 Jul 2020 16:37:59 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E31F71D8CF for ; Fri, 3 Jul 2020 13:17:14 +0200 (CEST) IronPort-SDR: h1iaqFVc8iUTWnA74MsCFQ6GoJFFfwaEaHZupgyJ6ptJgaA7bWWNGjWqiNipesd4uEm6jp4MSj 3aC+qZn9f7Ew== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220546" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220546" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:14 -0700 IronPort-SDR: q/nY6ehPM85UD6vLWO7O1MsEDGzsKIm8/zn3UAjUTIxA/qYftYMSvtNEPp/rMURZnpi1TyC+BT 6HJl2dK9NMjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780314" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:13 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com, Qi Zhang Date: Fri, 3 Jul 2020 12:16:39 +0100 Message-Id: <20200703111644.73351-4-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 3/8] common/iavf: add large vsi queue config 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" From: Qi Zhang Signed-off-by: Qi Zhang --- drivers/common/iavf/virtchnl.h | 54 ++++++++++++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 6 ++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index 5b0455fb4..caac3468e 100644 --- a/drivers/common/iavf/virtchnl.h +++ b/drivers/common/iavf/virtchnl.h @@ -143,6 +143,7 @@ enum virtchnl_ops { VIRTCHNL_OP_ENABLE_LARGE_QUEUES = 50, VIRTCHNL_OP_DISABLE_LARGE_QUEUES = 51, VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP = 52, + VIRTCHNL_OP_CONFIG_LARGE_VSI_QUEUES = 53, }; /* These macros are used to generate compilation errors if a structure/union @@ -303,6 +304,17 @@ struct virtchnl_txq_info { VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_txq_info); +struct virtchnl_txq_info_2 { + u16 vsi_id; + u16 queue_id; + u16 ring_len; /* number of descriptors, multiple of 8 */ + u16 reserved; + u64 dma_ring_addr; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_txq_info_2); + + /* VIRTCHNL_OP_CONFIG_RX_QUEUE * VF sends this message to set up parameters for one RX queue. * External data buffer contains one instance of virtchnl_rxq_info. @@ -353,6 +365,15 @@ struct virtchnl_queue_pair_info { VIRTCHNL_CHECK_STRUCT_LEN(64, virtchnl_queue_pair_info); +struct virtchnl_large_queue_pair_info { + /* NOTE: vsi_id and queue_id should be identical for both queues. */ + struct virtchnl_txq_info_2 txq; + struct virtchnl_rxq_info rxq; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(56, virtchnl_large_queue_pair_info); + + struct virtchnl_vsi_queue_config_info { u16 vsi_id; u16 num_queue_pairs; @@ -362,6 +383,16 @@ struct virtchnl_vsi_queue_config_info { VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_vsi_queue_config_info); +struct virtchnl_large_vsi_queue_config_info { + u16 vsi_id; + u16 num_queue_pairs; + u32 pad; + struct virtchnl_large_queue_pair_info qpair[1]; +}; + +VIRTCHNL_CHECK_STRUCT_LEN(64, virtchnl_large_vsi_queue_config_info); + + /* VIRTCHNL_OP_REQUEST_QUEUES * VF sends this message to request the PF to allocate additional queues to * this VF. Each VF gets a guaranteed number of queues on init but asking for @@ -809,6 +840,11 @@ enum virtchnl_vector_limits { VIRTCHNL_OP_CONFIG_LARGE_IRQ_MAP_MAX = ((u16)(~0) - sizeof(struct virtchnl_large_irq_map_info)) / sizeof(struct virtchnl_large_vector_map), + + VIRTCHNL_OP_CONFIG_LARGE_VSI_QUEUES_MAX = + ((u16)(~0) - sizeof(struct virtchnl_large_vsi_queue_config_info)) / + sizeof(struct virtchnl_large_queue_pair_info), + }; /* VF reset states - these are written into the RSTAT register: @@ -1185,6 +1221,24 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode, virtchnl_queue_pair_info)); } break; + case VIRTCHNL_OP_CONFIG_LARGE_VSI_QUEUES: + valid_len = sizeof(struct virtchnl_large_vsi_queue_config_info); + if (msglen >= valid_len) { + struct virtchnl_large_vsi_queue_config_info *vqc = + (struct virtchnl_large_vsi_queue_config_info *)msg; + + if (vqc->num_queue_pairs == 0 || vqc->num_queue_pairs > + VIRTCHNL_OP_CONFIG_LARGE_VSI_QUEUES_MAX) { + err_msg_format = true; + break; + } + + valid_len += (vqc->num_queue_pairs * + sizeof(struct + virtchnl_large_queue_pair_info)); + } + break; + case VIRTCHNL_OP_CONFIG_IRQ_MAP: valid_len = sizeof(struct virtchnl_irq_map_info); if (msglen >= valid_len) { diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 2b28d0577..f9db0b3d0 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -606,8 +606,8 @@ iavf_configure_queues(struct iavf_adapter *adapter) struct iavf_tx_queue **txq = (struct iavf_tx_queue **)adapter->eth_dev->data->tx_queues; struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); - struct virtchnl_vsi_queue_config_info *vc_config; - struct virtchnl_queue_pair_info *vc_qp; + struct virtchnl_large_vsi_queue_config_info *vc_config; + struct virtchnl_large_queue_pair_info *vc_qp; struct iavf_cmd_info args; uint16_t i, size; int err; @@ -668,7 +668,7 @@ iavf_configure_queues(struct iavf_adapter *adapter) } memset(&args, 0, sizeof(args)); - args.ops = VIRTCHNL_OP_CONFIG_VSI_QUEUES; + args.ops = VIRTCHNL_OP_CONFIG_LARGE_VSI_QUEUES; args.in_args = (uint8_t *)vc_config; args.in_args_size = size; args.out_buffer = vf->aq_resp; From patchwork Fri Jul 3 11:16:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73032 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1732DA0519; Fri, 3 Jul 2020 16:39:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B25A21DC84; Fri, 3 Jul 2020 16:38:00 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 72B961D9BD for ; Fri, 3 Jul 2020 13:17:16 +0200 (CEST) IronPort-SDR: u897DgtKfqMMJ8rCxAxj2GfKUPnxjmgrXLQFcBZFoDT+DlaW8Dw9UnuUq8xyDhnFebzFropmIR m15i+yVKDHWw== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220548" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220548" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:15 -0700 IronPort-SDR: ekUV5M4s6Zu0lVt9+/4ed/eKx/GdarQ0i/JDb8ac5Ed1SO1O9FP1+fnzc6YYdY55KPMUjeC8Tw Eb1lYswjeJ9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780332" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:14 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com, Qi Zhang Date: Fri, 3 Jul 2020 12:16:40 +0100 Message-Id: <20200703111644.73351-5-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 4/8] net/iavf: support > 256 lut table size 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" From: Qi Zhang Signed-off-by: Qi Zhang --- drivers/net/iavf/iavf_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index e09efffd1..5c7ace8bd 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -169,7 +169,7 @@ iavf_init_rss(struct iavf_adapter *adapter) { struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); struct rte_eth_rss_conf *rss_conf; - uint8_t i, j, nb_q; + uint16_t i, j, nb_q; int ret; rss_conf = &adapter->eth_dev->data->dev_conf.rx_adv_conf.rss_conf; From patchwork Fri Jul 3 11:16:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73033 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A39A3A0519; Fri, 3 Jul 2020 16:39:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA84F1DC8B; Fri, 3 Jul 2020 16:38:01 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A2F811D8CF for ; Fri, 3 Jul 2020 13:17:17 +0200 (CEST) IronPort-SDR: /ZAqqQU6tLL3cHLGFBCsFmxgr+PR43kYFszbt7hfxp8AfbFGlrVtJwzRbhx2RznXT2O56HLknz FIOFFlNV2smg== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220554" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220554" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:17 -0700 IronPort-SDR: Q0R+SlJP3QstYGMJi7dD6b25bWJAViPEXCBTp1f5LuwJmqxz1fGpndVJWRfAU7mndUWIE9hiMP S1XdIp/ktPqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780362" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:15 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com Date: Fri, 3 Jul 2020 12:16:41 +0100 Message-Id: <20200703111644.73351-6-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 5/8] Support dst ip only for RSS 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" From: gordonno --- drivers/net/iavf/iavf_hash.c | 476 +++++++++++++++++++++-------------- 1 file changed, 281 insertions(+), 195 deletions(-) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index af528863b..a7691ef0c 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -35,6 +35,12 @@ enum iavf_pattern_hint_type { IAVF_PATTERN_HINT_IPV6_SCTP, }; +enum iavf_gtpu_hint { + IAVF_GTPU_HINT_DOWNLINK, + IAVF_GTPU_HINT_UPLINK, + IAVF_GTPU_HINT_NONE, +}; + struct iavf_pattern_match_type { enum iavf_pattern_hint_type phint_type; }; @@ -43,6 +49,7 @@ struct iavf_hash_match_type { enum iavf_pattern_hint_type phint_type; uint64_t hash_type; struct virtchnl_proto_hdrs *proto_hdrs; + enum iavf_gtpu_hint gtpu_hint; }; struct iavf_rss_meta { @@ -147,9 +154,6 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { {iavf_pattern_empty, IAVF_INSET_NONE, &phint_empty}, }; -#define GTP_EH_PDU_LINK_UP 1 -#define GTP_EH_PDU_LINK_DWN 0 - #define TUNNEL_LEVEL_OUTER 0 #define TUNNEL_LEVEL_FIRST_INNER 1 @@ -160,103 +164,112 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { #define BUFF_NOUSED 0 #define FIELD_FOR_PROTO_ONLY 0 +#define FIELD_SELECTOR(proto_hdr_field) \ + (1UL << ((proto_hdr_field) & PROTO_HDR_FIELD_MASK)) + #define proto_hint_eth_src { \ - VIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_ETH_SRC, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC), \ + {BUFF_NOUSED } } #define proto_hint_eth_dst { \ - VIRTCHNL_PROTO_HDR_ETH, VIRTCHNL_PROTO_HDR_ETH_DST, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST), \ + {BUFF_NOUSED } } #define proto_hint_eth_only { \ VIRTCHNL_PROTO_HDR_ETH, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } #define proto_hint_eth { \ VIRTCHNL_PROTO_HDR_ETH, \ - VIRTCHNL_PROTO_HDR_ETH_SRC | VIRTCHNL_PROTO_HDR_ETH_DST, \ - {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST), {BUFF_NOUSED } } #define proto_hint_svlan { \ - VIRTCHNL_PROTO_HDR_S_VLAN, VIRTCHNL_PROTO_HDR_S_VLAN_ID, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_S_VLAN, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_S_VLAN_ID), {BUFF_NOUSED } } #define proto_hint_cvlan { \ - VIRTCHNL_PROTO_HDR_C_VLAN, VIRTCHNL_PROTO_HDR_C_VLAN_ID, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_C_VLAN, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_C_VLAN_ID), {BUFF_NOUSED } } #define proto_hint_ipv4_src { \ - VIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV4_SRC, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC), \ + {BUFF_NOUSED } } #define proto_hint_ipv4_dst { \ - VIRTCHNL_PROTO_HDR_IPV4, VIRTCHNL_PROTO_HDR_IPV4_DST, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), \ + {BUFF_NOUSED } } #define proto_hint_ipv4_only { \ VIRTCHNL_PROTO_HDR_IPV4, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } #define proto_hint_ipv4 { \ VIRTCHNL_PROTO_HDR_IPV4, \ - VIRTCHNL_PROTO_HDR_IPV4_SRC | VIRTCHNL_PROTO_HDR_IPV4_DST, \ - {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), {BUFF_NOUSED } } #define proto_hint_udp_src_port { \ - VIRTCHNL_PROTO_HDR_UDP, VIRTCHNL_PROTO_HDR_UDP_SRC_PORT, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_UDP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT), {BUFF_NOUSED } } #define proto_hint_udp_dst_port { \ - VIRTCHNL_PROTO_HDR_UDP, VIRTCHNL_PROTO_HDR_UDP_DST_PORT, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_UDP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_DST_PORT), {BUFF_NOUSED } } #define proto_hint_udp_only { \ VIRTCHNL_PROTO_HDR_UDP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } #define proto_hint_udp { \ VIRTCHNL_PROTO_HDR_UDP, \ - VIRTCHNL_PROTO_HDR_UDP_SRC_PORT | VIRTCHNL_PROTO_HDR_UDP_DST_PORT, \ - {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_DST_PORT), {BUFF_NOUSED } } #define proto_hint_tcp_src_port { \ - VIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_TCP_SRC_PORT, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_TCP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT), {BUFF_NOUSED } } #define proto_hint_tcp_dst_port { \ - VIRTCHNL_PROTO_HDR_TCP, VIRTCHNL_PROTO_HDR_TCP_DST_PORT, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_TCP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_DST_PORT), {BUFF_NOUSED } } #define proto_hint_tcp_only { \ VIRTCHNL_PROTO_HDR_TCP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } #define proto_hint_tcp { \ VIRTCHNL_PROTO_HDR_TCP, \ - VIRTCHNL_PROTO_HDR_TCP_SRC_PORT | VIRTCHNL_PROTO_HDR_TCP_DST_PORT, \ - {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_DST_PORT), {BUFF_NOUSED } } #define proto_hint_sctp_src_port { \ - VIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_SCTP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT), {BUFF_NOUSED } } #define proto_hint_sctp_dst_port { \ - VIRTCHNL_PROTO_HDR_SCTP, VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, \ - {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_SCTP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT), {BUFF_NOUSED } } #define proto_hint_sctp_only { \ VIRTCHNL_PROTO_HDR_SCTP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } #define proto_hint_sctp { \ VIRTCHNL_PROTO_HDR_SCTP, \ - VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT | VIRTCHNL_PROTO_HDR_SCTP_DST_PORT, \ - {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT), {BUFF_NOUSED } } #define proto_hint_ipv6_src { \ - VIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_IPV6_SRC, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_IPV6, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC), \ + {BUFF_NOUSED } } #define proto_hint_ipv6_dst { \ - VIRTCHNL_PROTO_HDR_IPV6, VIRTCHNL_PROTO_HDR_IPV6_DST, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_IPV6, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), \ + {BUFF_NOUSED } } #define proto_hint_ipv6_only { \ VIRTCHNL_PROTO_HDR_IPV6, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } #define proto_hint_ipv6 { \ VIRTCHNL_PROTO_HDR_IPV6, \ - VIRTCHNL_PROTO_HDR_IPV6_SRC | VIRTCHNL_PROTO_HDR_IPV6_DST, \ - {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), {BUFF_NOUSED } } #define proto_hint_gtpu_up_only { \ VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, \ @@ -268,18 +281,19 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { #define proto_hint_esp { \ VIRTCHNL_PROTO_HDR_ESP, \ - VIRTCHNL_PROTO_HDR_ESP_SPI, {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ESP_SPI), {BUFF_NOUSED } } #define proto_hint_ah { \ VIRTCHNL_PROTO_HDR_AH, \ - VIRTCHNL_PROTO_HDR_AH_SPI, {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_AH_SPI), {BUFF_NOUSED } } #define proto_hint_l2tpv3 { \ VIRTCHNL_PROTO_HDR_L2TPV3, \ - VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID, {BUFF_NOUSED } } + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID), {BUFF_NOUSED } } #define proto_hint_pfcp { \ - VIRTCHNL_PROTO_HDR_PFCP, VIRTCHNL_PROTO_HDR_PFCP_SEID, {BUFF_NOUSED } } + VIRTCHNL_PROTO_HDR_PFCP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_PFCP_SEID), {BUFF_NOUSED } } struct virtchnl_proto_hdrs hdrs_hint_eth_src = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_eth_src } @@ -314,6 +328,16 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_up = { proto_hint_ipv4_src } }; +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_src } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only, + proto_hint_ipv4_dst } +}; + struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_dwn = { TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, proto_hint_ipv4_dst } @@ -589,272 +613,333 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp = { * The first member is pattern hint type, * the second member is hash type, * the third member is virtchnl protocol hdrs. + * the forth member is downlink/uplink type. */ struct iavf_hash_match_type iavf_hash_type_list[] = { /* IPV4 */ - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, - &hdrs_hint_eth_src}, + &hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_DST_ONLY, - &hdrs_hint_eth_dst}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + &hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src}, + &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3, &hdrs_hint_ipv4_l2tpv3}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4, &hdrs_hint_ipv4}, + &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3, &hdrs_hint_ipv4_l2tpv3, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4, &hdrs_hint_ipv4, + IAVF_GTPU_HINT_NONE}, /* IPV4 UDP */ {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_udp_src_port}, + &hdrs_hint_ipv4_src_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_udp_dst_port}, + &hdrs_hint_ipv4_src_udp_dst_port, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, + &hdrs_hint_ipv4_src_gtpu_up, IAVF_GTPU_HINT_UPLINK}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_src_gtpu_up}, + &hdrs_hint_ipv4_src_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src}, + &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_udp_src_port}, + &hdrs_hint_ipv4_dst_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_udp_dst_port}, + &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_dst_gtpu_dwn}, + &hdrs_hint_ipv4_dst_gtpu_up, IAVF_GTPU_HINT_UPLINK}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, + &hdrs_hint_ipv4_dst_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst}, + &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_udp_src_port}, + &hdrs_hint_ipv4_src_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_udp_dst_port}, + &hdrs_hint_ipv4_src_udp_dst_port, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, + &hdrs_hint_ipv4_src_gtpu_up, IAVF_GTPU_HINT_UPLINK}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_src_gtpu_up}, + &hdrs_hint_ipv4_src_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | - ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src}, + ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_udp_src_port}, + &hdrs_hint_ipv4_dst_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_udp_dst_port}, + &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_dst_gtpu_dwn}, + &hdrs_hint_ipv4_dst_gtpu_up, IAVF_GTPU_HINT_UPLINK}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | - ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, + &hdrs_hint_ipv4_dst_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, + {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_udp_src_port}, + &hdrs_hint_ipv4_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_udp_dst_port}, + &hdrs_hint_ipv4_udp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_PFCP, - &hdrs_hint_ipv4_pfcp}, + &hdrs_hint_ipv4_pfcp, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP, - &hdrs_hint_ipv4_udp}, + &hdrs_hint_ipv4_udp, IAVF_GTPU_HINT_NONE}, /* IPV4 TCP */ {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_tcp_src_port}, + &hdrs_hint_ipv4_src_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_tcp_dst_port}, + &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src}, + &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_tcp_src_port}, + &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_tcp_dst_port}, + &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst}, + &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_tcp_src_port}, + &hdrs_hint_ipv4_src_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_tcp_dst_port}, + &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | - ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src}, + ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_tcp_src_port}, + &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_tcp_dst_port}, + &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | - ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_tcp_src_port}, + &hdrs_hint_ipv4_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_tcp_dst_port}, + &hdrs_hint_ipv4_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP, - &hdrs_hint_ipv4_tcp}, + &hdrs_hint_ipv4_tcp, IAVF_GTPU_HINT_NONE}, /* IPV4 SCTP */ - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_sctp_src_port}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_sctp_dst_port}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_sctp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_src_sctp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_sctp_src_port}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_sctp_dst_port}, + &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_dst_sctp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_dst_sctp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst}, + &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_sctp_src_port}, + &hdrs_hint_ipv4_src_sctp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_sctp_dst_port}, + &hdrs_hint_ipv4_src_sctp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | - ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src}, + ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_sctp_src_port}, + &hdrs_hint_ipv4_dst_sctp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_sctp_dst_port}, + &hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | - ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst}, + ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_sctp_src_port}, + &hdrs_hint_ipv4_sctp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_sctp_dst_port}, + &hdrs_hint_ipv4_sctp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP, - &hdrs_hint_ipv4_sctp}, + &hdrs_hint_ipv4_sctp, IAVF_GTPU_HINT_NONE}, /* IPV6 */ - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_SRC_ONLY, + &hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_DST_ONLY, + &hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_SRC_ONLY, - &hdrs_hint_eth_src}, + &hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_DST_ONLY, - &hdrs_hint_eth_dst}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ETH, &hdrs_hint_eth}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_S_VLAN, &hdrs_hint_svlan}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + &hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ETH, + &hdrs_hint_eth, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_S_VLAN, + &hdrs_hint_svlan, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, + &hdrs_hint_cvlan, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src}, + &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ESP, &hdrs_hint_ipv6_esp}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_AH, &hdrs_hint_ipv6_ah}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2TPV3, &hdrs_hint_ipv6_l2tpv3}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6, &hdrs_hint_ipv6}, + &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ESP, + &hdrs_hint_ipv6_esp, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_AH, + &hdrs_hint_ipv6_ah, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2TPV3, + &hdrs_hint_ipv6_l2tpv3, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6, + &hdrs_hint_ipv6, IAVF_GTPU_HINT_NONE}, /* IPV6 UDP */ - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_udp_src_port}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_udp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_udp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_udp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_udp_src_port}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_udp_dst_port}, + &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_udp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_udp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst}, + &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_udp_src_port}, + &hdrs_hint_ipv6_src_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_udp_dst_port}, + &hdrs_hint_ipv6_src_udp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | - ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src}, + ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_udp_src_port}, + &hdrs_hint_ipv6_dst_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_udp_dst_port}, + &hdrs_hint_ipv6_dst_udp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | - ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_udp_src_port}, + &hdrs_hint_ipv6_udp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_udp_dst_port}, + &hdrs_hint_ipv6_udp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_PFCP, - &hdrs_hint_ipv6_pfcp}, + &hdrs_hint_ipv6_pfcp, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP, - &hdrs_hint_ipv6_udp}, + &hdrs_hint_ipv6_udp, IAVF_GTPU_HINT_NONE}, /* IPV6 TCP */ - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_tcp_src_port}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_tcp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_tcp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_tcp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_tcp_src_port}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_tcp_dst_port}, + &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_tcp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_tcp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst}, + &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_tcp_src_port}, + &hdrs_hint_ipv6_src_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_tcp_dst_port}, + &hdrs_hint_ipv6_src_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | - ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src}, + ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_tcp_src_port}, + &hdrs_hint_ipv6_dst_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_tcp_dst_port}, + &hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | - ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_tcp_src_port}, + &hdrs_hint_ipv6_tcp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_tcp_dst_port}, + &hdrs_hint_ipv6_tcp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP, - &hdrs_hint_ipv6_tcp}, + &hdrs_hint_ipv6_tcp, IAVF_GTPU_HINT_NONE}, /* IPV6 SCTP */ - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_sctp_src_port}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_sctp_dst_port}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_sctp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_sctp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_sctp_src_port}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_sctp_dst_port}, + &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_sctp_src_port, + IAVF_GTPU_HINT_NONE}, + {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_sctp_dst_port, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst}, + &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_sctp_src_port}, + &hdrs_hint_ipv6_src_sctp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_sctp_dst_port}, + &hdrs_hint_ipv6_src_sctp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | - ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src}, + ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_sctp_src_port}, + &hdrs_hint_ipv6_dst_sctp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_sctp_dst_port}, + &hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | - ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst}, + ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst, + IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_sctp_src_port}, + &hdrs_hint_ipv6_sctp_src_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_sctp_dst_port}, + &hdrs_hint_ipv6_sctp_dst_port, IAVF_GTPU_HINT_NONE}, {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP, - &hdrs_hint_ipv6_sctp}, + &hdrs_hint_ipv6_sctp, IAVF_GTPU_HINT_NONE}, }; struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = { @@ -969,8 +1054,9 @@ iavf_hash_check_inset(const struct rte_flow_item pattern[], return 0; } -static uint64_t -iavf_hash_refine_type(uint64_t rss_type, const struct rte_flow_item pattern[]) +static void +iavf_hash_refine_type(uint64_t *rss_type, const struct rte_flow_item pattern[], + enum iavf_gtpu_hint *gtpu_hint) { const struct rte_flow_item *item; @@ -978,14 +1064,13 @@ iavf_hash_refine_type(uint64_t rss_type, const struct rte_flow_item pattern[]) if (item->type == RTE_FLOW_ITEM_TYPE_GTP_PSC) { const struct rte_flow_item_gtp_psc *psc = item->spec; - if (psc && (psc->pdu_type == GTP_EH_PDU_LINK_UP || - psc->pdu_type == GTP_EH_PDU_LINK_DWN)) { - rss_type |= ETH_RSS_GTPU; + if (psc && (psc->pdu_type == IAVF_GTPU_HINT_UPLINK || + psc->pdu_type == IAVF_GTPU_HINT_DOWNLINK)) { + *rss_type |= ETH_RSS_GTPU; + *gtpu_hint = psc->pdu_type; } } } - - return rss_type; } static int @@ -994,9 +1079,12 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, const struct rte_flow_action actions[], void **meta, struct rte_flow_error *error) { + struct iavf_pattern_match_type *mt = (struct iavf_pattern_match_type *) + (pattern_match_item->meta); struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta; uint32_t type_list_len = RTE_DIM(iavf_hash_type_list); struct iavf_hash_match_type *type_match_item; + enum iavf_gtpu_hint gtpu_hint = IAVF_GTPU_HINT_NONE; enum rte_flow_action_type action_type; const struct rte_flow_action_rss *rss; const struct rte_flow_action *action; @@ -1004,9 +1092,6 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, uint64_t rss_type; uint16_t i; - struct iavf_pattern_match_type *tt = (struct iavf_pattern_match_type *) - (pattern_match_item->meta); - /* Supported action is RSS. */ for (action = actions; action->type != RTE_FLOW_ACTION_TYPE_END; action++) { @@ -1026,7 +1111,7 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, * Refine the hash type base on some specific item of * the pattern, such as identify the gtpu hash. */ - rss_type = iavf_hash_refine_type(rss_type, pattern); + iavf_hash_refine_type(&rss_type, pattern, >pu_hint); /* Check if pattern is empty. */ if (pattern_match_item->pattern_list != @@ -1079,7 +1164,8 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, struct iavf_hash_match_type *ht_map = &iavf_hash_type_list[i]; if (rss_type == ht_map->hash_type && - tt->phint_type == ht_map->phint_type) { + mt->phint_type == ht_map->phint_type && + gtpu_hint == ht_map->gtpu_hint) { type_match_item->hash_type = ht_map->hash_type; type_match_item->proto_hdrs = From patchwork Fri Jul 3 11:16:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73034 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 37731A0519; Fri, 3 Jul 2020 16:40:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D07E81DC93; Fri, 3 Jul 2020 16:38:02 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B42231D8CF for ; Fri, 3 Jul 2020 13:17:18 +0200 (CEST) IronPort-SDR: hFYmJv9Xc7bkCUIleljOcyjPodgawmBgdPVR00jjdeqrKi2zhN7O6OLI/ib75IdB3Ofdlf5to9 /WN64mt6pIyg== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220568" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220568" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:18 -0700 IronPort-SDR: 8H03Tu4OMHnew/Sie432hW9JQgKxKP+xOp5d2yuo3qPxvyVd//724gIzdAVvpEGBVeiyoyEOv0 LkPREfLsts5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780384" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:17 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com Date: Fri, 3 Jul 2020 12:16:42 +0100 Message-Id: <20200703111644.73351-7-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 6/8] ICE: Enable advanced RSS for PPPoE 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" From: gordonno --- app/test-pmd/cmdline.c | 6 ++++-- app/test-pmd/config.c | 1 + drivers/net/ice/ice_hash.c | 31 ++++++++++++++++++++++++++++++- lib/librte_ethdev/rte_ethdev.h | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 996a49876..1ac0b89dd 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2317,6 +2317,8 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf = ETH_RSS_AH; else if (!strcmp(res->value, "pfcp")) rss_conf.rss_hf = ETH_RSS_PFCP; + else if (!strcmp(res->value, "pppoe")) + rss_conf.rss_hf = ETH_RSS_PPPOE; else if (!strcmp(res->value, "none")) rss_conf.rss_hf = 0; else if (!strcmp(res->value, "default")) @@ -2490,7 +2492,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type = "ipv6-tcp-ex#ipv6-udp-ex#" "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#" "l2-src-only#l2-dst-only#s-vlan#c-vlan#" - "l2tpv3#esp#ah#pfcp"); + "l2tpv3#esp#ah#pfcp#pppoe"); cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL); @@ -2503,7 +2505,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = { "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" "l2-src-only|l2-dst-only|s-vlan|c-vlan|" - "l2tpv3|esp|ah|pfcp " + "l2tpv3|esp|ah|pfcp|pppoe " "", .tokens = { (void *)&cmd_config_rss_hash_key_port, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 5381207cc..ef046992d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -118,6 +118,7 @@ const struct rss_type_info rss_type_table[] = { { "ah", ETH_RSS_AH }, { "l2tpv3", ETH_RSS_L2TPV3 }, { "pfcp", ETH_RSS_PFCP }, + { "pppoe", ETH_RSS_PPPOE }, { NULL, 0 }, }; diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 11435cbfb..69a469863 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -108,6 +108,16 @@ struct rss_type_match_hdr hint_14 = { ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP}; struct rss_type_match_hdr hint_15 = { ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP}; +struct rss_type_match_hdr hint_16 = { + ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_IPV6}; +struct rss_type_match_hdr hint_17 = { + ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_UDP}; +struct rss_type_match_hdr hint_18 = { + ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_TCP}; +struct rss_type_match_hdr hint_19 = { + ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_NONFRAG_IPV6_SCTP}; +struct rss_type_match_hdr hint_20 = { + ICE_FLOW_SEG_HDR_PPPOE, ETH_RSS_ETH | ETH_RSS_PPPOE}; /* Supported pattern for os default package. */ static struct ice_pattern_match_item ice_hash_pattern_list_os[] = { @@ -140,6 +150,11 @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = { {pattern_eth_pppoes_ipv4_udp, ICE_INSET_NONE, &hint_11}, {pattern_eth_pppoes_ipv4_tcp, ICE_INSET_NONE, &hint_12}, {pattern_eth_pppoes_ipv4_sctp, ICE_INSET_NONE, &hint_13}, + {pattern_eth_pppoes_ipv6, ICE_INSET_NONE, &hint_16}, + {pattern_eth_pppoes_ipv6_udp, ICE_INSET_NONE, &hint_17}, + {pattern_eth_pppoes_ipv6_tcp, ICE_INSET_NONE, &hint_18}, + {pattern_eth_pppoes_ipv6_sctp, ICE_INSET_NONE, &hint_19}, + {pattern_eth_pppoes, ICE_INSET_NONE, &hint_20}, }; /** @@ -207,6 +222,9 @@ struct ice_hash_match_type ice_hash_type_list[] = { {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT)}, {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_SCTP_DST_PORT)}, {ETH_RSS_NONFRAG_IPV6_SCTP, ICE_HASH_SCTP_IPV6}, + {ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, + {ETH_RSS_PPPOE, ICE_FLOW_HASH_PPPOE_SESS_ID}, + {ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_L2_SRC_ONLY, ICE_FLOW_HASH_PPPOE_SESS_ID | BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA)}, }; static struct ice_flow_engine ice_hash_engine = { @@ -325,6 +343,13 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item, RTE_FLOW_ERROR_TYPE_ACTION, action, "Not supported flow"); + if ((rss_hf & ETH_RSS_ETH) && (rss_hf & ~ETH_RSS_PPPOE)) + m->eth_rss_hint = ETH_RSS_ETH; + else if ((rss_hf & ETH_RSS_PPPOE) && (rss_hf & ~ETH_RSS_ETH)) + m->eth_rss_hint = ETH_RSS_PPPOE; + else if ((rss_hf & ETH_RSS_ETH) && (rss_hf & ETH_RSS_PPPOE)) + m->eth_rss_hint = ETH_RSS_ETH | ETH_RSS_PPPOE; + /* Check if rss types match pattern. */ if (rss->func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) { if (((rss_hf & ETH_RSS_IPV4) != m->eth_rss_hint) && @@ -334,7 +359,11 @@ ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item, ((rss_hf & ETH_RSS_IPV6) != m->eth_rss_hint) && ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) != m->eth_rss_hint) && ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) != m->eth_rss_hint) && - ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != m->eth_rss_hint)) + ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_ETH) != m->eth_rss_hint) && + ((rss_hf & ETH_RSS_PPPOE) != m->eth_rss_hint) && + (((rss_hf & (ETH_RSS_ETH | ETH_RSS_PPPOE)) != + m->eth_rss_hint))) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, "Not supported RSS types"); diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index a49242bcd..631b146bd 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -521,7 +521,7 @@ struct rte_eth_rss_conf { #define ETH_RSS_AH (1ULL << 28) #define ETH_RSS_L2TPV3 (1ULL << 29) #define ETH_RSS_PFCP (1ULL << 30) - +#define ETH_RSS_PPPOE (1ULL << 31) /* * We use the following macros to combine with above ETH_RSS_* for From patchwork Fri Jul 3 11:16:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73035 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BD33A0519; Fri, 3 Jul 2020 16:40:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E36C31DC99; Fri, 3 Jul 2020 16:38:03 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 172111D8CF for ; Fri, 3 Jul 2020 13:17:21 +0200 (CEST) IronPort-SDR: CxUZI1q95zgWzPxAgoMHKpmYEmQB0HDWVe2I35OkCHcn8XK1IHaURAXSExDRC/K+Uc7KGNy7sB BL56nOB3jo8Q== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220578" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220578" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:20 -0700 IronPort-SDR: HYvDXWX0CQyHt5ffVPxGT0un9QjlzBTx4MKVnd+8Zn9HORp9kjPSSPxDh+PPKShoicxRBxKQaB 8SU9bHcJmsVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780406" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:18 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com Date: Fri, 3 Jul 2020 12:16:43 +0100 Message-Id: <20200703111644.73351-8-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 7/8] Update/Add support for RSS on 5 Tuple Flows for GTPU encapsulated packets (AVF) 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" From: gordonno --- drivers/net/iavf/iavf_generic_flow.c | 39 + drivers/net/iavf/iavf_generic_flow.h | 4 + drivers/net/iavf/iavf_hash.c | 1952 +++++++++++++++++++------- 3 files changed, 1478 insertions(+), 517 deletions(-) diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index b6c26c4fd..6ef89edab 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -342,6 +342,45 @@ enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4[] = { RTE_FLOW_ITEM_TYPE_END, }; +enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_udp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_tcp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_TCP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_sctp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_SCTP, + RTE_FLOW_ITEM_TYPE_END, +}; + +enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_icmp[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_ICMP, + RTE_FLOW_ITEM_TYPE_END, +}; 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..9d683411b 100644 --- a/drivers/net/iavf/iavf_generic_flow.h +++ b/drivers/net/iavf/iavf_generic_flow.h @@ -185,6 +185,10 @@ extern enum rte_flow_item_type iavf_pattern_eth_qinq_ipv6_icmp6[]; /* GTPU */ 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_ipv4_udp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_tcp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_sctp[]; +extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_ipv4_icmp[]; extern enum rte_flow_item_type iavf_pattern_eth_ipv4_gtpu_eh[]; 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[]; diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index a7691ef0c..62dd29889 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -24,32 +24,34 @@ #include "iavf_generic_flow.h" enum iavf_pattern_hint_type { - IAVF_PATTERN_HINT_NONE, - IAVF_PATTERN_HINT_IPV4, - IAVF_PATTERN_HINT_IPV4_UDP, - IAVF_PATTERN_HINT_IPV4_TCP, - IAVF_PATTERN_HINT_IPV4_SCTP, - IAVF_PATTERN_HINT_IPV6, - IAVF_PATTERN_HINT_IPV6_UDP, - IAVF_PATTERN_HINT_IPV6_TCP, - IAVF_PATTERN_HINT_IPV6_SCTP, -}; - -enum iavf_gtpu_hint { - IAVF_GTPU_HINT_DOWNLINK, - IAVF_GTPU_HINT_UPLINK, - IAVF_GTPU_HINT_NONE, -}; + IAVF_PHINT_NONE = 0x00000000, + IAVF_PHINT_IPV4 = 0x00000001, + IAVF_PHINT_IPV4_UDP = 0x00000002, + IAVF_PHINT_IPV4_TCP = 0x00000004, + IAVF_PHINT_IPV4_SCTP = 0x00000008, + IAVF_PHINT_IPV6 = 0x00000010, + IAVF_PHINT_IPV6_UDP = 0x00000020, + IAVF_PHINT_IPV6_TCP = 0x00000040, + IAVF_PHINT_IPV6_SCTP = 0x00000080, + IAVF_PHINT_C_VLAN = 0x00000100, + IAVF_PHINT_S_VLAN = 0x00000200, + IAVF_PHINT_IPV4_GTPU_IP = 0x00000400, + IAVF_PHINT_IPV4_GTPU_EH = 0x00000800, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK = 0x00001000, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK = 0x00002000, +}; + +#define IAVF_GTPU_EH_DWNLINK 0 +#define IAVF_GTPU_EH_UPLINK 1 struct iavf_pattern_match_type { - enum iavf_pattern_hint_type phint_type; + uint64_t pattern_hint; }; struct iavf_hash_match_type { - enum iavf_pattern_hint_type phint_type; uint64_t hash_type; struct virtchnl_proto_hdrs *proto_hdrs; - enum iavf_gtpu_hint gtpu_hint; + uint64_t pattern_hint; }; struct iavf_rss_meta { @@ -83,42 +85,60 @@ iavf_hash_parse_pattern_action(struct iavf_adapter *ad, void **meta, struct rte_flow_error *error); -struct iavf_pattern_match_type phint_empty = { - IAVF_PATTERN_HINT_NONE}; -struct iavf_pattern_match_type phint_eth_ipv4 = { - IAVF_PATTERN_HINT_IPV4}; -struct iavf_pattern_match_type phint_eth_ipv4_udp = { - IAVF_PATTERN_HINT_IPV4_UDP}; -struct iavf_pattern_match_type phint_eth_ipv4_tcp = { - IAVF_PATTERN_HINT_IPV4_TCP}; -struct iavf_pattern_match_type phint_eth_ipv4_sctp = { - IAVF_PATTERN_HINT_IPV4_SCTP}; -struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh = { - IAVF_PATTERN_HINT_IPV4_UDP}; -struct iavf_pattern_match_type phint_eth_ipv4_esp = { - IAVF_PATTERN_HINT_IPV4}; -struct iavf_pattern_match_type phint_eth_ipv4_ah = { - IAVF_PATTERN_HINT_IPV4}; -struct iavf_pattern_match_type phint_eth_ipv4_l2tpv3 = { - IAVF_PATTERN_HINT_IPV4}; -struct iavf_pattern_match_type phint_eth_ipv4_pfcp = { - IAVF_PATTERN_HINT_IPV4_UDP}; -struct iavf_pattern_match_type phint_eth_ipv6 = { - IAVF_PATTERN_HINT_IPV6}; -struct iavf_pattern_match_type phint_eth_ipv6_udp = { - IAVF_PATTERN_HINT_IPV6_UDP}; -struct iavf_pattern_match_type phint_eth_ipv6_tcp = { - IAVF_PATTERN_HINT_IPV6_TCP}; -struct iavf_pattern_match_type phint_eth_ipv6_sctp = { - IAVF_PATTERN_HINT_IPV6_SCTP}; -struct iavf_pattern_match_type phint_eth_ipv6_esp = { - IAVF_PATTERN_HINT_IPV6}; -struct iavf_pattern_match_type phint_eth_ipv6_ah = { - IAVF_PATTERN_HINT_IPV6}; -struct iavf_pattern_match_type phint_eth_ipv6_l2tpv3 = { - IAVF_PATTERN_HINT_IPV6}; -struct iavf_pattern_match_type phint_eth_ipv6_pfcp = { - IAVF_PATTERN_HINT_IPV6_UDP}; +static struct iavf_pattern_match_type phint_empty = { + IAVF_PHINT_NONE}; +static struct iavf_pattern_match_type phint_eth_ipv4 = { + IAVF_PHINT_IPV4}; +static struct iavf_pattern_match_type phint_eth_ipv4_udp = { + IAVF_PHINT_IPV4_UDP}; +static struct iavf_pattern_match_type phint_eth_ipv4_tcp = { + IAVF_PHINT_IPV4_TCP}; +static struct iavf_pattern_match_type phint_eth_ipv4_sctp = { + IAVF_PHINT_IPV4_SCTP}; +static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_ipv4 = { + IAVF_PHINT_IPV4}; +static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_ipv4_udp = { + IAVF_PHINT_IPV4_UDP}; +static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_ipv4_tcp = { + IAVF_PHINT_IPV4_TCP}; +static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4 = { + IAVF_PHINT_IPV4}; +static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4_udp = { + IAVF_PHINT_IPV4_UDP}; +static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4_tcp = { + IAVF_PHINT_IPV4_TCP}; +static struct iavf_pattern_match_type phint_eth_ipv4_esp = { + IAVF_PHINT_IPV4}; +static struct iavf_pattern_match_type phint_eth_ipv4_udp_esp = { + IAVF_PHINT_IPV4_UDP}; +static struct iavf_pattern_match_type phint_eth_ipv4_ah = { + IAVF_PHINT_IPV4}; +static struct iavf_pattern_match_type phint_eth_ipv4_l2tpv3 = { + IAVF_PHINT_IPV4}; +static struct iavf_pattern_match_type phint_eth_ipv4_pfcp = { + IAVF_PHINT_IPV4_UDP}; +static struct iavf_pattern_match_type phint_eth_vlan_ipv4 = { + IAVF_PHINT_C_VLAN}; +static struct iavf_pattern_match_type phint_eth_ipv6 = { + IAVF_PHINT_IPV6}; +static struct iavf_pattern_match_type phint_eth_ipv6_udp = { + IAVF_PHINT_IPV6_UDP}; +static struct iavf_pattern_match_type phint_eth_ipv6_tcp = { + IAVF_PHINT_IPV6_TCP}; +static struct iavf_pattern_match_type phint_eth_ipv6_sctp = { + IAVF_PHINT_IPV6_SCTP}; +static struct iavf_pattern_match_type phint_eth_ipv6_esp = { + IAVF_PHINT_IPV6}; +static struct iavf_pattern_match_type phint_eth_ipv6_udp_esp = { + IAVF_PHINT_IPV6_UDP}; +static struct iavf_pattern_match_type phint_eth_ipv6_ah = { + IAVF_PHINT_IPV6}; +static struct iavf_pattern_match_type phint_eth_ipv6_l2tpv3 = { + IAVF_PHINT_IPV6}; +static struct iavf_pattern_match_type phint_eth_ipv6_pfcp = { + IAVF_PHINT_IPV6_UDP}; +static struct iavf_pattern_match_type phint_eth_vlan_ipv6 = { + IAVF_PHINT_C_VLAN}; /** * Supported pattern for hash. @@ -131,26 +151,38 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { {iavf_pattern_eth_ipv4_udp, IAVF_INSET_NONE, &phint_eth_ipv4_udp}, {iavf_pattern_eth_ipv4_tcp, IAVF_INSET_NONE, &phint_eth_ipv4_tcp}, {iavf_pattern_eth_ipv4_sctp, IAVF_INSET_NONE, &phint_eth_ipv4_sctp}, - {iavf_pattern_eth_ipv6, IAVF_INSET_NONE, &phint_eth_ipv6}, + {iavf_pattern_eth_ipv4_gtpu_ipv4, IAVF_INSET_NONE, + &phint_eth_ipv4_gtpu_ipv4}, + {iavf_pattern_eth_ipv4_gtpu_ipv4_udp, IAVF_INSET_NONE, + &phint_eth_ipv4_gtpu_ipv4_udp}, + {iavf_pattern_eth_ipv4_gtpu_ipv4_tcp, IAVF_INSET_NONE, + &phint_eth_ipv4_gtpu_ipv4_tcp}, {iavf_pattern_eth_ipv4_gtpu_eh_ipv4, IAVF_INSET_NONE, - &phint_eth_ipv4_gtpu_eh}, + &phint_eth_ipv4_gtpu_eh_ipv4}, {iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp, IAVF_INSET_NONE, - &phint_eth_ipv4_gtpu_eh}, + &phint_eth_ipv4_gtpu_eh_ipv4_udp}, {iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp, IAVF_INSET_NONE, - &phint_eth_ipv4_gtpu_eh}, + &phint_eth_ipv4_gtpu_eh_ipv4_tcp}, {iavf_pattern_eth_ipv4_esp, IAVF_INSET_NONE, &phint_eth_ipv4_esp}, + {iavf_pattern_eth_ipv4_udp_esp, IAVF_INSET_NONE, + &phint_eth_ipv4_udp_esp}, {iavf_pattern_eth_ipv4_ah, IAVF_INSET_NONE, &phint_eth_ipv4_ah}, {iavf_pattern_eth_ipv4_l2tpv3, IAVF_INSET_NONE, - &phint_eth_ipv4_l2tpv3}, + &phint_eth_ipv4_l2tpv3}, {iavf_pattern_eth_ipv4_pfcp, IAVF_INSET_NONE, &phint_eth_ipv4_pfcp}, + {iavf_pattern_eth_vlan_ipv4, IAVF_INSET_NONE, &phint_eth_vlan_ipv4}, + {iavf_pattern_eth_ipv6, IAVF_INSET_NONE, &phint_eth_ipv6}, {iavf_pattern_eth_ipv6_udp, IAVF_INSET_NONE, &phint_eth_ipv6_udp}, {iavf_pattern_eth_ipv6_tcp, IAVF_INSET_NONE, &phint_eth_ipv6_tcp}, {iavf_pattern_eth_ipv6_sctp, IAVF_INSET_NONE, &phint_eth_ipv6_sctp}, {iavf_pattern_eth_ipv6_esp, IAVF_INSET_NONE, &phint_eth_ipv6_esp}, + {iavf_pattern_eth_ipv6_udp_esp, IAVF_INSET_NONE, + &phint_eth_ipv6_udp_esp}, {iavf_pattern_eth_ipv6_ah, IAVF_INSET_NONE, &phint_eth_ipv6_ah}, {iavf_pattern_eth_ipv6_l2tpv3, IAVF_INSET_NONE, - &phint_eth_ipv6_l2tpv3}, + &phint_eth_ipv6_l2tpv3}, {iavf_pattern_eth_ipv6_pfcp, IAVF_INSET_NONE, &phint_eth_ipv6_pfcp}, + {iavf_pattern_eth_vlan_ipv6, IAVF_INSET_NONE, &phint_eth_vlan_ipv6}, {iavf_pattern_empty, IAVF_INSET_NONE, &phint_empty}, }; @@ -207,6 +239,28 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), {BUFF_NOUSED } } +#define proto_hint_ipv4_src_prot { \ + VIRTCHNL_PROTO_HDR_IPV4, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), \ + {BUFF_NOUSED } } + +#define proto_hint_ipv4_dst_prot { \ + VIRTCHNL_PROTO_HDR_IPV4, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), \ + {BUFF_NOUSED } } + +#define proto_hint_ipv4_only_prot { \ + VIRTCHNL_PROTO_HDR_IPV4, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), {BUFF_NOUSED } } + +#define proto_hint_ipv4_prot { \ + VIRTCHNL_PROTO_HDR_IPV4, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), {BUFF_NOUSED } } + #define proto_hint_udp_src_port { \ VIRTCHNL_PROTO_HDR_UDP, \ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT), {BUFF_NOUSED } } @@ -271,6 +325,40 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), {BUFF_NOUSED } } +#define proto_hint_ipv6_src_prot { \ + VIRTCHNL_PROTO_HDR_IPV6, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), \ + {BUFF_NOUSED } } + +#define proto_hint_ipv6_dst_prot { \ + VIRTCHNL_PROTO_HDR_IPV6, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), \ + {BUFF_NOUSED } } + +#define proto_hint_ipv6_only_prot { \ + VIRTCHNL_PROTO_HDR_IPV6, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), {BUFF_NOUSED } } + +#define proto_hint_ipv6_prot { \ + VIRTCHNL_PROTO_HDR_IPV6, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), {BUFF_NOUSED } } + +#define proto_hint_gtpu_ip_teid { \ + VIRTCHNL_PROTO_HDR_GTPU_IP, \ + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_GTPU_IP_TEID), {BUFF_NOUSED } } + +#define proto_hint_gtpu_eh_only { \ + VIRTCHNL_PROTO_HDR_GTPU_EH, \ + FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } + +#define proto_hint_gtpu_ip_only { \ + VIRTCHNL_PROTO_HDR_GTPU_IP, \ + FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } + #define proto_hint_gtpu_up_only { \ VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, \ FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } } @@ -295,6 +383,8 @@ static struct iavf_pattern_match_item iavf_hash_pattern_list[] = { VIRTCHNL_PROTO_HDR_PFCP, \ FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_PFCP_SEID), {BUFF_NOUSED } } +/* ETH */ + struct virtchnl_proto_hdrs hdrs_hint_eth_src = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_eth_src } }; @@ -315,6 +405,8 @@ struct virtchnl_proto_hdrs hdrs_hint_cvlan = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_cvlan } }; +/* IPV4 */ + struct virtchnl_proto_hdrs hdrs_hint_ipv4_src = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4_src } }; @@ -323,117 +415,77 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4_dst } }; -struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_up = { - TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only, - proto_hint_ipv4_src } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_dwn = { - TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, - proto_hint_ipv4_src } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_up = { - TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only, - proto_hint_ipv4_dst } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_dwn = { - TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, - proto_hint_ipv4_dst } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_esp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, - proto_hint_esp } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_ah = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, - proto_hint_ah } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_l2tpv3 = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, - proto_hint_l2tpv3 } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv4_pfcp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, - proto_hint_pfcp } -}; - struct virtchnl_proto_hdrs hdrs_hint_ipv4 = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4 } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot, proto_hint_udp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot, proto_hint_udp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot, proto_hint_udp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot, proto_hint_udp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot, proto_hint_udp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_prot, proto_hint_udp } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot, proto_hint_tcp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot, proto_hint_tcp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_prot, proto_hint_tcp } }; @@ -472,105 +524,393 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp = { proto_hint_sctp } }; -struct virtchnl_proto_hdrs hdrs_hint_ipv6_src = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_src } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_dst } -}; - -struct virtchnl_proto_hdrs hdrs_hint_ipv6_esp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, +struct virtchnl_proto_hdrs hdrs_hint_ipv4_esp = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, proto_hint_esp } }; -struct virtchnl_proto_hdrs hdrs_hint_ipv6_ah = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, +struct virtchnl_proto_hdrs hdrs_hint_ipv4_ah = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, proto_hint_ah } }; -struct virtchnl_proto_hdrs hdrs_hint_ipv6_l2tpv3 = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, +struct virtchnl_proto_hdrs hdrs_hint_ipv4_l2tpv3 = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, proto_hint_l2tpv3 } }; -struct virtchnl_proto_hdrs hdrs_hint_ipv6_pfcp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, +struct virtchnl_proto_hdrs hdrs_hint_ipv4_pfcp = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only, proto_hint_pfcp } }; +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_esp = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4_only, + proto_hint_udp_only, proto_hint_esp } +}; + +/* GTPU IP */ +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_src } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_dst } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only, + proto_hint_ipv4 } +}; + +struct virtchnl_proto_hdrs hdrs_hint_teid_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_teid} +}; + +/* GTPU EH */ + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_only_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_only_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_src } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_src_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_src_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_dst } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_eh_only, + proto_hint_ipv4 } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_prot, proto_hint_udp} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_eh = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only, + proto_hint_ipv4_prot, proto_hint_tcp} +}; + +/* GTPU UP */ + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_only_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_only_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only, + proto_hint_ipv4_src } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_src_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_src_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only, + proto_hint_ipv4_dst } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only, + proto_hint_ipv4 } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_prot, proto_hint_udp} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_up = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only, + proto_hint_ipv4_prot, proto_hint_tcp} +}; + +/* GTPU DWN */ + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_only_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_only_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_src } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_src_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_src_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_dst } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4 } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_prot, proto_hint_udp} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_dwn = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only, + proto_hint_ipv4_prot, proto_hint_tcp} +}; + +/* IPV6 */ + +struct virtchnl_proto_hdrs hdrs_hint_ipv6_src = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_src } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_dst } +}; + struct virtchnl_proto_hdrs hdrs_hint_ipv6 = { TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6 } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_udp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot, proto_hint_udp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_udp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot, proto_hint_udp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_udp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot, proto_hint_udp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_udp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot, proto_hint_udp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot, proto_hint_udp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot, proto_hint_udp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_prot, proto_hint_udp } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_tcp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot, proto_hint_tcp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_tcp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot, proto_hint_tcp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_tcp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot, proto_hint_tcp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_tcp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot, proto_hint_tcp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot, proto_hint_tcp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot, proto_hint_tcp_dst_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_prot, proto_hint_tcp } }; @@ -595,12 +935,12 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_sctp_dst_port = { }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp_src_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, proto_hint_sctp_src_port } }; struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp_dst_port = { - TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_udp_only, + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, proto_hint_sctp_dst_port } }; @@ -609,337 +949,932 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp = { proto_hint_sctp } }; -/** - * The first member is pattern hint type, - * the second member is hash type, - * the third member is virtchnl protocol hdrs. - * the forth member is downlink/uplink type. - */ -struct iavf_hash_match_type iavf_hash_type_list[] = { +struct virtchnl_proto_hdrs hdrs_hint_ipv6_esp = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, + proto_hint_esp } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv6_ah = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, + proto_hint_ah } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv6_l2tpv3 = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, + proto_hint_l2tpv3 } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv6_pfcp = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only, + proto_hint_pfcp } +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_esp = { + TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6_only, + proto_hint_udp_only, proto_hint_esp } +}; + +struct iavf_hash_match_type iavf_hash_map_list[] = { /* IPV4 */ - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_SRC_ONLY, &hdrs_hint_eth_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2_DST_ONLY, &hdrs_hint_eth_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_SRC_ONLY, - &hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH | ETH_RSS_L2_DST_ONLY, - &hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ETH, &hdrs_hint_eth, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_S_VLAN, &hdrs_hint_svlan, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, &hdrs_hint_cvlan, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_ESP, &hdrs_hint_ipv4_esp, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_AH, &hdrs_hint_ipv4_ah, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_L2TPV3, &hdrs_hint_ipv4_l2tpv3, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_IPV4, &hdrs_hint_ipv4, - IAVF_GTPU_HINT_NONE}, + {ETH_RSS_L2_SRC_ONLY, + &hdrs_hint_eth_src, IAVF_PHINT_IPV4}, + {ETH_RSS_L2_DST_ONLY, + &hdrs_hint_eth_dst, IAVF_PHINT_IPV4}, + {ETH_RSS_ETH, + &hdrs_hint_eth, IAVF_PHINT_IPV4}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4, + &hdrs_hint_ipv4, IAVF_PHINT_IPV4}, + {ETH_RSS_ESP, + &hdrs_hint_ipv4_esp, IAVF_PHINT_IPV4}, + {ETH_RSS_AH, + &hdrs_hint_ipv4_ah, IAVF_PHINT_IPV4}, + {ETH_RSS_L2TPV3, + &hdrs_hint_ipv4_l2tpv3, IAVF_PHINT_IPV4}, /* IPV4 UDP */ - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_src_gtpu_up, IAVF_GTPU_HINT_UPLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_src_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_dst_gtpu_up, IAVF_GTPU_HINT_UPLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_dst_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + &hdrs_hint_ipv4_src_udp_src_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | - ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_src_gtpu_up, IAVF_GTPU_HINT_UPLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | - ETH_RSS_L3_SRC_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_src_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + &hdrs_hint_ipv4_src_udp_dst_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + &hdrs_hint_ipv4_dst_udp_src_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | - ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_dst_gtpu_up, IAVF_GTPU_HINT_UPLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | - ETH_RSS_L3_DST_ONLY | ETH_RSS_GTPU, - &hdrs_hint_ipv4_dst_gtpu_dwn, IAVF_GTPU_HINT_DOWNLINK}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP | + &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_PFCP, - &hdrs_hint_ipv4_pfcp, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_UDP, ETH_RSS_NONFRAG_IPV4_UDP, - &hdrs_hint_ipv4_udp, IAVF_GTPU_HINT_NONE}, + IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_port, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_PFCP, + &hdrs_hint_ipv4_pfcp, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_ESP, + &hdrs_hint_ipv4_udp_esp, IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP, + &hdrs_hint_ipv4_udp, IAVF_PHINT_IPV4_UDP}, /* IPV4 TCP */ - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | + &hdrs_hint_ipv4_src_tcp_src_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | + &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | + IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | + &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP | + &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_TCP, ETH_RSS_NONFRAG_IPV4_TCP, - &hdrs_hint_ipv4_tcp, IAVF_GTPU_HINT_NONE}, + IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_port, IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP, + &hdrs_hint_ipv4_tcp, IAVF_PHINT_IPV4_TCP}, /* IPV4 SCTP */ - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_src_sctp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_src_sctp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv4_dst_sctp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv4_dst_sctp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_sctp_src_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_sctp_dst_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_sctp_src_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_sctp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | + &hdrs_hint_ipv4_src_sctp_src_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_sctp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | + &hdrs_hint_ipv4_src_sctp_dst_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | + IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_sctp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | + &hdrs_hint_ipv4_dst_sctp_src_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP | + &hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_sctp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_sctp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4_SCTP, ETH_RSS_NONFRAG_IPV4_SCTP, - &hdrs_hint_ipv4_sctp, IAVF_GTPU_HINT_NONE}, + IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_sctp_src_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_sctp_dst_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_sctp_src_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_sctp_dst_port, IAVF_PHINT_IPV4_SCTP}, + {ETH_RSS_NONFRAG_IPV4_SCTP, + &hdrs_hint_ipv4_sctp, IAVF_PHINT_IPV4_SCTP}, /* IPV6 */ - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_SRC_ONLY, - &hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2_DST_ONLY, - &hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_SRC_ONLY, - &hdrs_hint_eth_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L2_DST_ONLY, - &hdrs_hint_eth_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ETH, - &hdrs_hint_eth, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_S_VLAN, - &hdrs_hint_svlan, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV4, ETH_RSS_C_VLAN, - &hdrs_hint_cvlan, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_ESP, - &hdrs_hint_ipv6_esp, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_AH, - &hdrs_hint_ipv6_ah, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_L2TPV3, - &hdrs_hint_ipv6_l2tpv3, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6, ETH_RSS_IPV6, - &hdrs_hint_ipv6, IAVF_GTPU_HINT_NONE}, + {ETH_RSS_L2_SRC_ONLY, + &hdrs_hint_eth_src, IAVF_PHINT_IPV6}, + {ETH_RSS_L2_DST_ONLY, + &hdrs_hint_eth_dst, IAVF_PHINT_IPV6}, + {ETH_RSS_ETH, + &hdrs_hint_eth, IAVF_PHINT_IPV6}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6}, + {ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6}, + {ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6}, + {ETH_RSS_IPV6, + &hdrs_hint_ipv6, IAVF_PHINT_IPV6}, + {ETH_RSS_ESP, + &hdrs_hint_ipv6_esp, IAVF_PHINT_IPV6}, + {ETH_RSS_AH, + &hdrs_hint_ipv6_ah, IAVF_PHINT_IPV6}, + {ETH_RSS_L2TPV3, + &hdrs_hint_ipv6_l2tpv3, IAVF_PHINT_IPV6}, /* IPV6 UDP */ - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_udp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_udp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_udp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_udp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_src_udp_src_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_src_udp_dst_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_dst_udp_src_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_dst_udp_dst_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | + &hdrs_hint_ipv6_src_udp_src_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | + &hdrs_hint_ipv6_src_udp_dst_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | + IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | + &hdrs_hint_ipv6_dst_udp_src_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP | + &hdrs_hint_ipv6_dst_udp_dst_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_udp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_udp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_PFCP, - &hdrs_hint_ipv6_pfcp, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_UDP, ETH_RSS_NONFRAG_IPV6_UDP, - &hdrs_hint_ipv6_udp, IAVF_GTPU_HINT_NONE}, + IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_udp_src_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_udp_dst_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_udp_src_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_udp_dst_port, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_PFCP, + &hdrs_hint_ipv6_pfcp, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_ESP, + &hdrs_hint_ipv6_udp_esp, IAVF_PHINT_IPV6_UDP}, + {ETH_RSS_NONFRAG_IPV6_UDP, + &hdrs_hint_ipv6_udp, IAVF_PHINT_IPV6_UDP}, /* IPV6 TCP */ - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_tcp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_tcp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_tcp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_tcp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_src_tcp_src_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_src_tcp_dst_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_dst_tcp_src_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | + &hdrs_hint_ipv6_src_tcp_src_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | + &hdrs_hint_ipv6_src_tcp_dst_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | + IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | + &hdrs_hint_ipv6_dst_tcp_src_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP | + &hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_tcp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_tcp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_TCP, - &hdrs_hint_ipv6_tcp, IAVF_GTPU_HINT_NONE}, + IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_tcp_src_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_tcp_dst_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_tcp_src_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_tcp_dst_port, IAVF_PHINT_IPV6_TCP}, + {ETH_RSS_NONFRAG_IPV6_TCP, + &hdrs_hint_ipv6_tcp, IAVF_PHINT_IPV6_TCP}, /* IPV6 SCTP */ - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_src_sctp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_src_sctp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv6_src, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_SRC_ONLY, &hdrs_hint_ipv6_dst_sctp_src_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY | - ETH_RSS_L4_DST_ONLY, &hdrs_hint_ipv6_dst_sctp_dst_port, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv6_dst, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_src_sctp_src_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_src_sctp_dst_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_dst_sctp_src_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_src_sctp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | + &hdrs_hint_ipv6_src_sctp_src_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_src_sctp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | + &hdrs_hint_ipv6_src_sctp_dst_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | + IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_dst_sctp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | + &hdrs_hint_ipv6_dst_sctp_src_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP | + &hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst, - IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv6_sctp_src_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv6_sctp_dst_port, IAVF_GTPU_HINT_NONE}, - {IAVF_PATTERN_HINT_IPV6_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP, - &hdrs_hint_ipv6_sctp, IAVF_GTPU_HINT_NONE}, + IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_sctp_src_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_sctp_dst_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv6_sctp_src_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv6_sctp_dst_port, IAVF_PHINT_IPV6_SCTP}, + {ETH_RSS_NONFRAG_IPV6_SCTP, + &hdrs_hint_ipv6_sctp, IAVF_PHINT_IPV6_SCTP}, + /* VLAN */ + {ETH_RSS_S_VLAN, + &hdrs_hint_svlan, IAVF_PHINT_S_VLAN}, + {ETH_RSS_C_VLAN, + &hdrs_hint_cvlan, IAVF_PHINT_C_VLAN}, +}; + +struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = { + /* GTPU */ + /* GTPU IP */ + /* GTPU IPV4*/ + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_ip, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_ip, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_ip, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_ip, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4, + &hdrs_hint_ipv4_gtpu_ip, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4}, + {ETH_RSS_GTPU, + &hdrs_hint_teid_gtpu_ip, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4}, + /* IPv4 GTPU IP IPv4 UDP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP, + &hdrs_hint_ipv4_udp_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, + /* IPv4 GTPU IP IPv4 TCP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP, + &hdrs_hint_ipv4_tcp_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, + /* GTPU EH */ + /* Inner IPV4 */ + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4, + &hdrs_hint_ipv4_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4}, + /* Inner IPV4->UDP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP, + &hdrs_hint_ipv4_udp_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP}, + /* Inner IPV4->TCP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP, + &hdrs_hint_ipv4_tcp_gtpu_eh, + IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP}, + /* GTPU EH UP */ + /* Inner IPV4 */ + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4, + &hdrs_hint_ipv4_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4}, + /* Inner IPV4->UDP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP, + &hdrs_hint_ipv4_udp_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP}, + /* Inner IPV4->TCP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP, + &hdrs_hint_ipv4_tcp_gtpu_up, + IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP}, + /* GTPU EH DWN */ + /* Inner IPV4 */ + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4 | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4}, + {ETH_RSS_IPV4, + &hdrs_hint_ipv4_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4}, + /* Inner IPV4->UDP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_udp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_udp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_udp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_udp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_udp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + {ETH_RSS_NONFRAG_IPV4_UDP, + &hdrs_hint_ipv4_udp_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP}, + /* Inner IPV4->TCP */ + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_src_tcp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_SRC_ONLY, + &hdrs_hint_ipv4_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_tcp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L3_DST_ONLY, + &hdrs_hint_ipv4_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP | + ETH_RSS_L4_DST_ONLY, + &hdrs_hint_ipv4_tcp_dst_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, + {ETH_RSS_NONFRAG_IPV4_TCP, + &hdrs_hint_ipv4_tcp_gtpu_dwn, + IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP}, }; struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = { @@ -1037,10 +1972,12 @@ iavf_hash_init(struct iavf_adapter *ad) } static int -iavf_hash_check_inset(const struct rte_flow_item pattern[], - struct rte_flow_error *error) +iavf_hash_parse_pattern(struct iavf_pattern_match_item *pattern_match_item, + const struct rte_flow_item pattern[], uint64_t *phint, + struct rte_flow_error *error) { const struct rte_flow_item *item = pattern; + const struct rte_flow_item_gtp_psc *psc; for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) { if (item->last) { @@ -1049,45 +1986,44 @@ iavf_hash_check_inset(const struct rte_flow_item pattern[], "Not support range"); return -rte_errno; } - } - - return 0; -} -static void -iavf_hash_refine_type(uint64_t *rss_type, const struct rte_flow_item pattern[], - enum iavf_gtpu_hint *gtpu_hint) -{ - const struct rte_flow_item *item; - - for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) { - if (item->type == RTE_FLOW_ITEM_TYPE_GTP_PSC) { - const struct rte_flow_item_gtp_psc *psc = item->spec; - - if (psc && (psc->pdu_type == IAVF_GTPU_HINT_UPLINK || - psc->pdu_type == IAVF_GTPU_HINT_DOWNLINK)) { - *rss_type |= ETH_RSS_GTPU; - *gtpu_hint = psc->pdu_type; - } + switch (item->type) { + case RTE_FLOW_ITEM_TYPE_GTPU: + *phint |= IAVF_PHINT_IPV4_GTPU_IP; + break; + case RTE_FLOW_ITEM_TYPE_GTP_PSC: + psc = item->spec; + *phint &= ~IAVF_PHINT_IPV4_GTPU_IP; + if (!psc) + *phint |= IAVF_PHINT_IPV4_GTPU_EH; + else if (psc->pdu_type == IAVF_GTPU_EH_UPLINK) + *phint |= IAVF_PHINT_IPV4_GTPU_EH_UPLINK; + else if (psc->pdu_type == IAVF_GTPU_EH_DWNLINK) + *phint |= IAVF_PHINT_IPV4_GTPU_EH_DWNLINK; + break; + default: + break; } } + + /* update and restore pattern hint */ + *phint |= ((struct iavf_pattern_match_type *) + (pattern_match_item->meta))->pattern_hint; + + return 0; } static int -iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, - const struct rte_flow_item pattern[], - const struct rte_flow_action actions[], - void **meta, struct rte_flow_error *error) +iavf_hash_parse_action(const struct rte_flow_action actions[], + uint64_t pattern_hint, void **meta, + struct rte_flow_error *error) { - struct iavf_pattern_match_type *mt = (struct iavf_pattern_match_type *) - (pattern_match_item->meta); struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta; - uint32_t type_list_len = RTE_DIM(iavf_hash_type_list); - struct iavf_hash_match_type *type_match_item; - enum iavf_gtpu_hint gtpu_hint = IAVF_GTPU_HINT_NONE; + struct iavf_hash_match_type *hash_map_list; enum rte_flow_action_type action_type; const struct rte_flow_action_rss *rss; const struct rte_flow_action *action; + uint32_t mlist_len; bool item_found = false; uint64_t rss_type; uint16_t i; @@ -1101,25 +2037,18 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, rss = action->conf; rss_type = rss->types; - /** - * Check simultaneous use of SRC_ONLY and DST_ONLY - * of the same level. - */ - rss_type = rte_eth_rss_hf_refine(rss_type); - - /** - * Refine the hash type base on some specific item of - * the pattern, such as identify the gtpu hash. - */ - iavf_hash_refine_type(&rss_type, pattern, >pu_hint); - - /* Check if pattern is empty. */ - if (pattern_match_item->pattern_list != - iavf_pattern_empty && rss->func == - RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ACTION, action, - "Not supported flow"); + if (rss->func == + RTE_ETH_HASH_FUNCTION_SIMPLE_XOR){ + rss_meta->rss_algorithm = + VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC; + } else if (rss->func == + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) { + rss_meta->rss_algorithm = + VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC; + } else { + rss_meta->rss_algorithm = + VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC; + } if (rss->level) return rte_flow_error_set(error, ENOTSUP, @@ -1136,48 +2065,36 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item, RTE_FLOW_ERROR_TYPE_ACTION, action, "a non-NULL RSS queue is not supported"); - /* Check hash function and save it to rss_meta. */ - if (rss->func == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) - rss_meta->rss_algorithm = - VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC; - else if (rss->func == - RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) - rss_meta->rss_algorithm = - VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC; - else - rss_meta->rss_algorithm = - VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC; + /** + * Check simultaneous use of SRC_ONLY and DST_ONLY + * of the same level. + */ + rss_type = rte_eth_rss_hf_refine(rss_type); - type_match_item = - rte_zmalloc("iavf_type_match_item", - sizeof(struct iavf_hash_match_type), 0); - if (!type_match_item) { - rte_flow_error_set(error, EINVAL, - RTE_FLOW_ERROR_TYPE_HANDLE, - NULL, - "No memory for type_match_item"); - return -ENOMEM; + if ((pattern_hint & IAVF_PHINT_IPV4_GTPU_IP) || + (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH) || + (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH_UPLINK) || + (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH_DWNLINK)) { + hash_map_list = iavf_gtpu_hash_map_list; + mlist_len = RTE_DIM(iavf_gtpu_hash_map_list); + } else { + hash_map_list = iavf_hash_map_list; + mlist_len = RTE_DIM(iavf_hash_map_list); } /* Find matched proto hdrs according to hash type. */ - for (i = 0; i < type_list_len; i++) { + for (i = 0; i < mlist_len; i++) { struct iavf_hash_match_type *ht_map = - &iavf_hash_type_list[i]; + &hash_map_list[i]; if (rss_type == ht_map->hash_type && - mt->phint_type == ht_map->phint_type && - gtpu_hint == ht_map->gtpu_hint) { - type_match_item->hash_type = - ht_map->hash_type; - type_match_item->proto_hdrs = - ht_map->proto_hdrs; + pattern_hint == ht_map->pattern_hint) { rss_meta->proto_hdrs = - type_match_item->proto_hdrs; + ht_map->proto_hdrs; item_found = true; + break; } } - rte_free(type_match_item); - if (!item_found) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, action, @@ -1209,6 +2126,7 @@ iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad, { struct iavf_pattern_match_item *pattern_match_item; struct iavf_rss_meta *rss_meta_ptr; + uint64_t phint = IAVF_PHINT_NONE; int ret = 0; rss_meta_ptr = rte_zmalloc(NULL, sizeof(*rss_meta_ptr), 0); @@ -1228,12 +2146,12 @@ iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad, goto error; } - ret = iavf_hash_check_inset(pattern, error); + ret = iavf_hash_parse_pattern(pattern_match_item, pattern, &phint, + error); if (ret) goto error; - /* Check rss action. */ - ret = iavf_hash_parse_action(pattern_match_item, pattern, actions, + ret = iavf_hash_parse_action(actions, phint, (void **)&rss_meta_ptr, error); error: From patchwork Fri Jul 3 11:16:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com X-Patchwork-Id: 73036 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67E0AA0519; Fri, 3 Jul 2020 16:40:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 127601DCA3; Fri, 3 Jul 2020 16:38:05 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 79C171D8CF for ; Fri, 3 Jul 2020 13:17:23 +0200 (CEST) IronPort-SDR: K4T5FKDm8vhJVlSBYDxxo95cScWbJiWnU30AD98DqgGWulOlmJASd/y/dfCmuh/R12PFxsD2Uu vVTSKnM/Y5zA== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="146220582" X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="146220582" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 04:17:21 -0700 IronPort-SDR: Yq8XFBpiS9ILch55jrSHtPsWVpgd4q8HcviRkH6Sttu+yukRoC1koAsBS4G+GbLoEFKn075y5d LvB8kpK7jKFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,308,1589266800"; d="scan'208";a="321780423" Received: from silpixa00400380.ir.intel.com ([10.237.213.188]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2020 04:17:19 -0700 From: Gordon@dpdk.org, Noonan@dpdk.org, gordon.noonan@intel.com To: dev@dpdk.org Cc: gordon.noonan@intel.com, Jeff Guo Date: Fri, 3 Jul 2020 12:16:44 +0100 Message-Id: <20200703111644.73351-9-gordon.noonan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703111644.73351-1-gordon.noonan@intel.com> References: <20200703111644.73351-1-gordon.noonan@intel.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 16:37:41 +0200 Subject: [dpdk-dev] [PATCH RFC 8/8] net/iavf: fix gtpu ip udp issue 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" From: Jeff Guo Signed-off-by: Jeff Guo --- drivers/net/iavf/iavf_hash.c | 136 ++++++++++++++++++++++++++--------- 1 file changed, 103 insertions(+), 33 deletions(-) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index 62dd29889..f17b119e2 100644 --- a/drivers/net/iavf/iavf_hash.c +++ b/drivers/net/iavf/iavf_hash.c @@ -565,6 +565,76 @@ struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_ip = { proto_hint_ipv4 } }; +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_only_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_only_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_src_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_src_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_prot, proto_hint_udp} +}; + +struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_ip = { + TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_ip_only, + proto_hint_ipv4_prot, proto_hint_tcp} +}; + struct virtchnl_proto_hdrs hdrs_hint_teid_gtpu_ip = { TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_teid} }; @@ -1309,43 +1379,43 @@ struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = { /* IPv4 GTPU IP IPv4 UDP */ {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_udp_src_gtpu_eh, + &hdrs_hint_ipv4_src_udp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_udp_dst_gtpu_eh, + &hdrs_hint_ipv4_src_udp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src_gtpu_eh, + &hdrs_hint_ipv4_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_udp_src_gtpu_eh, + &hdrs_hint_ipv4_udp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_udp_src_gtpu_eh, + &hdrs_hint_ipv4_dst_udp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_udp_dst_gtpu_eh, + &hdrs_hint_ipv4_udp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_udp_src_gtpu_eh, + &hdrs_hint_ipv4_src_udp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_udp_dst_gtpu_eh, + &hdrs_hint_ipv4_src_udp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src_gtpu_eh, + &hdrs_hint_ipv4_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY, @@ -1353,86 +1423,86 @@ struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = { IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_udp_src_gtpu_eh, + &hdrs_hint_ipv4_dst_udp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_udp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_udp_dst_gtpu_eh, + &hdrs_hint_ipv4_udp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, {ETH_RSS_NONFRAG_IPV4_UDP, - &hdrs_hint_ipv4_udp_gtpu_eh, + &hdrs_hint_ipv4_udp_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_UDP}, /* IPv4 GTPU IP IPv4 TCP */ {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_tcp_src_gtpu_eh, + &hdrs_hint_ipv4_src_tcp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src_gtpu_eh, + &hdrs_hint_ipv4_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_tcp_src_gtpu_eh, + &hdrs_hint_ipv4_tcp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_tcp_dst_gtpu_eh, + &hdrs_hint_ipv4_tcp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_src_tcp_src_gtpu_eh, + &hdrs_hint_ipv4_src_tcp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh, + &hdrs_hint_ipv4_src_tcp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY, - &hdrs_hint_ipv4_src_gtpu_eh, + &hdrs_hint_ipv4_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_tcp_src_gtpu_eh, + &hdrs_hint_ipv4_tcp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY, - &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh, + &hdrs_hint_ipv4_dst_tcp_src_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_tcp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_DST_ONLY, - &hdrs_hint_ipv4_dst_gtpu_eh, + &hdrs_hint_ipv4_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY, - &hdrs_hint_ipv4_tcp_dst_gtpu_eh, + &hdrs_hint_ipv4_tcp_dst_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, {ETH_RSS_NONFRAG_IPV4_TCP, - &hdrs_hint_ipv4_tcp_gtpu_eh, + &hdrs_hint_ipv4_tcp_gtpu_ip, IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4_TCP}, /* GTPU EH */ /* Inner IPV4 */