Sending and receiving on the same port at the same time, from different threads
Hi,
I've been asked this question, and I realized I'm not sure about the answer. In other words: can you call rte_eth_tx_burst() and rte_eth_tx_burst() on the same port at the same time from different threads? In theory it seems possible, as you still access different queues (an RX and a TX one), and at least taking a glance at ixgbe vector functions, they don't seem to use common resources while doing RX or TX. But I'm not sure that it's generally true, although I always assumed that it should be true. Have anyone seen a device where it wasn't true?
Regards,
Zoltan
Quoted 2 lines · Zoltan Kiss
Can you call
rte_eth_tx_burst()andrte_eth_tx_burst()on the same port at the same time from different threads?
In general, yes you can. I did this before in an L4-L7 performance tester, so cores could concentrate on RX or TX to keep the speeds high.
Quoted 1 line
Have anyone seen a device where it wasn't true?
Not specifically. But I didn't go looking for one either.
Matthew.
Quoted 4 lines · On Fri, 15 Jan 2016 12:33:14 -0500 Matthew Hall <[email protected]> wrote:
Quoted 2 lines · Zoltan Kiss
Can you call
rte_eth_tx_burst()andrte_eth_tx_burst()on the same port at the same time from different threads?
Quoted 8 lines
In general, yes you can. I did this before in an L4-L7 performance tester, so cores could concentrate on RX or TX to keep the speeds high.
Quoted 1 line
Have anyone seen a device where it wasn't true?
Not specifically. But I didn't go looking for one either.
Matthew.
Same port is OK, as long as each thread uses different queues. The device queues are not thread safe; ie two threads can't be pulling/pushing to the same queue.