All of lore.kernel.org
 help / color / mirror / Atom feed
* [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-26  5:46 ` Patrick McHardy
  0 siblings, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2008-03-26  5:46 UTC (permalink / raw)
  To: jdike; +Cc: user-mode-linux-devel, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1160 bytes --]

commit 00237037726efc587d55d65d6fd5357106ae7071
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Mar 26 06:41:22 2008 +0100

    [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
    
    IFF_ALLMULTI is an indication from the network stack to the driver
    to disable multicast filters, drivers should never set it directly.
    
    Since the UML networking device doesn't have any filtering capabilites,
    it doesn't the set_multicast_list function at all, it is kept so userspace
    can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 1e8f41a..1d43bdf 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -256,11 +256,7 @@ static struct net_device_stats *uml_net_get_stats(struct net_device *dev)
 
 static void uml_net_set_multicast_list(struct net_device *dev)
 {
-	if (dev->flags & IFF_PROMISC)
-		return;
-	else if (dev->mc_count)
-		dev->flags |= IFF_ALLMULTI;
-	else dev->flags &= ~IFF_ALLMULTI;
+	return;
 }
 
 static void uml_net_tx_timeout(struct net_device *dev)

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-26  5:46 ` Patrick McHardy
  0 siblings, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2008-03-26  5:46 UTC (permalink / raw)
  To: jdike; +Cc: Linux Netdev List, user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1160 bytes --]

