2012-05-16 10:05:40

by Ozan Çağlayan

[permalink] [raw]
Subject: [PATCH] compat: backport ether_addr_equal

This backports:

commit a599b0f54d233d0f63d6be9a2ff0049d24751669
Author: Joe Perches <[email protected]>
Date: Tue May 8 18:56:45 2012 +0000

etherdevice.h: Add ether_addr_equal

Add a boolean function to check if 2 ethernet addresses
are the same.

This is to avoid any confusion about compare_ether_addr
returning an unsigned, and not being able to use the
compare_ether_addr function for sorting ala memcmp.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>

[root@ozzyfedora compat]# bin/ckmake
Trying kernel 3.3.4-5.fc17.x86_64 [OK]

Signed-off-by: Ozan Çağlayan <[email protected]>
---
include/linux/compat-3.5.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/include/linux/compat-3.5.h b/include/linux/compat-3.5.h
index 554d347..a83266b 100644
--- a/include/linux/compat-3.5.h
+++ b/include/linux/compat-3.5.h
@@ -3,6 +3,7 @@

#include <linux/version.h>
#include <linux/fs.h>
+#include <linux/etherdevice.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))

@@ -12,6 +13,12 @@ extern int simple_open(struct inode *inode, struct file *file);
#define tty_lock(__tty) tty_lock()
#define tty_unlock(__tty) tty_unlock()

+/* Backport ether_addr_equal */
+static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
+{
+ return !compare_ether_addr(addr1, addr2);
+}
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */

#endif /* LINUX_3_5_COMPAT_H */
--
1.7.10.1



2012-05-16 20:26:18

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On Wed, May 16, 2012 at 1:17 PM, Luis R. Rodriguez <[email protected]> wrote:
> This is what I see when I save the e-mail:

<-- snip -->

I've used http://www.opinionatedgeek.com/dotnet/tools/base64decode/ to
decode this to a file, I'm testing it now with ckmake on compat and
compat-wireless, thanks!

Luis

2012-05-16 20:46:35

by Johannes Berg

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On Wed, 2012-05-16 at 22:37 +0200, Hauke Mehrtens wrote:

> > Content-Type: text/plain; charset="utf-8"
> > Content-Transfer-Encoding: base64
> >
> > And then all I see is this when I save the e-mail to a txt file, given
> > that the encoding is base64. This is odd given that I see you sent
> > this with X-Mailer: git-send-email 1.7.10.1 -- so not sure how this
> > ended up going out like this.
>
> That's strange, when I save this mail I got over the mailing list with
> Thunderbird it is not based64 encoded and when looking into the source
> code with my mail program it is normal text mail.
>
> From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <[email protected]>
> Subject: [PATCH] compat: backport ether_addr_equal
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit

Well, which list? :-)

I suspect you looked at linux-wireless, and Luis looked at
lf_driver_backport (given his reply tag), so maybe the
lf_driver_backport list re-encoded the email.

johannes


2012-05-16 20:37:11

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On 05/16/2012 10:17 PM, Luis R. Rodriguez wrote:
> On Wed, May 16, 2012 at 2:55 AM, Ozan Çağlayan <[email protected]> wrote:
>> This backports:
>>
>> commit a599b0f54d233d0f63d6be9a2ff0049d24751669
>> Author: Joe Perches <[email protected]>
>> Date: Tue May 8 18:56:45 2012 +0000
>>
>> etherdevice.h: Add ether_addr_equal
>>
>> Add a boolean function to check if 2 ethernet addresses
>> are the same.
>>
>> This is to avoid any confusion about compare_ether_addr
>> returning an unsigned, and not being able to use the
>> compare_ether_addr function for sorting ala memcmp.
>>
>> Signed-off-by: Joe Perches <[email protected]>
>> Signed-off-by: David S. Miller <[email protected]>
>>
>> [root@ozzyfedora compat]# bin/ckmake
>> Trying kernel 3.3.4-5.fc17.x86_64 [OK]
>>
>> Signed-off-by: Ozan Çağlayan <[email protected]>
>
> Thanks!! BTW I see this though:
>
> Content-Type: text/plain; charset="utf-8"
> Content-Transfer-Encoding: base64
>
> And then all I see is this when I save the e-mail to a txt file, given
> that the encoding is base64. This is odd given that I see you sent
> this with X-Mailer: git-send-email 1.7.10.1 -- so not sure how this
> ended up going out like this.

