[dpdk-dev] [PATCH v2 07/12] pmd/ixgbe: add dev_ptype_info_get implementation

Ananyev, Konstantin konstantin.ananyev at intel.com
Thu Feb 25 12:10:31 CET 2016


> >>
> >> +static int
> >> +ixgbe_dev_ptype_info_get(struct rte_eth_dev *dev, uint32_t ptypes[])
> >> +{
> >> +	int num = 0;
> >> +
> >> +	if (dev->rx_pkt_burst == ixgbe_recv_pkts ||
> >> +	    dev->rx_pkt_burst == ixgbe_recv_pkts_lro_single_alloc ||
> >> +	    dev->rx_pkt_burst == ixgbe_recv_pkts_lro_bulk_alloc ||
> >> +	    dev->rx_pkt_burst == ixgbe_recv_pkts_bulk_alloc ||
> >> +	    dev->rx_pkt_burst == ixgbe_recv_pkts_vec ||
> >> +	    dev->rx_pkt_burst == ixgbe_recv_scattered_pkts_vec) {
> > Is there any point in that big if above?
> > All ixgbe recv functions support ptype recognition, so why to have it at all?
> > Same question for igb.
> > Konstantin
> 
> I'd like this code to put it explicitly instead of an "if
> (dev->rx_pkt_burst)" to indicate that all ixgbe recv functions supports
> these ptypes.
> 
> Is it make sense?

It seems a bit of overhead to me, but if you would like to keep it as it is,
I wouldn't insist.
Konstantin


More information about the dev mailing list