NIC Stops Transmitting
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
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 Isleep()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
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 Isleep()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
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 correctQuoted 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 Isleep()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.
*/
#defineTX_PTHRESH36 /**< Default values of TX prefetch threshold reg. */ #defineTX_HTHRESH0 /**< Default values of TX host threshold reg. */ #defineTX_WTHRESH0 /**< Default values of TX write-back threshold reg. */static const struct
rte_eth_txconftx_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 */
#defineRTE_TEST_TX_DESC_DEFAULT512 staticuint16_tnb_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
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.
*/
#defineTX_PTHRESH36 /**< Default values of TX prefetch threshold reg. */ #defineTX_HTHRESH0 /**< Default values of TX host threshold reg. */ #defineTX_WTHRESH0 /**< Default values of TX write-back threshold reg. */static const struct
rte_eth_txconftx_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 */
#defineRTE_TEST_TX_DESC_DEFAULT512 staticuint16_tnb_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
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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -42,6 +42,7 @@*/ #include <stddef.h> +#include <rte_memory.h> #ifdef __cplusplusextern "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
didier.pallard
Acked-byRe: [PATCH] mem: fix include in rte_malloc
Quoted 8 lines · Thomas Monjalon
The function
rte_malloc_virt2phyhas a dependency onrte_memory.h:phys_addr_tmust be defined.The dependency handling for apps was wrong in the commit
8c86825cbf. Let's revert this part.Reported-by Jia Sui <jia.sui-ELdSlb/[email protected]>Signed-off-by Thomas Monjalon <[email protected]>
A message that is not in the archive (sent off-list or not yet received): [email protected]
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_virt2phyhas a dependency onrte_memory.h:phys_addr_tmust be defined.The dependency handling for apps was wrong in the commit
8c86825cbf. Let's revert this part.Reported-by Jia Sui <jia.sui-ELdSlb/[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Acked-by Didier Pallard <[email protected]>
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