* [dpdk-dev] Does the rte_eth_tx_burst() function is multi-threaded safe when sending pkt in same port and same queue ? @ 2014-01-09 4:16 chen_lp 2014-01-09 6:28 ` Stephen Hemminger 0 siblings, 1 reply; 3+ messages in thread From: chen_lp @ 2014-01-09 4:16 UTC (permalink / raw) To: dev --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --------------------------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] Does the rte_eth_tx_burst() function is multi-threaded safe when sending pkt in same port and same queue ? 2014-01-09 4:16 [dpdk-dev] Does the rte_eth_tx_burst() function is multi-threaded safe when sending pkt in same port and same queue ? chen_lp @ 2014-01-09 6:28 ` Stephen Hemminger 2014-01-09 6:50 ` 金健 0 siblings, 1 reply; 3+ messages in thread From: Stephen Hemminger @ 2014-01-09 6:28 UTC (permalink / raw) To: chen_lp; +Cc: dev The rx and tx functions are safe only if a queue is not shared by multiple threads (or the threads synchronize through some other mechanism). The safest design is to only use a queue on a single core. You will see different architectures in the examples. Some use one queue per core, and others use separate receive and transmit cores. On Wed, Jan 8, 2014 at 8:16 PM, chen_lp <chen_lp@neusoft.com> wrote: > > --------------------------------------------------------------------------------------------------- > Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) > is intended only for the use of the intended recipient and may be confidential and/or privileged of > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is > not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying > is strictly prohibited, and may be unlawful.If you have received this communication in error,please > immediately notify the sender by return e-mail, and delete the original message and all copies from > your system. Thank you. > --------------------------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] Does the rte_eth_tx_burst() function is multi-threaded safe when sending pkt in same port and same queue ? 2014-01-09 6:28 ` Stephen Hemminger @ 2014-01-09 6:50 ` 金健 0 siblings, 0 replies; 3+ messages in thread From: 金健 @ 2014-01-09 6:50 UTC (permalink / raw) To: Stephen Hemminger, chen_lp; +Cc: dev But when I read the code of l2fwd (v1.5.1 examples), I found that two cores share only one queue of a port. And it doesn't use any lock or other mechanism to ensure the safety. How is it OK? ----- Original Message ----- From: "Stephen Hemminger" <stephen@networkplumber.org> To: "chen_lp" <chen_lp@neusoft.com> Cc: <dev@dpdk.org> Sent: Thursday, January 09, 2014 2:28 PM Subject: Re: [dpdk-dev] Does the rte_eth_tx_burst() function is multi-threaded safe when sending pkt in same port and same queue ? > The rx and tx functions are safe only if a queue is not shared by > multiple threads (or the threads synchronize through some other > mechanism). The safest design is to only use a queue on a single core. > You will see different architectures in the examples. Some use one > queue per core, and others use separate receive and transmit cores. > > On Wed, Jan 8, 2014 at 8:16 PM, chen_lp <chen_lp@neusoft.com> wrote: >> >> --------------------------------------------------------------------------------------------------- >> Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) >> is intended only for the use of the intended recipient and may be confidential and/or privileged of >> Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is >> not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying >> is strictly prohibited, and may be unlawful.If you have received this communication in error,please >> immediately notify the sender by return e-mail, and delete the original message and all copies from >> your system. Thank you. >> --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --------------------------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-09 6:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-01-09 4:16 [dpdk-dev] Does the rte_eth_tx_burst() function is multi-threaded safe when sending pkt in same port and same queue ? chen_lp 2014-01-09 6:28 ` Stephen Hemminger 2014-01-09 6:50 ` 金健
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).