That's strange, when I save this mail I got over the mailing list with
Thunderbird it is not based64 encoded and when looking into the source
code with my mail program it is normal text mail.

From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <[email protected]>
Subject: [PATCH] compat: backport ether_addr_equal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Hauke

2012-05-16 20:17:50

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On Wed, May 16, 2012 at 2:55 AM, Ozan Çağlayan <[email protected]> wrote:
> This backports:
>
>    commit a599b0f54d233d0f63d6be9a2ff0049d24751669
>    Author: Joe Perches <[email protected]>
>    Date:   Tue May 8 18:56:45 2012 +0000
>
>        etherdevice.h: Add ether_addr_equal
>
>        Add a boolean function to check if 2 ethernet addresses
>        are the same.
>
>        This is to avoid any confusion about compare_ether_addr
>        returning an unsigned, and not being able to use the
>        compare_ether_addr function for sorting ala memcmp.
>
>        Signed-off-by: Joe Perches <[email protected]>
>        Signed-off-by: David S. Miller <[email protected]>
>
> [root@ozzyfedora compat]# bin/ckmake
> Trying kernel                      3.3.4-5.fc17.x86_64  [OK]
>
> Signed-off-by: Ozan Çağlayan <[email protected]>

Thanks!! BTW I see this though:

Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

And then all I see is this when I save the e-mail to a txt file, given
that the encoding is base64. This is odd given that I see you sent
this with X-Mailer: git-send-email 1.7.10.1 -- so not sure how this
ended up going out like this.

This is what I see when I save the e-mail:

VGhpcyBiYWNrcG9ydHM6CgogICAgY29tbWl0IGE1OTliMGY1NGQyMzNkMGY2M2Q2YmU5YTJmZjAw
NDlkMjQ3NTE2NjkKICAgIEF1dGhvcjogSm9lIFBlcmNoZXMgPGpvZUBwZX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vdW5kYXRpb24ub3JnL21haWxtYW4vbGlzdGluZm8vbGZfZHJpdmVyX2JhY2twb3J0Cg==

2012-06-11 18:49:47

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On Wed, May 16, 2012 at 1:46 PM, Johannes Berg
<[email protected]> wrote:
> On Wed, 2012-05-16 at 22:37 +0200, Hauke Mehrtens wrote:
>
>> > Content-Type: text/plain; charset="utf-8"
>> > Content-Transfer-Encoding: base64
>> >
>> > And then all I see is this when I save the e-mail to a txt file, given
>> > that the encoding is base64. This is odd given that I see you sent
>> > this with X-Mailer: git-send-email 1.7.10.1 -- so not sure how this
>> > ended up going out like this.
>>
>> That's strange, when I save this mail I got over the mailing list with
>> Thunderbird it is not based64 encoded and when looking into the source
>> code with my mail program it is normal text mail.
>>
>> From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <[email protected]>
>> Subject: [PATCH] compat: backport ether_addr_equal
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>
> Well, which list? :-)
>
> I suspect you looked at linux-wireless, and Luis looked at
> lf_driver_backport (given his reply tag), so maybe the
> lf_driver_backport list re-encoded the email.

Great, so gmail doesn't even let me "see" the linux-wireless e-mail if
it was sent also to lf_driver_backport, I can tell given that I cannot
see the bottom of the e-mail a footer indicating this came from
linux-wireless. If lf_driver_backport re-encoded it then it seems all
patches sent to that list get busted. Bleh. I gotta address this...

froh you seem to be listed as the owner of the list, can you review this?

Luis

