diff mbox

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

Message ID 1329217821.2336.3.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Feb. 14, 2012, 11:10 a.m. UTC
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 ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Neil Horman Feb. 14, 2012, 1:27 p.m. UTC | #1
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>

> 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;
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 14, 2012, 7:42 p.m. UTC | #2
From: Eric Dumazet <eric.dumazet@gmail.com>
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;