Re: [PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-09-09 Thread Jason Wang
On 2018年09月08日 00:13, Michael S. Tsirkin wrote: On Fri, Sep 07, 2018 at 03:41:52PM +0800, Jason Wang wrote: @@ -556,10 +667,14 @@ static void handle_tx_copy(struct vhost_net *net, struct socket *sock) size_t len, total_len = 0; int err; int sent_pkts = 0; + bool

Re: [PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-09-07 Thread Michael S. Tsirkin
On Fri, Sep 07, 2018 at 03:41:52PM +0800, Jason Wang wrote: > > > @@ -556,10 +667,14 @@ static void handle_tx_copy(struct vhost_net *net, > > > struct socket *sock) > > > size_t len, total_len = 0; > > > int err; > > > int sent_pkts = 0; > > > + bool bulking =

Re: [PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-09-07 Thread Jason Wang
On 2018年09月07日 00:46, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:26PM +0800, Jason Wang wrote: This patch implements XDP batching for vhost_net. The idea is first to try to do userspace copy and build XDP buff directly in vhost. Instead of submitting the packet immediately,

Re: [PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:26PM +0800, Jason Wang wrote: > This patch implements XDP batching for vhost_net. The idea is first to > try to do userspace copy and build XDP buff directly in vhost. Instead > of submitting the packet immediately, vhost_net will batch them in an > array and submit

[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets

2018-09-05 Thread Jason Wang
This patch implements XDP batching for vhost_net. The idea is first to try to do userspace copy and build XDP buff directly in vhost. Instead of submitting the packet immediately, vhost_net will batch them in an array and submit every 64 (VHOST_NET_BATCH) packets to the under layer sockets through