diff mbox

net: don't clear IFF_XMIT_DST_RELEASE in ether_setup

Message ID 1316005502-7341-1-git-send-email-nhorman@tuxdriver.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Neil Horman Sept. 14, 2011, 1:05 p.m. UTC
d88733150 introduced the IFF_SKB_TX_SHARING flag, which I unilaterally set in
ether_setup.  In doing this I didn't realize that other flags (such as
IFF_XMIT_DST_RELEASE) might be set prior to calling the ether_setup routine.
This patch changes ether_setup to or in SKB_TX_SHARING so as not to
inadvertently clear other existing flags.  Thanks to Pekka Riikonen for pointing
out my error

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Pekka Riikonen <priikone@iki.fi>
CC: "David S. Miller" <davem@davemloft.net>
---
 net/ethernet/eth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Eric Dumazet Sept. 14, 2011, 1:28 p.m. UTC | #1
Le mercredi 14 septembre 2011 à 09:05 -0400, Neil Horman a écrit :
> d88733150 introduced the IFF_SKB_TX_SHARING flag, which I unilaterally set in
> ether_setup.  In doing this I didn't realize that other flags (such as
> IFF_XMIT_DST_RELEASE) might be set prior to calling the ether_setup routine.
> This patch changes ether_setup to or in SKB_TX_SHARING so as not to
> inadvertently clear other existing flags.  Thanks to Pekka Riikonen for pointing
> out my error
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: Pekka Riikonen <priikone@iki.fi>
> CC: "David S. Miller" <davem@davemloft.net>
> ---
>  net/ethernet/eth.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
> index 27997d3..a246836 100644
> --- a/net/ethernet/eth.c
> +++ b/net/ethernet/eth.c
> @@ -340,7 +340,7 @@ void ether_setup(struct net_device *dev)
>  	dev->addr_len		= ETH_ALEN;
>  	dev->tx_queue_len	= 1000;	/* Ethernet wants good queues */
>  	dev->flags		= IFF_BROADCAST|IFF_MULTICAST;
> -	dev->priv_flags		= IFF_TX_SKB_SHARING;
> +	dev->priv_flags		|= IFF_TX_SKB_SHARING;
>  
>  	memset(dev->broadcast, 0xFF, ETH_ALEN);
>  

I CC Pekka Riikonen <priikone@iki.fi>, not sure if he is netdev
subscribded.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>



--
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
Neil Horman Sept. 14, 2011, 2:57 p.m. UTC | #2
On Wed, Sep 14, 2011 at 03:28:41PM +0200, Eric Dumazet wrote:
> Le mercredi 14 septembre 2011 à 09:05 -0400, Neil Horman a écrit :
> > d88733150 introduced the IFF_SKB_TX_SHARING flag, which I unilaterally set in
> > ether_setup.  In doing this I didn't realize that other flags (such as
> > IFF_XMIT_DST_RELEASE) might be set prior to calling the ether_setup routine.
> > This patch changes ether_setup to or in SKB_TX_SHARING so as not to
> > inadvertently clear other existing flags.  Thanks to Pekka Riikonen for pointing
> > out my error
> > 
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > Reported-by: Pekka Riikonen <priikone@iki.fi>
> > CC: "David S. Miller" <davem@davemloft.net>
> > ---
> >  net/ethernet/eth.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
> > index 27997d3..a246836 100644
> > --- a/net/ethernet/eth.c
> > +++ b/net/ethernet/eth.c
> > @@ -340,7 +340,7 @@ void ether_setup(struct net_device *dev)
> >  	dev->addr_len		= ETH_ALEN;
> >  	dev->tx_queue_len	= 1000;	/* Ethernet wants good queues */
> >  	dev->flags		= IFF_BROADCAST|IFF_MULTICAST;
> > -	dev->priv_flags		= IFF_TX_SKB_SHARING;
> > +	dev->priv_flags		|= IFF_TX_SKB_SHARING;
> >  
> >  	memset(dev->broadcast, 0xFF, ETH_ALEN);
> >  
> 
> I CC Pekka Riikonen <priikone@iki.fi>, not sure if he is netdev
> subscribded.
> 
Thank you Eric, I didn't check and assumed my config CC'ed Reported-by: emails
Neil

> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> 
> 
> --
> 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
> 
--
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 Sept. 15, 2011, 7:08 p.m. UTC | #3
From: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 14 Sep 2011 09:05:02 -0400

> d88733150 introduced the IFF_SKB_TX_SHARING flag, which I unilaterally set in
> ether_setup.  In doing this I didn't realize that other flags (such as
> IFF_XMIT_DST_RELEASE) might be set prior to calling the ether_setup routine.
> This patch changes ether_setup to or in SKB_TX_SHARING so as not to
> inadvertently clear other existing flags.  Thanks to Pekka Riikonen for pointing
> out my error
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: Pekka Riikonen <priikone@iki.fi>

Applied, thanks Neil.
--
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/ethernet/eth.c b/net/ethernet/eth.c
index 27997d3..a246836 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -340,7 +340,7 @@  void ether_setup(struct net_device *dev)
 	dev->addr_len		= ETH_ALEN;
 	dev->tx_queue_len	= 1000;	/* Ethernet wants good queues */
 	dev->flags		= IFF_BROADCAST|IFF_MULTICAST;
-	dev->priv_flags		= IFF_TX_SKB_SHARING;
+	dev->priv_flags		|= IFF_TX_SKB_SHARING;
 
 	memset(dev->broadcast, 0xFF, ETH_ALEN);