From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 6BFCE567A for ; Mon, 14 Mar 2016 15:43:48 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 14 Mar 2016 07:43:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,335,1455004800"; d="scan'208";a="763833833" Received: from dpdk06.sh.intel.com ([10.239.128.225]) by orsmga003.jf.intel.com with ESMTP; 14 Mar 2016 07:43:46 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: helin.zhang@intel.com, konstantin.ananyev@intel.com, adrien.mazarguil@6wind.com, Jianfeng Tan Date: Mon, 14 Mar 2016 15:42:55 +0800 Message-Id: <1457941376-15852-11-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1457941376-15852-1-git-send-email-jianfeng.tan@intel.com> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1457941376-15852-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH v8 10/11] nfp: add dev_supported_ptypes_get implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 14:43:49 -0000 Signed-off-by: Jianfeng Tan Acked-by: Konstantin Ananyev Acked-by: Adrien Mazarguil --- drivers/net/nfp/nfp_net.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 573b6bc..163cac8 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1063,6 +1063,24 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ; } +static const uint32_t * +nfp_net_supported_ptypes_get(struct rte_eth_dev *dev) +{ + static const uint32_t ptypes[] = { + /* refers to nfp_net_set_hash() */ + RTE_PTYPE_INNER_L3_IPV4, + RTE_PTYPE_INNER_L3_IPV6, + RTE_PTYPE_INNER_L3_IPV6_EXT, + RTE_PTYPE_INNER_L4_MASK, + RTE_PTYPE_UNKNOWN + }; + + + if (dev->rx_pkt_burst == nfp_net_recv_pkts) + return ptypes; + return num; +} + static uint32_t nfp_net_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_idx) { @@ -2283,6 +2301,7 @@ static struct eth_dev_ops nfp_net_eth_dev_ops = { .stats_get = nfp_net_stats_get, .stats_reset = nfp_net_stats_reset, .dev_infos_get = nfp_net_infos_get, + .dev_supported_ptypes_get = nfp_net_supported_ptypes_get, .mtu_set = nfp_net_dev_mtu_set, .vlan_offload_set = nfp_net_vlan_offload_set, .reta_update = nfp_net_reta_update, -- 2.1.4