From: Maksim Krasnyanskiy <maxk@qualcomm.com>
To: linux-kernel@vger.kernel.org
Cc: davem@redhat.com, andrea@suse.de, torvalds@transmeta.com,
kuznet@ms2.inr.ac.ru
Subject: [PATCH] netif_rx from non interrupt context
Date: Mon, 30 Jul 2001 12:24:08 -0700 [thread overview]
Message-ID: <4.3.1.0.20010730121828.05eaf310@mail1> (raw)
Hi Folks,
Generic function for the net drivers that call netif_rx from non interrupt context.
And TUN/TAP driver patch.
--- linux/include/linux/netdevice.h.old Mon Jul 30 11:37:27 2001
+++ linux/include/linux/netdevice.h Mon Jul 30 11:48:32 2001
@@ -563,6 +563,19 @@
extern int netdev_nit;
+
+/*
+ * netif_rx_ni - post buffer to the network code from _non interrupt_ context.
+ * see net/core/dev.c for netif_rx description.
+ */
+static inline int netif_rx_ni(struct sk_buff *skb)
+{
+ int err = netif_rx(skb);
+ if (softirq_pending(smp_processor_id()))
+ do_softirq();
+ return err;
+}
+
--- linux/drivers/net/tun.c.old Mon Jun 11 19:15:27 2001
+++ linux/drivers/net/tun.c Mon Jul 30 11:49:01 2001
@@ -218,7 +218,7 @@
if (tun->flags & TUN_NOCHECKSUM)
skb->ip_summed = CHECKSUM_UNNECESSARY;
- netif_rx(skb);
+ netif_rx_ni(skb);
tun->stats.rx_packets++;
tun->stats.rx_bytes += len;
Thanks
Max
Maksim Krasnyanskiy
Senior Kernel Engineer
Qualcomm Incorporated
maxk@qualcomm.com
http://bluez.sf.net
http://vtun.sf.net
next reply other threads:[~2001-07-30 19:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-30 19:24 Maksim Krasnyanskiy [this message]
2001-07-31 1:53 ` David S. Miller
2001-07-31 17:11 ` Maksim Krasnyanskiy
2001-07-31 18:13 ` kuznet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4.3.1.0.20010730121828.05eaf310@mail1 \
--to=maxk@qualcomm.com \
--cc=andrea@suse.de \
--cc=davem@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®