]> git.droids-corp.org - dpdk.git/commitdiff
igb: fix i350 VF Rx
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Tue, 5 Apr 2016 01:10:00 +0000 (09:10 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 6 Apr 2016 10:34:52 +0000 (12:34 +0200)
A problem is found on i350 VF. We found TX will happen once
per 4 packets. If only 1~3 packets are received, they will
not be forwarded. But the real problem is on RX side. The
reason is the default RX write-back threshold is changed to
4, so every first 3 packets may be hung there.

This patch checks the RX wthresh when setting up the RX
queue, and forces it to be 1, so every packet can be handled
immediately.

Fixes: 4a41c17dba18 ("igb: set default thresholds based on MAC type")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
drivers/net/e1000/igb_rxtx.c

index 529dba4cf6eec623df1d6c586168c4c57b8eb406..4a987e3cc01488d0066c66df5e2a0b7c5f84cb0b 100644 (file)
@@ -1466,7 +1466,8 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
        rxq->pthresh = rx_conf->rx_thresh.pthresh;
        rxq->hthresh = rx_conf->rx_thresh.hthresh;
        rxq->wthresh = rx_conf->rx_thresh.wthresh;
-       if (rxq->wthresh > 0 && hw->mac.type == e1000_82576)
+       if (rxq->wthresh > 0 &&
+           (hw->mac.type == e1000_82576 || hw->mac.type == e1000_vfadapt_i350))
                rxq->wthresh = 1;
        rxq->drop_en = rx_conf->rx_drop_en;
        rxq->rx_free_thresh = rx_conf->rx_free_thresh;