From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate3.asicdesigners.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 04AD39580 for ; Wed, 6 Jan 2016 08:11:39 +0100 (CET) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id u067Ba7P003953; Tue, 5 Jan 2016 23:11:37 -0800 Date: Wed, 6 Jan 2016 12:41:14 +0530 From: Rahul Lakkireddy To: Jianfeng Tan Message-ID: <20160106071112.GA3690@scalar.blr.asicdesigners.com> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1451544799-70776-3-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1451544799-70776-3-git-send-email-jianfeng.tan@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Cc: dev@dpdk.org, Kumar Sanghvi , Nirranjan Kirubaharan Subject: Re: [dpdk-dev] [PATCH 02/12] pmd/cxgbe: 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: Wed, 06 Jan 2016 07:11:40 -0000 Hi Jianfeng, On Thursday, December 12/31/15, 2015 at 14:53:09 +0800, Jianfeng Tan wrote: > Signed-off-by: Jianfeng Tan > --- > drivers/net/cxgbe/cxgbe_ethdev.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c > index 97ef152..f17d5d5 100644 > --- a/drivers/net/cxgbe/cxgbe_ethdev.c > +++ b/drivers/net/cxgbe/cxgbe_ethdev.c > @@ -767,6 +767,22 @@ static int cxgbe_flow_ctrl_set(struct rte_eth_dev *eth_dev, > &pi->link_cfg); > } > > +static int cxgbe_dev_ptype_info_get(struct rte_eth_dev *eth_dev __rte_unused, > + uint32_t ptype_mask, uint32_t ptypes[]) > +{ No need for the __rte_unused for eth_dev above since it's being used for if conditional below. > + int num = 0; > + > + if (eth_dev->rx_pkt_burst == cxgbe_recv_pkts) { > + if ((ptype_mask & RTE_PTYPE_L3_MASK) == RTE_PTYPE_L3_MASK) { > + ptypes[num++] = RTE_PTYPE_L3_IPV4; > + ptypes[num++] = RTE_PTYPE_L3_IPV6; > + } > + } else > + num = -ENOTSUP; > + > + return num; > +} > + > static struct eth_dev_ops cxgbe_eth_dev_ops = { > .dev_start = cxgbe_dev_start, > .dev_stop = cxgbe_dev_stop, > @@ -777,6 +793,7 @@ static struct eth_dev_ops cxgbe_eth_dev_ops = { > .allmulticast_disable = cxgbe_dev_allmulticast_disable, > .dev_configure = cxgbe_dev_configure, > .dev_infos_get = cxgbe_dev_info_get, > + .dev_ptype_info_get = cxgbe_dev_ptype_info_get, > .link_update = cxgbe_dev_link_update, > .mtu_set = cxgbe_dev_mtu_set, > .tx_queue_setup = cxgbe_dev_tx_queue_setup, > -- > 2.1.4 > Thanks, Rahul