Thread (202 messages) 202 messages, 11 authors, 2016-04-06

Re: [PATCH v2 07/12] pmd/ixgbe: add dev_ptype_info_get implementation

From: Ananyev, Konstantin <hidden>
Date: 2016-02-25 11:10:34

quoted
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help