Re: Moving frags and SKBTX_DEV_ZEROCOPY skbs

2014-05-15 Thread Zoltan Kiss
On 14/05/14 20:41, Zoltan Kiss wrote: But here is the thing: deliver_skb calls orphan_frags for every packet delivered to the local stack, so we are safe IF these functions are called before the IP stack. So we are safe now, but things can go wrong, if: - such a frag-mangling function is called

Moving frags and SKBTX_DEV_ZEROCOPY skbs

2014-05-14 Thread Zoltan Kiss
Hi, Recently I've investigated issues around SKBTX_DEV_ZEROCOPY skbs where the frags list were modified. I came across this function skb_shift(), which moves frags between skbs. And there are a lot more of such kind, skb_split or skb_try_coalesce, for example. It could be a dangerous thing if

Re: Moving frags and SKBTX_DEV_ZEROCOPY skbs

2014-05-14 Thread Zoltan Kiss
On 14/05/14 15:23, Eric Dumazet wrote: On Wed, 2014-05-14 at 14:40 +0100, Zoltan Kiss wrote: Hi, Recently I've investigated issues around SKBTX_DEV_ZEROCOPY skbs where the frags list were modified. I came across this function skb_shift(), which moves frags between skbs. And there are a lot

Re: [PATCH 3.13] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-04-23 Thread Zoltan Kiss
On 22/04/14 20:18, Ben Hutchings wrote: From: Zoltan Kiss zoltan.k...@citrix.com commit 36d5fe6a000790f56039afe26834265db0a3ad4c upstream. skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care

Re: [PATCH v5] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-04-22 Thread Zoltan Kiss
On 22/04/14 16:38, Ben Hutchings wrote: On Mon, 2014-04-21 at 12:26 +0100, Luis Henriques wrote: Hi David, On Thu, Mar 27, 2014 at 03:29:56PM -0400, David Miller wrote: From: Zoltan Kiss zoltan.k...@citrix.com Date: Wed, 26 Mar 2014 22:37:45 + skb_zerocopy can copy elements of the frags

[PATCH v5] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-26 Thread Zoltan Kiss
the creator of the skb. Signed-off-by: Zoltan Kiss zoltan.k...@citrix.com --- v2: orphan the frags right before touching the frags v3: - orphan 'from' instead of 'to' - call skb_tx_error() in the callers if something went wrong v4: correctly use error path in queue_userspace_packet v5: remove const

Re: [PATCH v4] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-26 Thread Zoltan Kiss
On 26/03/14 20:12, David Miller wrote: From: David Miller da...@davemloft.net Date: Wed, 26 Mar 2014 15:59:58 -0400 (EDT) From: Zoltan Kiss zoltan.k...@citrix.com Date: Fri, 21 Mar 2014 10:31:34 + skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them

[PATCH v4] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-21 Thread Zoltan Kiss
the creator of the skb. Signed-off-by: Zoltan Kiss zoltan.k...@citrix.com --- v2: orphan the frags right before touching the frags v3: - orphan 'from' instead of 'to' - call skb_tx_error() in the callers if something went wrong v4: correctly use error path in queue_userspace_packet diff --git

