From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id EF08D91C0 for ; Fri, 15 Jan 2016 13:46:32 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 15 Jan 2016 04:46:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,299,1449561600"; d="scan'208";a="891104788" Received: from dpdk06.sh.intel.com ([10.239.128.225]) by orsmga002.jf.intel.com with ESMTP; 15 Jan 2016 04:46:31 -0800 From: Jianfeng Tan To: dev@dpdk.org Date: Fri, 15 Jan 2016 13:45:57 +0800 Message-Id: <1452836759-63540-11-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452836759-63540-1-git-send-email-jianfeng.tan@intel.com> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1452836759-63540-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH v2 10/12] pmd/nfp: add dev_ptype_info_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: Fri, 15 Jan 2016 12:46:33 -0000 Signed-off-by: Jianfeng Tan --- drivers/net/nfp/nfp_net.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index bc2089f..b8da71e 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1075,6 +1075,22 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) #endif } +static int +nfp_net_ptype_info_get(struct rte_eth_dev *dev, uint32_t ptypes[]) +{ + int num = 0; + + if (dev->rx_pkt_burst == nfp_net_recv_pkts) { + /* refers to nfp_net_set_hash() */ + ptypes[num++] = RTE_PTYPE_INNER_L3_IPV4; + ptypes[num++] = RTE_PTYPE_INNER_L3_IPV6; + ptypes[num++] = RTE_PTYPE_INNER_L3_IPV6_EXT; + ptypes[num++] = RTE_PTYPE_INNER_L4_MASK; + } + + return num; +} + static uint32_t nfp_net_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_idx) { @@ -2294,6 +2310,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_ptype_info_get = nfp_net_ptype_info_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