All of lore.kernel.org
 help / color / mirror / Atom feed
* Sending and receiving on the same port at the same time, from different threads
@ 2016-01-15 16:54 Zoltan Kiss
  2016-01-15 17:33 ` Matthew Hall
  0 siblings, 1 reply; 3+ messages in thread
From: Zoltan Kiss @ 2016-01-15 16:54 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Sending and receiving on the same port at the same time, from different threads
  2016-01-15 16:54 Sending and receiving on the same port at the same time, from different threads Zoltan Kiss
@ 2016-01-15 17:33 ` Matthew Hall
  2016-01-15 18:15   ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Hall @ 2016-01-15 17:33 UTC (permalink / raw)
  To: Zoltan Kiss; +Cc: dev

On Fri, Jan 15, 2016 at 04:54:11PM +0000, Zoltan Kiss wrote:
> Can you call rte_eth_tx_burst() and rte_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.

> Have anyone seen a device where it wasn't true?

Not specifically. But I didn't go looking for one either.

Matthew.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Sending and receiving on the same port at the same time, from different threads
  2016-01-15 17:33 ` Matthew Hall
@ 2016-01-15 18:15   ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2016-01-15 18:15 UTC (permalink / raw)
  To: Matthew Hall; +Cc: dev

On Fri, 15 Jan 2016 12:33:14 -0500
Matthew Hall <mhall@mhcomputing.net> wrote:

> On Fri, Jan 15, 2016 at 04:54:11PM +0000, Zoltan Kiss wrote:
> > Can you call rte_eth_tx_burst() and rte_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.
> 
> > 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-15 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-15 16:54 Sending and receiving on the same port at the same time, from different threads Zoltan Kiss
2016-01-15 17:33 ` Matthew Hall
2016-01-15 18:15   ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.