[ovs-dev] [PATCH v2] netdev-linux: Replace sendmsg with sendmmsg in netdev_linux_send

Gao Zhenyu sysugaozhenyu at gmail.com
Thu Jul 13 02:49:07 UTC 2017


Thanks for working on patch of implementing sendmmsg.
I will revise my patch base on it.

Thanks
Zhenyu Gao

2017-07-13 0:25 GMT+08:00 Ben Pfaff <blp at ovn.org>:

> On Fri, Jul 07, 2017 at 12:39:51AM +0000, Zhenyu Gao wrote:
> > Sendmmsg can reduce cpu cycles in sending packets to kernel.
> > Replace sendmsg with sendmmsg in function netdev_linux_send to send
> > batch packets if sendmmsg is available.
> >
> > If kernel side doesn't support sendmmsg, will fallback to sendmsg.
> >
> >     netserver
> > |------------|
> > |            |
> > |  container |
> > |----veth----|
> >           |
> >           |        |------------|
> >           |---veth-|   dpdk-ovs |      netperf
> >                    |            |  |--------------|
> >                    |----dpdk----|  | bare-metal   |
> >                          |         |--------------|
> >                          |              |
> >                          |              |
> >                         pnic-----------pnic
> >
> > Netperf was consumed to test the performance:
> >
> > 1)cmd:netperf -H remote-container -t UDP_STREAM -l 60 -- -m 1400
> > result: netserver received 2383.21Mb(sendmsg)/2551.64Mb(sendmmsg)
> >
> > 2)cmd:netperf -H remote-container -t UDP_STREAM -l 60 -- -m 60
> > result: netserver received 109.72Mb(sendmsg)/115.18Mb(sendmmsg)
> >
> > Sendmmsg show about 6% improvement in netperf UDP testing.
> >
> > Signed-off-by: Zhenyu Gao <sysugaozhenyu at gmail.com>
>
> After looking at this, I think that it might be best to simply include a
> general-purpose sendmmsg implementation in the tree.  I sent out a
> patch (although I haven't tested it):
>         https://patchwork.ozlabs.org/patch/787344/
>
> What do you think about implementing your change on top of this?
>


More information about the dev mailing list