Skip to contentSkip to conversation

NIC Stops Transmitting

PATCH In review Scott Talbert 6 participants 10 messages Jul 26, 2013 – Jul 31, 2013 9 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I'm writing an application using DPDK that transmits a large number of packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything will run fine for several seconds (receiver is receiving at correct rate), but then the NIC appears to get 'stuck' and doesn't transmit any more packets. In this state, rte_eth_tx_burst() is returning zero (suggesting that there are no available transmit descriptors), but even if I sleep() for a second and try again, rte_eth_tx_burst() still returns 0. It almost appears as if a packet gets stuck in the transmit ring and keeps everything from flowing. I'm using an Intel 82599EB NIC.

Does anyone have any ideas of what might be going on?

Thanks,
Scott

A message that is not in the archive (sent off-list or not yet received): alpine.LRH.2.03.1307261538440.21740-HdGmbYkwPlSsTnJN9+BGXg@public.gmane.org

#2 lore raw
Quoted 12 lines · On Fri, 26 Jul 2013 15:39:18 -0400 (EDT) Scott Talbert…

Hi,

I'm writing an application using DPDK that transmits a large number of packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything will run fine for several seconds (receiver is receiving at correct rate), but then the NIC appears to get 'stuck' and doesn't transmit any more packets. In this state, rte_eth_tx_burst() is returning zero (suggesting that there are no available transmit descriptors), but even if I sleep() for a second and try again, rte_eth_tx_burst() still returns 0. It almost appears as if a packet gets stuck in the transmit ring and keeps everything from flowing. I'm using an Intel 82599EB NIC.

Quoted 4 lines

Does anyone have any ideas of what might be going on?

Thanks,
Scott

Make sure there is enough memory for mbufs.
Also what is your ring size and transmit free threshold?
It is easy to instrument the driver to see where it is saying "no space left" Also be careful with threshold values, many values of pthresh/hthresh/wthresh don't work. I would check the Intel reference manual for your hardware.

A message that is not in the archive (sent off-list or not yet received): 20130726125322.0ecbca48-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org

#4 lore raw
Quoted 10 lines · Stephen Hemminger
Quoted 10 lines

I'm writing an application using DPDK that transmits a large number of packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything will run fine for several seconds (receiver is receiving at correct rate), but then the NIC appears to get 'stuck' and doesn't transmit any more packets. In this state, rte_eth_tx_burst() is returning zero (suggesting that there are no available transmit descriptors), but even if I sleep() for a second and try again, rte_eth_tx_burst() still returns 0. It almost appears as if a packet gets stuck in the transmit ring and keeps everything from flowing. I'm using an Intel 82599EB NIC.

Quoted 5 lines

Make sure there is enough memory for mbufs.
Also what is your ring size and transmit free threshold?
It is easy to instrument the driver to see where it is saying "no space left" Also be careful with threshold values, many values of pthresh/hthresh/wthresh don't work. I would check the Intel reference manual for your hardware.

Thanks for the tips. I don't think I'm running out of mbufs, but I'll check that again. I am using these values from one of the examples - which claim to be correct for the 82599EB.

/*
* These default values are optimized for use with the Intel(R) 82599 10
GbE
* Controller and the DPDK ixgbe PMD. Consider using other values for
other
* network controllers and/or network drivers.
*/
#define TX_PTHRESH 36 /**< Default values of TX prefetch threshold reg. */ #define TX_HTHRESH 0 /**< Default values of TX host threshold reg. */ #define TX_WTHRESH 0 /**< Default values of TX write-back threshold reg. */

static const struct rte_eth_txconf tx_conf = {
.tx_thresh = {
.pthresh = TX_PTHRESH,
.hthresh = TX_HTHRESH,
.wthresh = TX_WTHRESH,
},
.tx_free_thresh = 0, /* Use PMD default values */ .tx_rs_thresh = 0, /* Use PMD default values */
};

/*
* Configurable number of RX/TX ring descriptors */
#define RTE_TEST_TX_DESC_DEFAULT 512 static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;

A message that is not in the archive (sent off-list or not yet received): alpine.LRH.2.03.1307261601190.21740-HdGmbYkwPlSsTnJN9+BGXg@public.gmane.org

