From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D1E6A04A4; Wed, 3 Jun 2020 16:21:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3C5561D578; Wed, 3 Jun 2020 16:20:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 04E391D569 for ; Wed, 3 Jun 2020 16:20:30 +0200 (CEST) IronPort-SDR: pImC9vhcn65wVl2sA9mpA/E3VO7dumbBxP2ZdUtl4fj6i/WCdYmrYJTiXo9bZB27fcnOF8+0ax urt8H7Bn/dhA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 07:20:30 -0700 IronPort-SDR: ye0sO5NnY9STbyYmq1IexKZlunfWGA066i0Z8emluGBwpqskXVtbPwIyv62DhpmP6aCvqI+ysB ReWqaQ3qQ7XA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,467,1583222400"; d="scan'208";a="416572761" Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by orsmga004.jf.intel.com with ESMTP; 03 Jun 2020 07:20:28 -0700 From: Bernard Iremonger To: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com, declan.doherty@intel.com, orika@mellanox.com Cc: Bernard Iremonger Date: Wed, 3 Jun 2020 15:20:06 +0100 Message-Id: <1591194009-4086-6-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1591194009-4086-1-git-send-email-bernard.iremonger@intel.com> References: <1591194009-4086-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH 5/8] net/i40e: add map filter 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" In i40e_ethdev.h add the following: struct i40e_map_filter struct i40e_rte_flow_map_conf Signed-off-by: Bernard Iremonger --- drivers/net/i40e/i40e_ethdev.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index e5d0ce5..2426e29 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -762,6 +762,10 @@ struct i40e_rss_pattern_info { uint64_t types; }; +struct i40e_map_pattern_info { + uint8_t action_flag; +}; + /* Tunnel filter number HW supports */ #define I40E_MAX_TUNNEL_FILTER_NUM 400 @@ -992,6 +996,19 @@ struct i40e_rss_filter { struct i40e_rte_flow_rss_conf rss_filter_info; }; +struct i40e_rte_flow_map_conf { + struct rte_flow_action_map conf; /**< MAP parameters. */ + bool valid; /* Check if it's valid */ +}; + +TAILQ_HEAD(i40e_map_conf_list, i40e_map_filter); + +/* MAP filter list structure */ +struct i40e_map_filter { + TAILQ_ENTRY(i40e_map_filter) next; + struct i40e_rte_flow_map_conf map_filter_info; +}; + struct i40e_vf_msg_cfg { /* maximal VF message during a statistic period */ uint32_t max_msg; @@ -1085,6 +1102,8 @@ struct i40e_pf { uint16_t switch_domain_id; struct i40e_vf_msg_cfg vf_msg_cfg; + struct i40e_rte_flow_map_conf map_info; /* MAP info */ + struct i40e_map_conf_list map_config_list; /* MAP rule list */ }; enum pending_msg { @@ -1219,6 +1238,7 @@ union i40e_filter_t { struct rte_eth_tunnel_filter_conf tunnel_filter; struct i40e_tunnel_filter_conf consistent_tunnel_filter; struct i40e_rte_flow_rss_conf rss_conf; + struct i40e_rte_flow_map_conf map_conf; }; typedef int (*parse_filter_t)(struct rte_eth_dev *dev, @@ -1365,6 +1385,10 @@ int i40e_config_rss_filter(struct i40e_pf *pf, struct i40e_rte_flow_rss_conf *conf, bool add); int i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params); int i40e_vf_representor_uninit(struct rte_eth_dev *ethdev); +int i40e_map_conf_init(struct i40e_rte_flow_map_conf *out, + const struct rte_flow_action_map *in); +int i40e_config_map_filter(struct i40e_pf *pf, + struct i40e_rte_flow_map_conf *conf, bool add); #define I40E_DEV_TO_PCI(eth_dev) \ RTE_DEV_TO_PCI((eth_dev)->device) -- 2.7.4