[RFC] netpoll: netpoll_poll_dev() should access dev->flags

Subsystems: networking [general], the rest

5 messages, 3 authors, 2012-02-14 · open the first message on its own page

[RFC] netpoll: netpoll_poll_dev() should access dev->flags

From: Eric Dumazet <hidden>
Date: 2012-02-14 11:10:25

commit 5a698af53f (bond: service netpoll arp queue on master device)
use a dubious test : if (dev->priv_flags & IFF_SLAVE)

It seems to me IFF_SLAVE is present on dev->flags only ?

What am I missing ?
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4ce473e..3d84fb9 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -205,7 +205,7 @@ static void netpoll_poll_dev(struct net_device *dev)
 
 	poll_napi(dev);
 
-	if (dev->priv_flags & IFF_SLAVE) {
+	if (dev->flags & IFF_SLAVE) {
 		if (dev->npinfo) {
 			struct net_device *bond_dev = dev->master;
 			struct sk_buff *skb;

Re: [RFC] netpoll: netpoll_poll_dev() should access dev->flags

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2012-02-14 13:28:14

On Tue, Feb 14, 2012 at 12:10:21PM +0100, Eric Dumazet wrote:
commit 5a698af53f (bond: service netpoll arp queue on master device)
use a dubious test : if (dev->priv_flags & IFF_SLAVE)

It seems to me IFF_SLAVE is present on dev->flags only ?

What am I missing ?
I want to say there was a reason for checking priv_flags, but if there was, it
escapes me now.  Either way, ->flags is definately what we want now.  

Acked-by: Neil Horman <nhorman@tuxdriver.com>
quoted hunk
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 4ce473e..3d84fb9 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -205,7 +205,7 @@ static void netpoll_poll_dev(struct net_device *dev)
 
 	poll_napi(dev);
 
-	if (dev->priv_flags & IFF_SLAVE) {
+	if (dev->flags & IFF_SLAVE) {
 		if (dev->npinfo) {
 			struct net_device *bond_dev = dev->master;
 			struct sk_buff *skb;

Re: [RFC] netpoll: netpoll_poll_dev() should access dev->flags

From: David Miller <davem@davemloft.net>
Date: 2012-02-14 19:44:12

From: Eric Dumazet <redacted>
Date: Tue, 14 Feb 2012 12:10:21 +0100
commit 5a698af53f (bond: service netpoll arp queue on master device)
use a dubious test : if (dev->priv_flags & IFF_SLAVE)

It seems to me IFF_SLAVE is present on dev->flags only ?

What am I missing ?
Like Neil, this looks correct to me, please submit this formally.

Thanks.

[PATCH] netpoll: netpoll_poll_dev() should access dev->flags

From: Eric Dumazet <hidden>
Date: 2012-02-14 20:12:05

commit 5a698af53f (bond: service netpoll arp queue on master device)
tested IFF_SLAVE flag against dev->priv_flags instead of dev->flags 

Signed-off-by: Eric Dumazet <redacted>
Cc: WANG Cong <redacted>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 net/core/netpoll.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 556b082..ddefc51 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -194,7 +194,7 @@ static void netpoll_poll_dev(struct net_device *dev)
 
 	poll_napi(dev);
 
-	if (dev->priv_flags & IFF_SLAVE) {
+	if (dev->flags & IFF_SLAVE) {
 		if (dev->npinfo) {
 			struct net_device *bond_dev = dev->master;
 			struct sk_buff *skb;

Re: [PATCH] netpoll: netpoll_poll_dev() should access dev->flags

From: David Miller <davem@davemloft.net>
Date: 2012-02-14 20:26:12

From: Eric Dumazet <redacted>
Date: Tue, 14 Feb 2012 21:11:59 +0100
commit 5a698af53f (bond: service netpoll arp queue on master device)
tested IFF_SLAVE flag against dev->priv_flags instead of dev->flags 

Signed-off-by: Eric Dumazet <redacted>
Cc: WANG Cong <redacted>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Applied and queued up for -stable, thanks Eric.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help