#6 lore raw
Quoted 47 lines · Scott Talbert
Quoted 13 lines · Stephen Hemminger
Quoted 4 lines

I'm writing an application using DPDK that transmits a large number of packets (it doesn't receive any). When I transmit at 2 Gb/sec, everything
will run fine for several seconds (receiver is receiving at correct

Quoted 9 lines

rate),
but then the NIC appears to get 'stuck' and doesn't transmit any more packets. In this state, rte_eth_tx_burst() is returning zero (suggesting that there are no available transmit descriptors), but even if I sleep() for a second and try again, rte_eth_tx_burst() still returns 0. It almost
appears as if a packet gets stuck in the transmit ring and keeps everything from flowing. I'm using an Intel 82599EB NIC.

Quoted 7 lines

Make sure there is enough memory for mbufs.
Also what is your ring size and transmit free threshold?
It is easy to instrument the driver to see where it is saying "no space left"
Also be careful with threshold values, many values of pthresh/hthresh/wthresh
don't work. I would check the Intel reference manual for your hardware.

Thanks for the tips. I don't think I'm running out of mbufs, but I'll check that again. I am using these values from one of the examples - which claim to be correct for the 82599EB.

/*
* These default values are optimized for use with the Intel(R) 82599 10 GbE
* Controller and the DPDK ixgbe PMD. Consider using other values for other
* network controllers and/or network drivers.
*/
#define TX_PTHRESH 36 /**< Default values of TX prefetch threshold reg. */ #define TX_HTHRESH 0 /**< Default values of TX host threshold reg. */ #define TX_WTHRESH 0 /**< Default values of TX write-back threshold reg. */

static const struct rte_eth_txconf tx_conf = {
.tx_thresh = {
.pthresh = TX_PTHRESH,
.hthresh = TX_HTHRESH,
.wthresh = TX_WTHRESH,
},
.tx_free_thresh = 0, /* Use PMD default values */ .tx_rs_thresh = 0, /* Use PMD default values */
};

Quoted 6 lines

/*
* Configurable number of RX/TX ring descriptors */
#define RTE_TEST_TX_DESC_DEFAULT 512 static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;

Scott,

I am wondering whether you use multiple cores accessing the same receive queue. I had this problem before, but after I make the same number of receiving queues as the number of receiving cores, the problem disappeared. I did not dig more since I did not care how many receive queues I have did not matter.

Jinho

A message that is not in the archive (sent off-list or not yet received): CAPQGAnHkqCHQ9g7OQXF5+w-nho78HdtgCh8YtXumnCz-jzNANg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#8 lore raw
Quoted 29 lines · jinho hwang
Quoted 23 lines

Thanks for the tips. I don't think I'm running out of mbufs, but I'll check that again. I am using these values from one of the examples - which claim to be correct for the 82599EB.

/*
* These default values are optimized for use with the Intel(R) 82599 10 GbE
* Controller and the DPDK ixgbe PMD. Consider using other values for other
* network controllers and/or network drivers.
*/
#define TX_PTHRESH 36 /**< Default values of TX prefetch threshold reg. */ #define TX_HTHRESH 0 /**< Default values of TX host threshold reg. */ #define TX_WTHRESH 0 /**< Default values of TX write-back threshold reg. */

static const struct rte_eth_txconf tx_conf = {
.tx_thresh = {
.pthresh = TX_PTHRESH,
.hthresh = TX_HTHRESH,
.wthresh = TX_WTHRESH,
},
.tx_free_thresh = 0, /* Use PMD default values */ .tx_rs_thresh = 0, /* Use PMD default values */
};

Quoted 6 lines

/*
* Configurable number of RX/TX ring descriptors */
#define RTE_TEST_TX_DESC_DEFAULT 512 static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;

Quoted 5 lines

I am wondering whether you use multiple cores accessing the same receive queue. I had this problem before, but after I make the same number of receiving queues as the number of receiving cores, the problem disappeared. I did not dig more since I did not care how many receive queues I have did not matter.

Jinho,

Thanks. I have only one queue (should I be using more?) but as far as I know, I'm only using one core to transmit as well.

Scott

A message that is not in the archive (sent off-list or not yet received): alpine.LRH.2.03.1307261924200.3700-HdGmbYkwPlSsTnJN9+BGXg@public.gmane.org

