netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall
@ 2014-02-28 19:16 Zoltan Kiss
  2014-03-06 17:09 ` Zoltan Kiss
       [not found] ` <1393615016-9187-1-git-send-email-zoltan.kiss-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Zoltan Kiss @ 2014-02-28 19:16 UTC (permalink / raw)
  To: Jesse Gross, pshelar-l0M0P4e3n4LQT0dZR+AlfA,
	tgraf-H+wXaHxf7aLQT0dZR+AlfA, dev-yBygre7rU0TnMu66kgdUjQ
  Cc: xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

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
pages came outside the kernel, we have to swap them out with local copies.

Signed-off-by: Zoltan Kiss <zoltan.kiss-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/datapath.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 36f8872..ffb563c 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -464,6 +464,12 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
 	}
 	nla->nla_len = nla_attr_size(skb->len);
 
+	if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC))) {
+		err = -ENOMEM;
+		skb_tx_error(skb);
+		goto out;
+	}
+
 	skb_zerocopy(user_skb, skb, skb->len, hlen);
 
 	/* Pad OVS_PACKET_ATTR_PACKET if linear copy was performed */

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-03-14 22:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 19:16 [PATCH] openvswitch: Orphan frags before sending to userspace via Netlink to avoid guest stall Zoltan Kiss
2014-03-06 17:09 ` Zoltan Kiss
2014-03-07  4:46   ` Pravin Shelar
2014-03-07 12:29     ` Zoltan Kiss
     [not found]       ` <5319BBAE.7030109-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-07 17:38         ` Pravin Shelar
     [not found]     ` <CALnjE+rWc=n_F+1jSLQtPrgKSvvxONEkkYxWEHon2_KVNG9z3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 15:58       ` Thomas Graf
     [not found]         ` <5319EC8E.2010606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 17:19           ` Pravin Shelar
     [not found]             ` <CALnjE+oDM=ga_C6T_-9i2UNwv=K4g-+y-LJA04nh+=WmoeuNXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 18:05               ` Thomas Graf
     [not found]                 ` <531A0A5B.2000104-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 18:43                   ` Pravin Shelar
     [not found] ` <1393615016-9187-1-git-send-email-zoltan.kiss-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-07 16:23   ` Thomas Graf
     [not found]     ` <5319F272.1070101-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 17:28       ` Pravin Shelar
     [not found]         ` <CALnjE+q=fejHPsjVj9+jnypJCUHfCDFc553U48WR48Tjcf3FZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-07 17:59           ` Thomas Graf
     [not found]             ` <531A0911.4040304-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 18:41               ` Pravin Shelar
2014-03-11 19:41               ` Zoltan Kiss
     [not found]                 ` <531F66D0.1050000-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-14 22:26                   ` Zoltan Kiss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).