From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2500C2C0B for ; Fri, 26 Feb 2016 08:10:36 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 25 Feb 2016 23:10:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,498,1449561600"; d="scan'208";a="921543472" Received: from dpdk06.sh.intel.com ([10.239.128.225]) by orsmga002.jf.intel.com with ESMTP; 25 Feb 2016 23:10:15 -0800 From: Jianfeng Tan To: dev@dpdk.org Date: Fri, 26 Feb 2016 08:09:23 +0800 Message-Id: <1456445371-147264-5-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456445371-147264-1-git-send-email-jianfeng.tan@intel.com> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1456445371-147264-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH v4 04/12] pmd/enic: 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, 26 Feb 2016 07:10:37 -0000 Signed-off-by: Jianfeng Tan --- drivers/net/enic/enic_ethdev.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 2a88043..fbeab6f 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -54,6 +54,9 @@ #define ENICPMD_FUNC_TRACE() (void)0 #endif +static uint16_t enicpmd_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); + /* * The set of PCI devices this driver supports */ @@ -431,6 +434,19 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev, DEV_TX_OFFLOAD_TCP_CKSUM; } +static const uint32_t *enicpmd_dev_ptype_info_get(struct rte_eth_dev *dev) +{ + static const uint32_t ptypes[] = { + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_UNKNOWN + }; + + if (dev->rx_pkt_burst == enicpmd_recv_pkts) + return ptypes; + return NULL; +} + static void enicpmd_dev_promiscuous_enable(struct rte_eth_dev *eth_dev) { struct enic *enic = pmd_priv(eth_dev); @@ -566,6 +582,7 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .stats_reset = enicpmd_dev_stats_reset, .queue_stats_mapping_set = NULL, .dev_infos_get = enicpmd_dev_info_get, + .dev_ptype_info_get = enicpmd_dev_ptype_info_get, .mtu_set = NULL, .vlan_filter_set = enicpmd_vlan_filter_set, .vlan_tpid_set = NULL, -- 2.1.4