* Re: [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE
@ 2012-08-09 19:44 Stephen Hemminger
2012-08-10 2:38 ` Cong Wang
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2012-08-09 19:44 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, David Miller, Stephen Hemminger
If you are going to add an explanation, then I would prefer a more complete one. Something like:
"Since more than one interface can be attached to a bridge, there still maybe an alternate path for netconsole to use; therefore there is no reason for a NETDEV_RELEASE event."
But my opinion it really isn't necessary to document what isn't done in the code, only what is done. The purpose of comments is to explain the wider impacts of the code.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE
2012-08-09 19:44 [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE Stephen Hemminger
@ 2012-08-10 2:38 ` Cong Wang
0 siblings, 0 replies; 4+ messages in thread
From: Cong Wang @ 2012-08-10 2:38 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, David Miller, Stephen Hemminger
On Thu, 2012-08-09 at 09:44 -1000, Stephen Hemminger wrote:
> If you are going to add an explanation, then I would prefer a more complete one. Something like:
> "Since more than one interface can be attached to a bridge, there still maybe an alternate path for netconsole to use; therefore there is no reason for a NETDEV_RELEASE event."
Yeah, this is better.
>
> But my opinion it really isn't necessary to document what isn't done in the code, only what is done. The purpose of comments is to explain the wider impacts of the code.
The reason why I add it is to remind people like me who forgot the
reason behind. ;)
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 00/14] some netpoll and netconsole fixes
@ 2012-08-10 7:10 Cong Wang
2012-08-10 7:10 ` [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE Cong Wang
0 siblings, 1 reply; 4+ messages in thread
From: Cong Wang @ 2012-08-10 7:10 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Cong Wang
V4:
* rebase against net tree
* fix a compile error in patch 9
* update patch 7 as Stephen suggested
V3:
* add more patches
* update patch 7 as David suggested
V2:
* update patch 1/8 as Eric suggested
* drop the bridge patch, add comments instead
* add patch 8/8
This patchset fixes serval problems in netconsole and netpoll.
I ran this patch in my KVM guest with some netpoll test cases,
even covered with some corner cases, everything worked as expected.
BTW, my kernel config enables the following validatation options:
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_PROVE_LOCKING=y
CONFIG_PROVE_RCU=y
CONFIG_LOCKDEP=y
CONFIG_RCU_CPU_STALL_TIMEOUT=60
CONFIG_LOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
--------
netpoll: use GFP_ATOMIC in slave_enable_netpoll() and
netpoll: make __netpoll_cleanup non-block
netconsole: do not release spin_lock when calling
netpoll: take rcu_read_lock_bh() in netpoll_rx()
netpoll: use netpoll_rx_on() in netpoll_rx()
netpoll: take rcu_read_lock_bh() in
bridge: add some comments for NETDEV_RELEASE
bridge: use list_for_each_entry() in netpoll functions
netpoll: check netpoll tx status on the right device
netpoll: convert several functions to bool
vlan: clean up vlan_dev_hard_start_xmit()
netpoll: handle vlan tags in netpoll tx and rx path
netpoll: re-enable irq in poll_napi()
netconsole.txt: revision of examples for the receiver
Documentation/networking/netconsole.txt | 19 +++++-
drivers/net/bonding/bond_main.c | 12 ++--
drivers/net/netconsole.c | 5 --
drivers/net/team/team.c | 16 +++--
include/linux/if_team.h | 30 ++++----
include/linux/netdevice.h | 3 +-
include/linux/netpoll.h | 42 +++++++-----
net/8021q/vlan_dev.c | 40 +++++++----
net/bridge/br_device.c | 27 +++-----
net/bridge/br_forward.c | 2 +-
net/bridge/br_if.c | 6 ++-
net/bridge/br_private.h | 4 +-
net/core/netpoll.c | 109 ++++++++++++++++++++++---------
13 files changed, 194 insertions(+), 121 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE
2012-08-10 7:10 [PATCH v4 00/14] some netpoll and netconsole fixes Cong Wang
@ 2012-08-10 7:10 ` Cong Wang
0 siblings, 0 replies; 4+ messages in thread
From: Cong Wang @ 2012-08-10 7:10 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, David Miller, Stephen Hemminger
Add comments on why we don't notify NETDEV_RELEASE.
Cc: David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
net/bridge/br_if.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 171fd6b..1c8fdc3 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -427,6 +427,10 @@ int br_del_if(struct net_bridge *br, struct net_device *dev)
if (!p || p->br != br)
return -EINVAL;
+ /* Since more than one interface can be attached to a bridge,
+ * there still maybe an alternate path for netconsole to use;
+ * therefore there is no reason for a NETDEV_RELEASE event.
+ */
del_nbp(p);
spin_lock_bh(&br->lock);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 0/14] some netpoll and netconsole fixes
@ 2012-08-09 15:00 Cong Wang
2012-08-09 15:00 ` [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE Cong Wang
0 siblings, 1 reply; 4+ messages in thread
From: Cong Wang @ 2012-08-09 15:00 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Cong Wang
V3:
* add more patches
* update patch 7 as David suggested
V2:
* update patch 1/8 as Eric suggested
* drop the bridge patch, add comments instead
* add patch 8/8
This patchset fixes serval problems in netconsole and netpoll.
I ran this patch in my KVM guest with some netpoll test cases,
even covered with some corner cases, everything worked as expected.
BTW, my kernel config enables the following validatation options:
CONFIG_DEBUG_ATOMIC_SLEEP=y
CONFIG_PROVE_LOCKING=y
CONFIG_PROVE_RCU=y
CONFIG_LOCKDEP=y
CONFIG_RCU_CPU_STALL_TIMEOUT=60
CONFIG_LOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
--------
netpoll: use GFP_ATOMIC in slave_enable_netpoll() and
netpoll: make __netpoll_cleanup non-block
netconsole: do not release spin_lock when calling
netpoll: take rcu_read_lock_bh() in netpoll_rx()
netpoll: use netpoll_rx_on() in netpoll_rx()
netpoll: take rcu_read_lock_bh() in
bridge: add some comments for NETDEV_RELEASE
bridge: use list_for_each_entry() in netpoll functions
netpoll: check netpoll tx status on the right device
netpoll: convert several functions to bool
vlan: clean up vlan_dev_hard_start_xmit()
netpoll: handle vlan tags in netpoll tx and rx path
netpoll: re-enable irq in poll_napi()
netconsole.txt: revision of examples for the receiver
Documentation/networking/netconsole.txt | 19 +++++-
drivers/net/bonding/bond_main.c | 12 ++--
drivers/net/netconsole.c | 5 --
drivers/net/team/team.c | 16 +++--
include/linux/if_team.h | 2 +-
include/linux/netdevice.h | 3 +-
include/linux/netpoll.h | 42 +++++++-----
net/8021q/vlan_dev.c | 40 +++++++----
net/bridge/br_device.c | 27 +++-----
net/bridge/br_forward.c | 2 +-
net/bridge/br_if.c | 5 +-
net/bridge/br_private.h | 4 +-
net/core/netpoll.c | 109 ++++++++++++++++++++++---------
13 files changed, 179 insertions(+), 107 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE
2012-08-09 15:00 [PATCH v3 0/14] some netpoll and netconsole fixes Cong Wang
@ 2012-08-09 15:00 ` Cong Wang
0 siblings, 0 replies; 4+ messages in thread
From: Cong Wang @ 2012-08-09 15:00 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, David Miller, Stephen Hemminger
Add comments on why we don't notify NETDEV_RELEASE.
Cc: David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
net/bridge/br_if.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 171fd6b..bf47d4f 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -427,6 +427,9 @@ int br_del_if(struct net_bridge *br, struct net_device *dev)
if (!p || p->br != br)
return -EINVAL;
+ /* We don't notify NETDEV_RELEASE event, as this will
+ * stop netconsole on the bridge.
+ */
del_nbp(p);
spin_lock_bh(&br->lock);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-10 7:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-09 19:44 [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE Stephen Hemminger
2012-08-10 2:38 ` Cong Wang
-- strict thread matches above, loose matches on Subject: below --
2012-08-10 7:10 [PATCH v4 00/14] some netpoll and netconsole fixes Cong Wang
2012-08-10 7:10 ` [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE Cong Wang
2012-08-09 15:00 [PATCH v3 0/14] some netpoll and netconsole fixes Cong Wang
2012-08-09 15:00 ` [PATCH 07/14] bridge: add some comments for NETDEV_RELEASE Cong Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.