[ovs-dev] 答复: [PATCH v7] Use TPACKET_V3 to accelerate veth for userspace datapath

William Tu u9012063 at gmail.com
Wed Mar 18 21:41:30 UTC 2020

On Wed, Mar 18, 2020 at 6:22 AM Yi Yang (杨燚)-云服务集团 <yangyi01 at inspur.com> wrote:
> Ilya, raw socket for the interface type of which is "system" has been set to
> non-block mode, can you explain which syscall will lead to sleep? Yes, pmd
> thread will consume CPU resource even if it has nothing to do, but all the
> type=dpdk ports are handled by pmd thread, here we just let system
> interfaces look like a DPDK interface. I didn't see any problem in my test,
> it will be better if you can tell me what will result in a problem and how I
> can reproduce it. By the way, type=tap/internal interfaces are still be
> handled by ovs-vswitchd thread.
> In addition, only one line change is there, ".is_pmd = true,", ".is_pmd =
> false," will keep it in ovs-vswitchd if there is any other concern. We can
> change non-thread-safe parts to support pmd.

Hi Yiyang an Ilya,

How about making tpacket_v3 a new netdev class with type="tpacket"?
Like my original patch:

Users have to create it specifically by doing type="tpacket", ex:
  $ ovs-vsctl add-port br0 enp2s0 -- set interface enp2s0 type="tpacket"
And we can set is_pmd=true for this particular type.


More information about the dev mailing list