Re: [PATCH v3] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-21 Thread Zoltan Kiss
On 20/03/14 22:22, Thomas Graf wrote: On 03/20/2014 05:02 PM, Zoltan Kiss wrote: --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -464,7 +464,9 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, } nla-nla_len = nla_attr_size(skb-len

Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Zoltan Kiss
On 20/03/14 12:33, Thomas Graf wrote: On 03/20/2014 01:16 PM, Thomas Graf wrote: On 03/19/2014 10:07 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well

[PATCH v3] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-20 Thread Zoltan Kiss
the creator of the skb. Signed-off-by: Zoltan Kiss zoltan.k...@citrix.com --- v2: orphan the frags right before touching the frags v3: - orphan 'from' instead of 'to' - call skb_tx_error() in the callers if something went wrong diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index

[PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss zoltan.k...@citrix.com --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03db95a

Re: [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
On 19/03/14 20:24, David Miller wrote: From: Zoltan Kiss zoltan.k...@citrix.com Date: Tue, 18 Mar 2014 21:17:35 + skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed

[PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss zoltan.k...@citrix.com --- v2: orphan the frags right before touching the frags diff --git a/include

Re: [PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-19 Thread Zoltan Kiss
On 19/03/14 20:47, Thomas Graf wrote: On 03/19/2014 09:38 PM, Zoltan Kiss wrote: skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss zoltan.k

[PATCH] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors

2014-03-18 Thread Zoltan Kiss
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well. Signed-off-by: Zoltan Kiss zoltan.k...@citrix.com --- net/openvswitch/datapath.c |6 ++ 1 file changed, 6 insertions

Re: [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall

2014-03-07 Thread Zoltan Kiss
On 07/03/14 04:46, Pravin Shelar wrote: On Thu, Mar 6, 2014 at 9:09 AM, Zoltan Kiss zoltan.k...@citrix.com wrote: Do you have any feedback on this? I'm also adding KVM list as they might be interested in this. Zoli On 28/02/14 19:16, Zoltan Kiss wrote: The kernel datapath now switched

Re: [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall

2014-03-06 Thread Zoltan Kiss
Do you have any feedback on this? I'm also adding KVM list as they might be interested in this. Zoli On 28/02/14 19:16, Zoltan Kiss wrote: The kernel datapath now switched to zerocopy Netlink messages, but that also means that the pages on frags array are sent straight to userspace. If those

Re: [PATCH] openvswitch: orphan frags on local receive

2014-02-24 Thread Zoltan Kiss
? Regards, Zoltan Kiss On 24/02/14 13:15, Qin Chuanyu wrote: with vhost tx zero_copy, guest nic might get hang when host reserving skb in socket queue delivered by guest, the case has been solved in tun, it also been needed by openvswitch. This could easily happened when a LAST_ACK state tcp

Re: [Xen-devel] [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge

2014-02-21 Thread Zoltan Kiss
On 20/02/14 20:24, Luis R. Rodriguez wrote: On Thu, Feb 20, 2014 at 9:19 AM, Stephen Hemminger step...@networkplumber.org wrote: On Wed, 19 Feb 2014 09:59:33 -0800 Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Wed, Feb 19, 2014 at 9:08 AM, Stephen Hemminger step...@networkplumber.org

Re: [RFC v2 2/4] net: enables interface option to skip IP

2014-02-21 Thread Zoltan Kiss
On 20/02/14 20:39, Luis R. Rodriguez wrote: On Wed, Feb 19, 2014 at 11:13 AM, Zoltan Kiss zoltan.k...@citrix.com wrote: On 19/02/14 17:20, Luis R. Rodriguez wrote: On 19/02/14 17:20, Luis R. Rodriguez also wrote: Zoltan has noted though some use cases of IPv4 or IPv6 addresses on backends

Re: [Xen-devel] [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge

2014-02-21 Thread Zoltan Kiss
On 20/02/14 20:01, Luis R. Rodriguez wrote: On Thu, Feb 20, 2014 at 5:19 AM, Zoltan Kiss zoltan.k...@citrix.com wrote: How about this: netback sets the root_block flag and a random MAC by default. So the default behaviour won't change, DAD will be happy, and userspace don't have to do anything

Re: [Xen-devel] [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge

2014-02-20 Thread Zoltan Kiss
On 19/02/14 17:02, Luis R. Rodriguez wrote: On Wed, Feb 19, 2014 at 6:35 AM, Zoltan Kiss zoltan.k...@citrix.com wrote: On 19/02/14 09:52, Ian Campbell wrote: Can't we arrange things in the Xen hotplug scripts such that if the root_block stuff isn't available/doesn't work we fallback

Re: [Xen-devel] [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge

2014-02-20 Thread Zoltan Kiss
On 19/02/14 16:45, Luis R. Rodriguez wrote: On Mon, Feb 17, 2014 at 9:52 AM, Zoltan Kiss zoltan.k...@citrix.com wrote: On 15/02/14 02:59, Luis R. Rodriguez wrote: From: Luis R. Rodriguez mcg...@suse.com It doesn't make sense for some interfaces to become a root bridge at any point in time

Re: [Xen-devel] [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge

2014-02-19 Thread Zoltan Kiss
On 19/02/14 09:52, Ian Campbell wrote: On Tue, 2014-02-18 at 13:02 -0800, Luis R. Rodriguez wrote: On Sun, Feb 16, 2014 at 10:57 AM, Stephen Hemminger step...@networkplumber.org wrote: On Fri, 14 Feb 2014 18:59:37 -0800 Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez

Re: [RFC v2 2/4] net: enables interface option to skip IP

2014-02-19 Thread Zoltan Kiss
On 19/02/14 17:20, Luis R. Rodriguez wrote: On Wed, Feb 19, 2014 at 8:45 AM, Dan Williams d...@redhat.com wrote: On Tue, 2014-02-18 at 13:19 -0800, Luis R. Rodriguez wrote: On Mon, Feb 17, 2014 at 12:23 PM, Dan Williams d...@redhat.com wrote: On Fri, 2014-02-14 at 18:59 -0800, Luis R.

Re: [Xen-devel] [RFC v2 4/4] xen-netback: skip IPv4 and IPv6 interfaces

2014-02-17 Thread Zoltan Kiss
There is a valid scenario to put IP addresses on the backend VIFs: http://wiki.xen.org/wiki/Xen_Networking#Routing Also, the backend is not necessarily Dom0, you can connect twou guests with backend/frontend pairs. Zoli On 15/02/14 02:59, Luis R. Rodriguez wrote: From: Luis R. Rodriguez

Re: [Xen-devel] [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge

2014-02-17 Thread Zoltan Kiss
On 15/02/14 02:59, Luis R. Rodriguez wrote: From: Luis R. Rodriguez mcg...@suse.com It doesn't make sense for some interfaces to become a root bridge at any point in time. One example is virtual backend interfaces which rely on other entities on the bridge for actual physical connectivity. They