#10 lore raw
Quoted 7 lines · Scott Talbert
Quoted 5 lines

I am wondering whether you use multiple cores accessing the same receive queue. I had this problem before, but after I make the same number of receiving queues as the number of receiving cores, the problem disappeared. I did not dig more since I did not care how many receive queues I have did not matter.

Thanks. I have only one queue (should I be using more?) but as far as I know, I'm only using one core to transmit as well.

All,

It turns out that the problem appears to have been caused by me using a signal handler to control my data rates. After switching to use RTE timers instead, I am able to transmit close to 10 Gb/sec reliably.

Thanks,
Scott

A message that is not in the archive (sent off-list or not yet received): alpine.LRH.2.03.1307291301430.23215-HdGmbYkwPlSsTnJN9+BGXg@public.gmane.org

#12 lore raw

miss include file in DPDK 1.3.1r2

Hi All,

In DPDK 1.3.1r2, When I include 'rte_malloc.h' in my app, and then compile it
Will cause this issue:
/root/dpdk/x86_64-default-linuxapp-gcc/include/rte_malloc.h:333: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rte_malloc_virt2phy’

It looks it miss the definition of 'phys_addr_t' which is defined in 'rte_memory.h'

Thanks

BRs
Jia Sui

A message that is not in the archive (sent off-list or not yet received): 581E2E1085FAEF45B48CF8A139824CF804E64C5644-vBGlDtGOlKBBva6MZ6yAsJWt57iikwTfrKKpfKFFTNI@public.gmane.org

#14 lore raw

PATCH 1/1 mem: fix include in rte_malloc

The function rte_malloc_virt2phy has a dependency on rte_memory.h:
phys_addr_t must be defined.

The dependency handling for apps was wrong in the commit 8c86825cbf. Let's revert this part.

---
 app/test/test_hash.c           |    2 +-
 app/test/test_hash_perf.c      |    2 +-
 app/test/test_memcpy.c         |    1 -
 app/test/test_memcpy_perf.c    |    1 -
 lib/librte_malloc/rte_malloc.h |    1 +
 5 files changed, 3 insertions(+), 4 deletions(-)
app/test/test_hash.c +1 -1
index 4de8cb1..5437e05 100644
@@ -41,10 +41,10 @@
 #include <sys/queue.h>
 
 #include <rte_common.h>
+#include <rte_malloc.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
 #include <rte_memory.h>
-#include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_tailq.h>
 #include <rte_eal.h>
app/test/test_hash_perf.c +1 -1
index 311c2bd..8a0feb3 100644
@@ -42,10 +42,10 @@
 
 #include <rte_common.h>
 #include <rte_lcore.h>
+#include <rte_malloc.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
 #include <rte_memory.h>
-#include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_tailq.h>
 #include <rte_eal.h>
app/test/test_memcpy.c +0 -1
index 729a2ff..d7777a8 100644
@@ -41,7 +41,6 @@
 #include <cmdline_parse.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
-#include <rte_memory.h>
 #include <rte_malloc.h>
 
 #include <rte_memcpy.h>
app/test/test_memcpy_perf.c +0 -1
index 1e75f53..236b295 100644
@@ -41,7 +41,6 @@
 #include <cmdline_parse.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
-#include <rte_memory.h>
 #include <rte_malloc.h>
 
 #include <rte_memcpy.h>
lib/librte_malloc/rte_malloc.h +1 -0
index e68187a..fe85689 100644
@@ -42,6 +42,7 @@
  */
 
 #include <stddef.h>
+#include <rte_memory.h>
 
 #ifdef __cplusplus
 extern "C" {
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 1375262325-5348-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

A message that is not in the archive (sent off-list or not yet received): [email protected]

#18 lore raw

Re: [PATCH] mem: fix include in rte_malloc

31/07/2013 13:36, didier.pallard :

Quoted 11 lines · Thomas Monjalon
Quoted 8 lines

The function rte_malloc_virt2phy has a dependency on rte_memory.h:
phys_addr_t must be defined.

The dependency handling for apps was wrong in the commit 8c86825cbf. Let's revert this part.

pushed

Thanks to Jia Sui for reporting.

Side note: please do not reply to an old email when creating new thread. (see http://dpdk.org/ml/archives/dev/2013-July/thread.html)

Signature · 1 line
Thomas