Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1367824

[PATCH net-next 2/6] tuntap: socket rx busy polling support

From Jason Wang <jasowang@redhat.com>
Newsgroups linux.kernel
Subject [PATCH net-next 2/6] tuntap: socket rx busy polling support
Date 2016-03-31 08:00 +0200
Message-ID <riDOa-iF-9@gated-at.bofh.it> (permalink)
References <riDOa-iF-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/tun.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index afdf950..950faf5 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -69,6 +69,7 @@
 #include <net/netns/generic.h>
 #include <net/rtnetlink.h>
 #include <net/sock.h>
+#include <net/busy_poll.h>
 #include <linux/seq_file.h>
 #include <linux/uio.h>
 
@@ -871,6 +872,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	nf_reset(skb);
 
+	sk_mark_napi_id(tfile->socket.sk, skb);
 	/* Enqueue packet */
 	skb_queue_tail(&tfile->socket.sk->sk_receive_queue, skb);
 
@@ -878,7 +880,6 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (tfile->flags & TUN_FASYNC)
 		kill_fasync(&tfile->fasync, SIGIO, POLL_IN);
 	tfile->socket.sk->sk_data_ready(tfile->socket.sk);
-
 	rcu_read_unlock();
 	return NETDEV_TX_OK;
 
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 0/6] net device rx busy polling support in vhost_net Jason Wang <jasowang@redhat.com> - 2016-03-31 08:00 +0200
  [PATCH net-next 2/6] tuntap: socket rx busy polling support Jason Wang <jasowang@redhat.com> - 2016-03-31 08:00 +0200
  [PATCH net-next 6/6] vhost_net: net device rx busy polling support Jason Wang <jasowang@redhat.com> - 2016-03-31 08:00 +0200
  [PATCH net-next 4/6] net: core: factor out core busy polling logic to sk_busy_loop_once() Jason Wang <jasowang@redhat.com> - 2016-03-31 08:00 +0200
  [PATCH net-next 5/6] net: export napi_by_id() Jason Wang <jasowang@redhat.com> - 2016-03-31 08:00 +0200

csiph-web