netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
@ 2011-01-12  9:31 Tobias Klauser
  2011-01-12 17:49 ` Chris Metcalf
  0 siblings, 1 reply; 16+ messages in thread
From: Tobias Klauser @ 2011-01-12  9:31 UTC (permalink / raw)
  To: Chris Metcalf, netdev

Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
macro. Also remove the broadcast address check, as it is considered a
multicast address too.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/tile/tilepro.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/net/tile/tilepro.c b/drivers/net/tile/tilepro.c
index 0e6bac5..8d8b67b 100644
--- a/drivers/net/tile/tilepro.c
+++ b/drivers/net/tile/tilepro.c
@@ -142,14 +142,6 @@
 MODULE_AUTHOR("Tilera");
 MODULE_LICENSE("GPL");
 
-
-#define IS_MULTICAST(mac_addr) \
-	(((u8 *)(mac_addr))[0] & 0x01)
-
-#define IS_BROADCAST(mac_addr) \
-	(((u16 *)(mac_addr))[0] == 0xffff)
-
-
 /*
  * Queue of incoming packets for a specific cpu and device.
  *
@@ -795,7 +787,7 @@ static bool tile_net_poll_aux(struct tile_net_cpu *info, int index)
 		/*
 		 * FIXME: Implement HW multicast filter.
 		 */
-		if (!IS_MULTICAST(buf) && !IS_BROADCAST(buf)) {
+		if (!is_multicast_ether_addr(buf)) {
 			/* Filter packets not for our address. */
 			const u8 *mine = dev->dev_addr;
 			filter = compare_ether_addr(mine, buf);
-- 
1.7.0.4


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

* Re: [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
  2011-01-12  9:31 [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper Tobias Klauser
@ 2011-01-12 17:49 ` Chris Metcalf
  2011-01-13  2:45   ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Chris Metcalf @ 2011-01-12 17:49 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: netdev

On 1/12/2011 4:31 AM, Tobias Klauser wrote:
> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
> macro. Also remove the broadcast address check, as it is considered a
> multicast address too.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
>  drivers/net/tile/tilepro.c |   10 +---------
>  1 files changed, 1 insertions(+), 9 deletions(-)

Thanks, I've taken this into the Tilera tree!

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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

