From: Stephen Hemminger <shemminger@osdl.org>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-net@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.5.66] sychronize_net patch (1/2)
Date: 01 Apr 2003 11:20:53 -0800 [thread overview]
Message-ID: <1049224852.2197.38.camel@dell_ss3.pdx.osdl.net> (raw)
In-Reply-To: <20030401.095153.92005641.davem@redhat.com>
On Tue, 2003-04-01 at 09:51, David S. Miller wrote:
> Please fix this stuff.
Here is an update with the correct style.
diff -urN -X dontdiff linux-2.5/include/linux/netdevice.h linux-2.5-netsync/include/linux/netdevice.h
--- linux-2.5/include/linux/netdevice.h 2003-03-31 10:45:58.000000000 -0800
+++ linux-2.5-netsync/include/linux/netdevice.h 2003-03-31 13:42:39.000000000 -0800
@@ -486,6 +486,7 @@
extern int dev_queue_xmit(struct sk_buff *skb);
extern int register_netdevice(struct net_device *dev);
extern int unregister_netdevice(struct net_device *dev);
+extern void synchronize_net(void);
extern int register_netdevice_notifier(struct notifier_block *nb);
extern int unregister_netdevice_notifier(struct notifier_block *nb);
extern int call_netdevice_notifiers(unsigned long val, void *v);
diff -urN -X dontdiff linux-2.5/net/core/dev.c linux-2.5-netsync/net/core/dev.c
--- linux-2.5/net/core/dev.c 2003-03-31 10:46:01.000000000 -0800
+++ linux-2.5-netsync/net/core/dev.c 2003-04-01 10:29:35.000000000 -0800
@@ -2646,6 +2646,13 @@
return 0;
}
+/* Synchronize with packet receive processing. */
+void synchronize_net(void)
+{
+ br_write_lock_bh(BR_NETPROTO_LOCK);
+ br_write_unlock_bh(BR_NETPROTO_LOCK);
+}
+
/**
* unregister_netdevice - remove device from the kernel
* @dev: device
@@ -2688,10 +2695,7 @@
return -ENODEV;
}
- /* Synchronize to net_rx_action. */
- br_write_lock_bh(BR_NETPROTO_LOCK);
- br_write_unlock_bh(BR_NETPROTO_LOCK);
-
+ synchronize_net();
#ifdef CONFIG_NET_FASTROUTE
dev_clear_fastroute(dev);
diff -urN -X dontdiff linux-2.5/net/netsyms.c linux-2.5-netsync/net/netsyms.c
--- linux-2.5/net/netsyms.c 2003-03-31 10:46:00.000000000 -0800
+++ linux-2.5-netsync/net/netsyms.c 2003-03-31 13:42:41.000000000 -0800
@@ -548,6 +548,7 @@
EXPORT_SYMBOL(loopback_dev);
EXPORT_SYMBOL(register_netdevice);
EXPORT_SYMBOL(unregister_netdevice);
+EXPORT_SYMBOL(synchronize_net);
EXPORT_SYMBOL(netdev_state_change);
EXPORT_SYMBOL(dev_new_index);
EXPORT_SYMBOL(dev_get_by_flags);
next prev parent reply other threads:[~2003-04-01 19:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-31 23:12 Stephen Hemminger
2003-04-01 17:51 ` David S. Miller
2003-04-01 19:20 ` Stephen Hemminger [this message]
2003-04-03 12:41 ` David S. Miller
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=1049224852.2197.38.camel@dell_ss3.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
/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®