2012-06-11 22:24:38

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On Mon, Jun 11, 2012 at 11:51:33PM +0200, Hauke Mehrtens wrote:
> On 06/11/2012 08:49 PM, Luis R. Rodriguez wrote:
> > On Wed, May 16, 2012 at 1:46 PM, Johannes Berg
> > <[email protected]> wrote:
> >> On Wed, 2012-05-16 at 22:37 +0200, Hauke Mehrtens wrote:
> >>
> >>>> Content-Type: text/plain; charset="utf-8"
> >>>> Content-Transfer-Encoding: base64
> >>>>
> >>>> And then all I see is this when I save the e-mail to a txt file, given
> >>>> that the encoding is base64. This is odd given that I see you sent
> >>>> this with X-Mailer: git-send-email 1.7.10.1 -- so not sure how this
> >>>> ended up going out like this.
> >>>
> >>> That's strange, when I save this mail I got over the mailing list with
> >>> Thunderbird it is not based64 encoded and when looking into the source
> >>> code with my mail program it is normal text mail.
> >>>
> >>> From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <[email protected]>
> >>> Subject: [PATCH] compat: backport ether_addr_equal
> >>> Content-Type: text/plain; charset=UTF-8
> >>> Content-Transfer-Encoding: 8bit
> >>
> >> Well, which list? :-)
> >>
> >> I suspect you looked at linux-wireless, and Luis looked at
> >> lf_driver_backport (given his reply tag), so maybe the
> >> lf_driver_backport list re-encoded the email.
> >
> > Great, so gmail doesn't even let me "see" the linux-wireless e-mail if
> > it was sent also to lf_driver_backport, I can tell given that I cannot
> > see the bottom of the e-mail a footer indicating this came from
> > linux-wireless. If lf_driver_backport re-encoded it then it seems all
> > patches sent to that list get busted. Bleh. I gotta address this...
> >
> > froh you seem to be listed as the owner of the list, can you review this?
> >
> > Luis
>
> All the mails I got through lf_driver_backport are base64 encoded and if
> I and the lf_driver_backport mailing list are in CC or TO I just get one
> mail directly and no mail through the list, different to
> wireless-testing mailing list where I would get two mails, one directly
> and one through the list.

Thanks Hauke, in the meantime lets ignore the lf_driver_backport list then...

Luis

2012-06-11 21:51:40

by Hauke Mehrtens

[permalink] [raw]
Subject: Re: [Lf_driver_backport] [PATCH] compat: backport ether_addr_equal

On 06/11/2012 08:49 PM, Luis R. Rodriguez wrote:
> On Wed, May 16, 2012 at 1:46 PM, Johannes Berg
> <[email protected]> wrote:
>> On Wed, 2012-05-16 at 22:37 +0200, Hauke Mehrtens wrote:
>>
>>>> Content-Type: text/plain; charset="utf-8"
>>>> Content-Transfer-Encoding: base64
>>>>
>>>> And then all I see is this when I save the e-mail to a txt file, given
>>>> that the encoding is base64. This is odd given that I see you sent
>>>> this with X-Mailer: git-send-email 1.7.10.1 -- so not sure how this
>>>> ended up going out like this.
>>>
>>> That's strange, when I save this mail I got over the mailing list with
>>> Thunderbird it is not based64 encoded and when looking into the source
>>> code with my mail program it is normal text mail.
>>>
>>> From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= <[email protected]>
>>> Subject: [PATCH] compat: backport ether_addr_equal
>>> Content-Type: text/plain; charset=UTF-8
>>> Content-Transfer-Encoding: 8bit
>>
>> Well, which list? :-)
>>
>> I suspect you looked at linux-wireless, and Luis looked at
>> lf_driver_backport (given his reply tag), so maybe the
>> lf_driver_backport list re-encoded the email.
>
> Great, so gmail doesn't even let me "see" the linux-wireless e-mail if
> it was sent also to lf_driver_backport, I can tell given that I cannot
> see the bottom of the e-mail a footer indicating this came from
> linux-wireless. If lf_driver_backport re-encoded it then it seems all
> patches sent to that list get busted. Bleh. I gotta address this...
>
> froh you seem to be listed as the owner of the list, can you review this?
>
> Luis

All the mails I got through lf_driver_backport are base64 encoded and if
I and the lf_driver_backport mailing list are in CC or TO I just get one
mail directly and no mail through the list, different to
wireless-testing mailing list where I would get two mails, one directly
and one through the list.

Hauke