commit 00237037726efc587d55d65d6fd5357106ae7071
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Mar 26 06:41:22 2008 +0100

    [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
    
    IFF_ALLMULTI is an indication from the network stack to the driver
    to disable multicast filters, drivers should never set it directly.
    
    Since the UML networking device doesn't have any filtering capabilites,
    it doesn't the set_multicast_list function at all, it is kept so userspace
    can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 1e8f41a..1d43bdf 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -256,11 +256,7 @@ static struct net_device_stats *uml_net_get_stats(struct net_device *dev)
 
 static void uml_net_set_multicast_list(struct net_device *dev)
 {
-	if (dev->flags & IFF_PROMISC)
-		return;
-	else if (dev->mc_count)
-		dev->flags |= IFF_ALLMULTI;
-	else dev->flags &= ~IFF_ALLMULTI;
+	return;
 }
 
 static void uml_net_tx_timeout(struct net_device *dev)

[-- Attachment #3: Type: text/plain, Size: 278 bytes --]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

[-- Attachment #4: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  2008-03-26  5:46 ` [uml-devel] " Patrick McHardy
@ 2008-03-26  6:10   ` Jeff Garzik
  -1 siblings, 0 replies; 14+ messages in thread
From: Jeff Garzik @ 2008-03-26  6:10 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: jdike, user-mode-linux-devel, Linux Netdev List

>  static void uml_net_set_multicast_list(struct net_device *dev)
>  {
> -	if (dev->flags & IFF_PROMISC)
> -		return;
> -	else if (dev->mc_count)
> -		dev->flags |= IFF_ALLMULTI;
> -	else dev->flags &= ~IFF_ALLMULTI;
> +	return;
>  }



Might as well just delete the hook at that point...

	Jeff



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-26  6:10   ` Jeff Garzik
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Garzik @ 2008-03-26  6:10 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Linux Netdev List, jdike, user-mode-linux-devel

>  static void uml_net_set_multicast_list(struct net_device *dev)
>  {
> -	if (dev->flags & IFF_PROMISC)
> -		return;
> -	else if (dev->mc_count)
> -		dev->flags |= IFF_ALLMULTI;
> -	else dev->flags &= ~IFF_ALLMULTI;
> +	return;
>  }



Might as well just delete the hook at that point...

	Jeff



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  2008-03-26  6:10   ` [uml-devel] " Jeff Garzik
@ 2008-03-26  6:13     ` Patrick McHardy
  -1 siblings, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2008-03-26  6:13 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: jdike, user-mode-linux-devel, Linux Netdev List

Jeff Garzik wrote:
>>  static void uml_net_set_multicast_list(struct net_device *dev)
>>  {
>> -    if (dev->flags & IFF_PROMISC)
>> -        return;
>> -    else if (dev->mc_count)
>> -        dev->flags |= IFF_ALLMULTI;
>> -    else dev->flags &= ~IFF_ALLMULTI;
>> +    return;
>>  }
> 
> 
> 
> Might as well just delete the hook at that point...


I kept it so SIOCADDMULTI/SIOCDELMULTI ioctls continue to
work on UML devices. I don't know if any userspace applications
check for errors when using these ioctls, this way nothing
can break.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-26  6:13     ` Patrick McHardy
  0 siblings, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2008-03-26  6:13 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Netdev List, jdike, user-mode-linux-devel

Jeff Garzik wrote:
>>  static void uml_net_set_multicast_list(struct net_device *dev)
>>  {
>> -    if (dev->flags & IFF_PROMISC)
>> -        return;
>> -    else if (dev->mc_count)
>> -        dev->flags |= IFF_ALLMULTI;
>> -    else dev->flags &= ~IFF_ALLMULTI;
>> +    return;
>>  }
> 
> 
> 
> Might as well just delete the hook at that point...


I kept it so SIOCADDMULTI/SIOCDELMULTI ioctls continue to
work on UML devices. I don't know if any userspace applications
check for errors when using these ioctls, this way nothing
can break.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  2008-03-26  6:13     ` [uml-devel] " Patrick McHardy
@ 2008-03-26  7:16       ` David Miller
  -1 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2008-03-26  7:16 UTC (permalink / raw)
  To: kaber; +Cc: jeff, jdike, user-mode-linux-devel, netdev

From: Patrick McHardy <kaber@trash.net>
Date: Wed, 26 Mar 2008 07:13:51 +0100

> Jeff Garzik wrote:
> >>  static void uml_net_set_multicast_list(struct net_device *dev)
> >>  {
> >> -    if (dev->flags & IFF_PROMISC)
> >> -        return;
> >> -    else if (dev->mc_count)
> >> -        dev->flags |= IFF_ALLMULTI;
> >> -    else dev->flags &= ~IFF_ALLMULTI;
> >> +    return;
> >>  }
> > 
> > 
> > 
> > Might as well just delete the hook at that point...
> 
> 
> I kept it so SIOCADDMULTI/SIOCDELMULTI ioctls continue to
> work on UML devices. I don't know if any userspace applications
> check for errors when using these ioctls, this way nothing
> can break.

Good idea, patch applied to net-2.6, thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-26  7:16       ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2008-03-26  7:16 UTC (permalink / raw)
  To: kaber; +Cc: netdev, jdike, user-mode-linux-devel, jeff

From: Patrick McHardy <kaber@trash.net>
Date: Wed, 26 Mar 2008 07:13:51 +0100

> Jeff Garzik wrote:
> >>  static void uml_net_set_multicast_list(struct net_device *dev)
> >>  {
> >> -    if (dev->flags & IFF_PROMISC)
> >> -        return;
> >> -    else if (dev->mc_count)
> >> -        dev->flags |= IFF_ALLMULTI;
> >> -    else dev->flags &= ~IFF_ALLMULTI;
> >> +    return;
> >>  }
> > 
> > 
> > 
> > Might as well just delete the hook at that point...
> 
> 
> I kept it so SIOCADDMULTI/SIOCDELMULTI ioctls continue to
> work on UML devices. I don't know if any userspace applications
> check for errors when using these ioctls, this way nothing
> can break.

Good idea, patch applied to net-2.6, thanks!

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  2008-03-26  5:46 ` [uml-devel] " Patrick McHardy
@ 2008-03-31 14:09   ` Jeff Dike
  -1 siblings, 0 replies; 14+ messages in thread
From: Jeff Dike @ 2008-03-31 14:09 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Linux Netdev List, user-mode-linux-devel

On Wed, Mar 26, 2008 at 06:46:25AM +0100, Patrick McHardy wrote:
>     [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list

I don't really understand this, but the people who do seem to like it,
so I'll drop it in my tree and forward it along if no one else does.

   	     	Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-31 14:09   ` Jeff Dike
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Dike @ 2008-03-31 14:09 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Linux Netdev List, user-mode-linux-devel

On Wed, Mar 26, 2008 at 06:46:25AM +0100, Patrick McHardy wrote:
>     [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list

I don't really understand this, but the people who do seem to like it,
so I'll drop it in my tree and forward it along if no one else does.

   	     	Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  2008-03-31 14:09   ` [uml-devel] " Jeff Dike
@ 2008-03-31 17:46     ` Patrick McHardy
  -1 siblings, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2008-03-31 17:46 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Linux Netdev List, user-mode-linux-devel

Jeff Dike wrote:
> On Wed, Mar 26, 2008 at 06:46:25AM +0100, Patrick McHardy wrote:
>>     [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
> 
> I don't really understand this, but the people who do seem to like it,
> so I'll drop it in my tree and forward it along if no one else does.

Thanks, its already in Linus' tree.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-03-31 17:46     ` Patrick McHardy
  0 siblings, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2008-03-31 17:46 UTC (permalink / raw)
  To: Jeff Dike; +Cc: Linux Netdev List, user-mode-linux-devel

Jeff Dike wrote:
> On Wed, Mar 26, 2008 at 06:46:25AM +0100, Patrick McHardy wrote:
>>     [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
> 
> I don't really understand this, but the people who do seem to like it,
> so I'll drop it in my tree and forward it along if no one else does.

Thanks, its already in Linus' tree.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
  2008-03-31 17:46     ` [uml-devel] " Patrick McHardy
@ 2008-04-01 15:39       ` Jeff Dike
  -1 siblings, 0 replies; 14+ messages in thread
From: Jeff Dike @ 2008-04-01 15:39 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: user-mode-linux-devel, Linux Netdev List

On Mon, Mar 31, 2008 at 07:46:07PM +0200, Patrick McHardy wrote:
> Thanks, its already in Linus' tree.

Excellent...

	Jeff

-- 
Work email - jdike at linux dot intel dot com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [uml-devel] [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
@ 2008-04-01 15:39       ` Jeff Dike
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Dike @ 2008-04-01 15:39 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Linux Netdev List, user-mode-linux-devel

On Mon, Mar 31, 2008 at 07:46:07PM +0200, Patrick McHardy wrote:
> Thanks, its already in Linus' tree.

Excellent...

	Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-04-01 15:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-26  5:46 [UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list Patrick McHardy
2008-03-26  5:46 ` [uml-devel] " Patrick McHardy
2008-03-26  6:10 ` Jeff Garzik
2008-03-26  6:10   ` [uml-devel] " Jeff Garzik
2008-03-26  6:13   ` Patrick McHardy
2008-03-26  6:13     ` [uml-devel] " Patrick McHardy
2008-03-26  7:16     ` David Miller
2008-03-26  7:16       ` [uml-devel] " David Miller
2008-03-31 14:09 ` Jeff Dike
2008-03-31 14:09   ` [uml-devel] " Jeff Dike
2008-03-31 17:46   ` Patrick McHardy
2008-03-31 17:46     ` [uml-devel] " Patrick McHardy
2008-04-01 15:39     ` Jeff Dike
2008-04-01 15:39       ` [uml-devel] " Jeff Dike

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.