[dpdk-dev] DPDK delaying individual packets infinitely

Stephen Hemminger stephen at networkplumber.org
Thu Jan 2 17:43:35 CET 2014


On Fri, 06 Dec 2013 17:22:37 +0400
Dmitry Vyal <dmitryvyal at gmail.com> wrote:

> Hello list,
> 
> For some time I've been writing a custom packet generator coupled with a 
> packet receiver using DPDK.
> 
> It works greatly when used for generating  millions of packets, but 
> unexpectedly It has troubles generating a several dozens of packets or so.
> 
> The application consists of two threads, first one sends the packets 
> from one port and second receives them on another. These are 2 ports of 
> four-ports 1Gb NIC. It's detected as Intel Corporation 82576 Gigabit 
> Network Connection (rev 01). Ports are connected with a patch cord.

I saw something similar with some NIC's and backported a fix from
the Linux driver to make sure that threshold was not set incorrectly.
Maybe something similar is needed with your hardware or is missing in
the version of DPDK you ar using.



Subject: [PATCH 4/8] igb: workaround errata with wthresh on 82576

The 82576 has known issues which require the write threshold to be
set to 1.
See:
	http://download.intel.com/design/network/specupdt/82576_SPECUPDATE.pdf
---
 lib/librte_pmd_e1000/em_rxtx.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/lib/librte_pmd_e1000/em_rxtx.c	2013-04-10 13:59:55.166549303 -0700
+++ b/lib/librte_pmd_e1000/em_rxtx.c	2013-04-10 14:00:44.049915140 -0700
@@ -1270,6 +1270,8 @@ eth_em_tx_queue_setup(struct rte_eth_dev
 	txq->pthresh = tx_conf->tx_thresh.pthresh;
 	txq->hthresh = tx_conf->tx_thresh.hthresh;
 	txq->wthresh = tx_conf->tx_thresh.wthresh;
+	if (txq->wthresh > 0 && hw->mac.type == e1000_82576)
+		txq->wthresh = 1;
 	txq->queue_id = queue_idx;
 	txq->port_id = dev->data->port_id;
 
@@ -1391,6 +1393,9 @@ eth_em_rx_queue_setup(struct rte_eth_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)
+		rxq->wthresh = 1;
+
 	rxq->rx_free_thresh = rx_conf->rx_free_thresh;
 	rxq->queue_id = queue_idx;
 	rxq->port_id = dev->data->port_id;


More information about the dev mailing list