Re: [PATCH net-next 10/11] tap: accept an array of XDP buffs through sendmsg()

2018-09-06 Thread Jason Wang
On 2018年09月07日 02:00, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:25PM +0800, Jason Wang wrote: This patch implement TUN_MSG_PTR msg_control type. This type allows the caller to pass an array of XDP buffs to tuntap through ptr field of the tun_msg_control. Tap will build skb

Re: [PATCH net-next 08/11] tun: switch to new type of msg_control

2018-09-06 Thread Jason Wang
On 2018年09月07日 00:54, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:23PM +0800, Jason Wang wrote: This patch introduces to a new tun/tap specific msg_control: #define TUN_MSG_UBUF 1 #define TUN_MSG_PTR 2 struct tun_msg_ctl { int type; void *ptr; }; This allows us

Re: [PATCH net-next 07/11] tuntap: move XDP flushing out of tun_do_xdp()

2018-09-06 Thread Jason Wang
On 2018年09月07日 01:48, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:22PM +0800, Jason Wang wrote: This will allow adding batch flushing on top. Signed-off-by: Jason Wang --- drivers/net/tun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH net-next 06/11] tuntap: split out XDP logic

2018-09-06 Thread Jason Wang
On 2018年09月07日 01:21, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:21PM +0800, Jason Wang wrote: This patch split out XDP logic into a single function. This make it to be reused by XDP batching path in the following patch. Signed-off-by: Jason Wang --- drivers/net/tun.c | 84

Re: [PATCH net-next 05/11] tuntap: tweak on the path of non-xdp case in tun_build_skb()

2018-09-06 Thread Jason Wang
On 2018年09月07日 01:16, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:20PM +0800, Jason Wang wrote: If we're sure not to go native XDP, there's no need for several things like bh and rcu stuffs. Signed-off-by: Jason Wang True... --- drivers/net/tun.c | 9 ++--- 1 file

Re: [PATCH net-next 04/11] tuntap: simplify error handling in tun_build_skb()

2018-09-06 Thread Jason Wang
On 2018年09月07日 01:14, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:19PM +0800, Jason Wang wrote: There's no need to duplicate page get logic in each action. So this patch tries to get page and calculate the offset before processing XDP actions, and undo them when meet errors (we

Re: [PATCH net-next 02/11] tuntap: switch to use XDP_PACKET_HEADROOM

2018-09-06 Thread Jason Wang
On 2018年09月07日 00:57, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:17PM +0800, Jason Wang wrote: Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin any idea why didn't we do this straight away? Dunno, but git grep told me not all XDP capable driver use this (e.g

Re: [PATCH net-next 01/11] net: sock: introduce SOCK_XDP

2018-09-06 Thread Jason Wang
On 2018年09月07日 00:56, Michael S. Tsirkin wrote: On Thu, Sep 06, 2018 at 12:05:16PM +0800, Jason Wang wrote: This patch introduces a new sock flag - SOCK_XDP. This will be used for notifying the upper layer that XDP program is attached on the lower socket, and requires for extra headroom. TUN

Re: [virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring

2018-09-06 Thread Tiwei Bie
On Mon, Aug 27, 2018 at 05:00:40PM +0300, Michael S. Tsirkin wrote: > Are there still plans to test the performance with vost pmd? > vhost doesn't seem to show a performance gain ... > I tried some performance tests with vhost PMD. In guest, the XDP program will return XDP_DROP directly. And in

Re: [PATCH net-next 10/11] tap: accept an array of XDP buffs through sendmsg()

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:25PM +0800, Jason Wang wrote: > This patch implement TUN_MSG_PTR msg_control type. This type allows > the caller to pass an array of XDP buffs to tuntap through ptr field > of the tun_msg_control. Tap will build skb through those XDP buffers. > > This will avoid lots

Re: [PATCH net-next 09/11] tuntap: accept an array of XDP buffs through sendmsg()

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:24PM +0800, Jason Wang wrote: > This patch implement TUN_MSG_PTR msg_control type. This type allows > the caller to pass an array of XDP buffs to tuntap through ptr field > of the tun_msg_control. If an XDP program is attached, tuntap can run > XDP program directly.

Re: [PATCH net-next 07/11] tuntap: move XDP flushing out of tun_do_xdp()

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:22PM +0800, Jason Wang wrote: > This will allow adding batch flushing on top. > > Signed-off-by: Jason Wang > --- > drivers/net/tun.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index

Re: [PATCH net-next 06/11] tuntap: split out XDP logic

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:21PM +0800, Jason Wang wrote: > This patch split out XDP logic into a single function. This make it to > be reused by XDP batching path in the following patch. > > Signed-off-by: Jason Wang > --- > drivers/net/tun.c | 84

Re: [PATCH net-next 05/11] tuntap: tweak on the path of non-xdp case in tun_build_skb()

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:20PM +0800, Jason Wang wrote: > If we're sure not to go native XDP, there's no need for several things > like bh and rcu stuffs. > > Signed-off-by: Jason Wang True... > --- > drivers/net/tun.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >

Re: [PATCH net-next 04/11] tuntap: simplify error handling in tun_build_skb()

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:19PM +0800, Jason Wang wrote: > There's no need to duplicate page get logic in each action. So this > patch tries to get page and calculate the offset before processing XDP > actions, and undo them when meet errors (we don't care the performance > on errors). This