* Re: [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
  2011-01-12 17:49 ` Chris Metcalf
@ 2011-01-13  2:45   ` David Miller
  2011-01-13  6:58     ` Tobias Klauser
  0 siblings, 1 reply; 16+ messages in thread
From: David Miller @ 2011-01-13  2:45 UTC (permalink / raw)
  To: cmetcalf; +Cc: tklauser, netdev

From: Chris Metcalf <cmetcalf@tilera.com>
Date: Wed, 12 Jan 2011 12:49:03 -0500

> On 1/12/2011 4:31 AM, Tobias Klauser wrote:
>> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
>> macro. Also remove the broadcast address check, as it is considered a
>> multicast address too.
>>
>> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> ---
>>  drivers/net/tile/tilepro.c |   10 +---------
>>  1 files changed, 1 insertions(+), 9 deletions(-)
> 
> Thanks, I've taken this into the Tilera tree!

Don't, his transformation is buggy.

You can't get rid of the broadcast check, it needs to be there.
Think about it.

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

* Re: [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
  2011-01-13  2:45   ` David Miller
@ 2011-01-13  6:58     ` Tobias Klauser
  2011-01-13  7:42       ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Tobias Klauser @ 2011-01-13  6:58 UTC (permalink / raw)
  To: David Miller; +Cc: cmetcalf, netdev

On 2011-01-13 at 03:45:01 +0100, David Miller <davem@davemloft.net> wrote:
> From: Chris Metcalf <cmetcalf@tilera.com>
> Date: Wed, 12 Jan 2011 12:49:03 -0500
> 
> > On 1/12/2011 4:31 AM, Tobias Klauser wrote:
> >> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
> >> macro. Also remove the broadcast address check, as it is considered a
> >> multicast address too.
> >>
> >> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> >> ---
> >>  drivers/net/tile/tilepro.c |   10 +---------
> >>  1 files changed, 1 insertions(+), 9 deletions(-)
> > 
> > Thanks, I've taken this into the Tilera tree!
> 
> Don't, his transformation is buggy.

Why?

Doesn't the code want to make sure that only unicast addresses get
filtered?

> You can't get rid of the broadcast check, it needs to be there.
> Think about it.

If a unicast address is in buf, is_multicast_ether_addr returns false
(and is_broadcast_addr would too) and thus it would get filtered.

If a multicast address is in buf, is_multicast_ether_addr returns
true, so the it won't get filtered (no matter what is_broadcast_addr
would tell).

If a broadcast address is in buf, is_multicast_ether_addr returns true,
so it won't get filtered (no matter what is_broadcast_addr would tell).

Are there any special addresses I missed? Or did I didn't get the above
right?

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

* Re: [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
  2011-01-13  6:58     ` Tobias Klauser
@ 2011-01-13  7:42       ` David Miller
  2011-01-13  8:13         ` Tobias Klauser
                           ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: David Miller @ 2011-01-13  7:42 UTC (permalink / raw)
  To: tklauser; +Cc: cmetcalf, netdev

From: Tobias Klauser <tklauser@distanz.ch>
Date: Thu, 13 Jan 2011 07:58:55 +0100

> On 2011-01-13 at 03:45:01 +0100, David Miller <davem@davemloft.net> wrote:
>> From: Chris Metcalf <cmetcalf@tilera.com>
>> Date: Wed, 12 Jan 2011 12:49:03 -0500
>> 
>> > On 1/12/2011 4:31 AM, Tobias Klauser wrote:
>> >> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
>> >> macro. Also remove the broadcast address check, as it is considered a
>> >> multicast address too.
>> >>
>> >> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> >> ---
>> >>  drivers/net/tile/tilepro.c |   10 +---------
>> >>  1 files changed, 1 insertions(+), 9 deletions(-)
>> > 
>> > Thanks, I've taken this into the Tilera tree!
>> 
>> Don't, his transformation is buggy.
> 
> Why?
> 
> Doesn't the code want to make sure that only unicast addresses get
> filtered?
> 
>> You can't get rid of the broadcast check, it needs to be there.
>> Think about it.
> 
> If a unicast address is in buf, is_multicast_ether_addr returns false
> (and is_broadcast_addr would too) and thus it would get filtered.

Ok, this may be correct, but it makes the code hard to read.

I think the old code, whilst redundant, is easier to understand.

Why not add a function "is_unicast_ether_addr()" and use that
here instead?

That solves all of the issues I have with your change.

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

* Re: [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
  2011-01-13  7:42       ` David Miller
@ 2011-01-13  8:13         ` Tobias Klauser
  2011-01-13  8:14         ` [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function Tobias Klauser
  2011-01-13  8:15         ` [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper Tobias Klauser
  2 siblings, 0 replies; 16+ messages in thread
From: Tobias Klauser @ 2011-01-13  8:13 UTC (permalink / raw)
  To: David Miller; +Cc: cmetcalf, netdev

On 2011-01-13 at 08:42:50 +0100, David Miller <davem@davemloft.net> wrote:
> From: Tobias Klauser <tklauser@distanz.ch>
> Date: Thu, 13 Jan 2011 07:58:55 +0100
> 
> > On 2011-01-13 at 03:45:01 +0100, David Miller <davem@davemloft.net> wrote:
> >> From: Chris Metcalf <cmetcalf@tilera.com>
> >> Date: Wed, 12 Jan 2011 12:49:03 -0500
> >> 
> >> > On 1/12/2011 4:31 AM, Tobias Klauser wrote:
> >> >> Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
> >> >> macro. Also remove the broadcast address check, as it is considered a
> >> >> multicast address too.
> >> >>
> >> >> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> >> >> ---
> >> >>  drivers/net/tile/tilepro.c |   10 +---------
> >> >>  1 files changed, 1 insertions(+), 9 deletions(-)
> >> > 
> >> > Thanks, I've taken this into the Tilera tree!
> >> 
> >> Don't, his transformation is buggy.
> > 
> > Why?
> > 
> > Doesn't the code want to make sure that only unicast addresses get
> > filtered?
> > 
> >> You can't get rid of the broadcast check, it needs to be there.
> >> Think about it.
> > 
> > If a unicast address is in buf, is_multicast_ether_addr returns false
> > (and is_broadcast_addr would too) and thus it would get filtered.
> 
> Ok, this may be correct, but it makes the code hard to read.
> 
> I think the old code, whilst redundant, is easier to understand.

Agreed. Thanks for clarifying.

> Why not add a function "is_unicast_ether_addr()" and use that
> here instead?

I'll send a patch to add the function to linux/etherdevice.h and an
updated patch for the tilepro driver as a follow up.

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

* [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  7:42       ` David Miller
  2011-01-13  8:13         ` Tobias Klauser
@ 2011-01-13  8:14         ` Tobias Klauser
  2011-01-13  8:24           ` Joe Perches
  2011-01-14  5:51           ` David Miller
  2011-01-13  8:15         ` [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper Tobias Klauser
  2 siblings, 2 replies; 16+ messages in thread
From: Tobias Klauser @ 2011-01-13  8:14 UTC (permalink / raw)
  To: David Miller, cmetcalf, netdev; +Cc: tklauser

>From a check for !is_multicast_ether_addr it is not always obvious that
we're checking for a unicast address. So add this helper function to
make those code paths easier to read.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 include/linux/etherdevice.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index bec8b82..ab68f78 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -99,6 +99,17 @@ static inline int is_broadcast_ether_addr(const u8 *addr)
 }
 
 /**
+ * is_unicast_ether_addr - Determine if the Ethernet address is unicast
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Return true if the address is a unicast address.
+ */
+static inline int is_unicast_ether_addr(const u8 *addr)
+{
+	return !is_multicast_ether_addr(addr);
+}
+
+/**
  * is_valid_ether_addr - Determine if the given Ethernet address is valid
  * @addr: Pointer to a six-byte array containing the Ethernet address
  *
-- 
1.7.0.4


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

* [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper
  2011-01-13  7:42       ` David Miller
  2011-01-13  8:13         ` Tobias Klauser
  2011-01-13  8:14         ` [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function Tobias Klauser
@ 2011-01-13  8:15         ` Tobias Klauser
  2011-01-14  5:51           ` David Miller
  2 siblings, 1 reply; 16+ messages in thread
From: Tobias Klauser @ 2011-01-13  8:15 UTC (permalink / raw)
  To: David Miller, cmetcalf, netdev; +Cc: tklauser

Use is_unicast_ether_addr from linux/etherdevice.h instead of custom
macros.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/tile/tilepro.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/net/tile/tilepro.c b/drivers/net/tile/tilepro.c
index 0e6bac5..7cb301d 100644
--- a/drivers/net/tile/tilepro.c
+++ b/drivers/net/tile/tilepro.c
@@ -142,14 +142,6 @@
 MODULE_AUTHOR("Tilera");
 MODULE_LICENSE("GPL");
 
-
-#define IS_MULTICAST(mac_addr) \
-	(((u8 *)(mac_addr))[0] & 0x01)
-
-#define IS_BROADCAST(mac_addr) \
-	(((u16 *)(mac_addr))[0] == 0xffff)
-
-
 /*
  * Queue of incoming packets for a specific cpu and device.
  *
@@ -795,7 +787,7 @@ static bool tile_net_poll_aux(struct tile_net_cpu *info, int index)
 		/*
 		 * FIXME: Implement HW multicast filter.
 		 */
-		if (!IS_MULTICAST(buf) && !IS_BROADCAST(buf)) {
+		if (is_unicast_ether_addr(buf)) {
 			/* Filter packets not for our address. */
 			const u8 *mine = dev->dev_addr;
 			filter = compare_ether_addr(mine, buf);
-- 
1.7.0.4


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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  8:14         ` [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function Tobias Klauser
@ 2011-01-13  8:24           ` Joe Perches
  2011-01-13  8:35             ` Tobias Klauser
  2011-01-13  8:55             ` Eric Dumazet
  2011-01-14  5:51           ` David Miller
  1 sibling, 2 replies; 16+ messages in thread
From: Joe Perches @ 2011-01-13  8:24 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: David Miller, cmetcalf, netdev

On Thu, 2011-01-13 at 09:14 +0100, Tobias Klauser wrote:
> >From a check for !is_multicast_ether_addr it is not always obvious that
> we're checking for a unicast address. So add this helper function to
> make those code paths easier to read.
>  include/linux/etherdevice.h |   11 +++++++++++
[]
>  /**
> + * is_unicast_ether_addr - Determine if the Ethernet address is unicast
> + * @addr: Pointer to a six-byte array containing the Ethernet address
> + *
> + * Return true if the address is a unicast address.
> + */
> +static inline int is_unicast_ether_addr(const u8 *addr)
> +{
> +	return !is_multicast_ether_addr(addr);
> +}

Can't you simply use is_valid_ether_addr?

I can't think of much reason that a new function for
!multicast without the !is_zero is needed.



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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  8:24           ` Joe Perches
@ 2011-01-13  8:35             ` Tobias Klauser
  2011-01-13  8:43               ` Joe Perches
  2011-01-13  8:55             ` Eric Dumazet
  1 sibling, 1 reply; 16+ messages in thread
From: Tobias Klauser @ 2011-01-13  8:35 UTC (permalink / raw)
  To: Joe Perches; +Cc: David Miller, cmetcalf, netdev

On 2011-01-13 at 09:24:41 +0100, Joe Perches <joe@perches.com> wrote:
> On Thu, 2011-01-13 at 09:14 +0100, Tobias Klauser wrote:
> > >From a check for !is_multicast_ether_addr it is not always obvious that
> > we're checking for a unicast address. So add this helper function to
> > make those code paths easier to read.
> >  include/linux/etherdevice.h |   11 +++++++++++
> []
> >  /**
> > + * is_unicast_ether_addr - Determine if the Ethernet address is unicast
> > + * @addr: Pointer to a six-byte array containing the Ethernet address
> > + *
> > + * Return true if the address is a unicast address.
> > + */
> > +static inline int is_unicast_ether_addr(const u8 *addr)
> > +{
> > +	return !is_multicast_ether_addr(addr);
> > +}
> 
> Can't you simply use is_valid_ether_addr?

I added is_unicast_ether_addr to make the intention of checking for a
unicast address clearer (see [1] for context).

[1] http://article.gmane.org/gmane.linux.network/183615

> I can't think of much reason that a new function for
> !multicast without the !is_zero is needed.

Maybe I should just add something like the following?

#define is_unicast_ether_addr(addr) is_valid_ether_addr(addr)

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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  8:35             ` Tobias Klauser
@ 2011-01-13  8:43               ` Joe Perches
  0 siblings, 0 replies; 16+ messages in thread
From: Joe Perches @ 2011-01-13  8:43 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: David Miller, cmetcalf, netdev

On Thu, 2011-01-13 at 09:35 +0100, Tobias Klauser wrote:
> On 2011-01-13 at 09:24:41 +0100, Joe Perches <joe@perches.com> wrote:
> I added is_unicast_ether_addr to make the intention of checking for a
> unicast address clearer (see [1] for context).
> [1] http://article.gmane.org/gmane.linux.network/183615
> > I can't think of much reason that a new function for
> > !multicast without the !is_zero is needed.
> Maybe I should just add something like the following?
> #define is_unicast_ether_addr(addr) is_valid_ether_addr(addr)

Adding the #define makes a bit more sense to me.



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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  8:24           ` Joe Perches
  2011-01-13  8:35             ` Tobias Klauser
@ 2011-01-13  8:55             ` Eric Dumazet
  2011-01-13 16:38               ` Chris Metcalf
  1 sibling, 1 reply; 16+ messages in thread
From: Eric Dumazet @ 2011-01-13  8:55 UTC (permalink / raw)
  To: Joe Perches; +Cc: Tobias Klauser, David Miller, cmetcalf, netdev

Le jeudi 13 janvier 2011 à 00:24 -0800, Joe Perches a écrit :
> On Thu, 2011-01-13 at 09:14 +0100, Tobias Klauser wrote:
> > >From a check for !is_multicast_ether_addr it is not always obvious that
> > we're checking for a unicast address. So add this helper function to
> > make those code paths easier to read.
> >  include/linux/etherdevice.h |   11 +++++++++++
> []
> >  /**
> > + * is_unicast_ether_addr - Determine if the Ethernet address is unicast
> > + * @addr: Pointer to a six-byte array containing the Ethernet address
> > + *
> > + * Return true if the address is a unicast address.
> > + */
> > +static inline int is_unicast_ether_addr(const u8 *addr)
> > +{
> > +	return !is_multicast_ether_addr(addr);
> > +}
> 
> Can't you simply use is_valid_ether_addr?
> 
> I can't think of much reason that a new function for
> !multicast without the !is_zero is needed.
> 

performance ?

is_valid_ether_addr() is used at device init time, not when receiving
packets.

I am not sure we _need_ to check for is_zero_ether_addr() each time we
receive a packet.

Either a MAC is unicast or multicast.

A zero address is not multicast for sure.




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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  8:55             ` Eric Dumazet
@ 2011-01-13 16:38               ` Chris Metcalf
  2011-01-13 20:35                 ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Chris Metcalf @ 2011-01-13 16:38 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Joe Perches, Tobias Klauser, David Miller, netdev

On 1/13/2011 3:55 AM, Eric Dumazet wrote:
> Le jeudi 13 janvier 2011 à 00:24 -0800, Joe Perches a écrit :
>> On Thu, 2011-01-13 at 09:14 +0100, Tobias Klauser wrote:
>>> >From a check for !is_multicast_ether_addr it is not always obvious that
>>> we're checking for a unicast address. So add this helper function to
>>> make those code paths easier to read.
>>>  include/linux/etherdevice.h |   11 +++++++++++
>> []
>>>  /**
>>> + * is_unicast_ether_addr - Determine if the Ethernet address is unicast
>>> + * @addr: Pointer to a six-byte array containing the Ethernet address
>>> + *
>>> + * Return true if the address is a unicast address.
>>> + */
>>> +static inline int is_unicast_ether_addr(const u8 *addr)
>>> +{
>>> +	return !is_multicast_ether_addr(addr);
>>> +}
>> Can't you simply use is_valid_ether_addr?
>>
>> I can't think of much reason that a new function for
>> !multicast without the !is_zero is needed.
>>
> performance ?
>
> is_valid_ether_addr() is used at device init time, not when receiving
> packets.
>
> I am not sure we _need_ to check for is_zero_ether_addr() each time we
> receive a packet.
>
> Either a MAC is unicast or multicast.
>
> A zero address is not multicast for sure.

I agree - the is_zero_ether_addr() check seems pointless in the context of
the running interface.

Also, I think a static inline is better form than a #define, all things
being equal.

So, I like Tobias' reworked patches.  I can take them into the Tilera tree,
but I'd prefer David Miller take them into the net tree if he is agreeable,
since it now includes changes to generic networking code.  If you take the
latter approach you can include my:

Acked-by: Chris Metcalf <cmetcalf@tilera.com>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13 16:38               ` Chris Metcalf
@ 2011-01-13 20:35                 ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2011-01-13 20:35 UTC (permalink / raw)
  To: cmetcalf; +Cc: eric.dumazet, joe, tklauser, netdev

From: Chris Metcalf <cmetcalf@tilera.com>
Date: Thu, 13 Jan 2011 11:38:42 -0500

> So, I like Tobias' reworked patches.  I can take them into the Tilera tree,
> but I'd prefer David Miller take them into the net tree if he is agreeable,
> since it now includes changes to generic networking code.  If you take the
> latter approach you can include my:

I'll take them into my networking tree, which is where all network
device changes ought to go in the first place.

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

* Re: [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function
  2011-01-13  8:14         ` [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function Tobias Klauser
  2011-01-13  8:24           ` Joe Perches
@ 2011-01-14  5:51           ` David Miller
  1 sibling, 0 replies; 16+ messages in thread
From: David Miller @ 2011-01-14  5:51 UTC (permalink / raw)
  To: tklauser; +Cc: cmetcalf, netdev

From: Tobias Klauser <tklauser@distanz.ch>
Date: Thu, 13 Jan 2011 09:14:56 +0100

>>From a check for !is_multicast_ether_addr it is not always obvious that
> we're checking for a unicast address. So add this helper function to
> make those code paths easier to read.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied.

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

* Re: [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper
  2011-01-13  8:15         ` [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper Tobias Klauser
@ 2011-01-14  5:51           ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2011-01-14  5:51 UTC (permalink / raw)
  To: tklauser; +Cc: cmetcalf, netdev

From: Tobias Klauser <tklauser@distanz.ch>
Date: Thu, 13 Jan 2011 09:15:08 +0100

> Use is_unicast_ether_addr from linux/etherdevice.h instead of custom
> macros.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied.

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

end of thread, other threads:[~2011-01-14  5:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12  9:31 [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper Tobias Klauser
2011-01-12 17:49 ` Chris Metcalf
2011-01-13  2:45   ` David Miller
2011-01-13  6:58     ` Tobias Klauser
2011-01-13  7:42       ` David Miller
2011-01-13  8:13         ` Tobias Klauser
2011-01-13  8:14         ` [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function Tobias Klauser
2011-01-13  8:24           ` Joe Perches
2011-01-13  8:35             ` Tobias Klauser
2011-01-13  8:43               ` Joe Perches
2011-01-13  8:55             ` Eric Dumazet
2011-01-13 16:38               ` Chris Metcalf
2011-01-13 20:35                 ` David Miller
2011-01-14  5:51           ` David Miller
2011-01-13  8:15         ` [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper Tobias Klauser
2011-01-14  5:51           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).