Re: [PATCH net-next 03/11] tuntap: enable bh early during processing XDP

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:18PM +0800, Jason Wang wrote: > This patch move the bh enabling a little bit earlier, this will be > used for factoring out the core XDP logic of tuntap. > > Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin no reason to disable bh for non-xdp things. > ---

Re: [PATCH net-next 02/11] tuntap: switch to use XDP_PACKET_HEADROOM

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:17PM +0800, Jason Wang wrote: > Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin any idea why didn't we do this straight away? > --- > drivers/net/tun.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/tun.c

Re: [PATCH net-next 01/11] net: sock: introduce SOCK_XDP

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:16PM +0800, Jason Wang wrote: > This patch introduces a new sock flag - SOCK_XDP. This will be used > for notifying the upper layer that XDP program is attached on the > lower socket, and requires for extra headroom. > > TUN will be the first user. > >

Re: [PATCH net-next 08/11] tun: switch to new type of msg_control

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 12:05:23PM +0800, Jason Wang wrote: > This patch introduces to a new tun/tap specific msg_control: > > #define TUN_MSG_UBUF 1 > #define TUN_MSG_PTR 2 > struct tun_msg_ctl { >int type; >void *ptr; > }; > > This allows us to pass different kinds of

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

Re: [PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members [ver #2]

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 10:18:42AM +0100, David Howells wrote: > The virtio_net_ctrl_hdr struct uses a C++ keyword as structural members. Fix > this by inserting an anonymous union that provides an alternative name and > then hide the reserved name in C++. > > Signed-off-by: David Howells > cc:

Re: [PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members

2018-09-06 Thread Michael S. Tsirkin
On Thu, Sep 06, 2018 at 08:09:19AM +0100, David Howells wrote: > Michael S. Tsirkin wrote: > > > As long as you do not intend to use any classes, how about > > simply adding > > > > -Dclass=_class > > > > to your command line? > > That kind of misses the point;-). It's not reasonable to

Re: [PATCH v36 0/5] Virtio-balloon: support free page reporting

2018-09-06 Thread Wei Wang
On 07/23/2018 10:36 PM, Dr. David Alan Gilbert wrote: * Michael S. Tsirkin (m...@redhat.com) wrote: On Fri, Jul 20, 2018 at 04:33:00PM +0800, Wei Wang wrote: This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT,

[RFC] UAPI: Check headers by compiling all together as C++

2018-09-06 Thread David Howells
Here's a set of patches that inserts a step into the build process to make sure that the UAPI headers can all be built together with C++ (if the compiler being used supports C++). Note that it's based on a commit from the sound tree to fix usage of u32 and co.. Most of the patches perform

[PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members [ver #2]

2018-09-06 Thread David Howells
The virtio_net_ctrl_hdr struct uses a C++ keyword as structural members. Fix this by inserting an anonymous union that provides an alternative name and then hide the reserved name in C++. Signed-off-by: David Howells cc: "Michael S. Tsirkin" cc: Jason Wang cc:

Re: [PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown

2018-09-06 Thread Gerd Hoffmann
Hi, > > You can probably get rid of this one if you're refactoring even more. The > > generic fb_probe implementation (already merged) plus gem-shmem support > > for it (still in flight) from Noralf should be able to pull that off. That > > gives you the fb_mmap implementation, but with 100%

Re: [PATCH 03/11] UAPI: virtio_net: Fix use of C++ keywords as structural members

2018-09-06 Thread David Howells
Michael S. Tsirkin wrote: > As long as you do not intend to use any classes, how about > simply adding > > -Dclass=_class > > to your command line? That kind of misses the point;-). It's not reasonable to expect all userspace C++ users to do this. David