[PATCH 3/3] bridge: Add support for VLANs

David Ahern dsa at cumulusnetworks.com
Sat Dec 5 12:27:43 PST 2015


On 12/2/15 11:30 AM, Thomas Haller wrote:
> Hi David, Tobias,
>
> I just reworked the branch again (heavily).
>
> Latest and greatest at:
> https://github.com/thom311/libnl/commit/bridge-vlan
>
>
> Now it contains Tobias' patch and I did the changes I was talking in
> the other thread about.
>
> I added your original patches with fixup commits to make it somewhat
> clearer what I changed.
>

A couple of comments:
1. since you changed the bitmap from unsigned longs to uint32 the 
__builtin_ffsl should be changed to __builtin_ffs.

2. Why not leave the macros:

+#define BR_VLAN_MAX            4096
+#define BR_VLAN_BITMAP_LEN     (BR_VLAN_MAX / sizeof(uint32_t))

in include/netlink/route/link/bridge.h and avoid magic numbers?

>
> (beware: I didn't actually test it).


I did test it; works fine for me.

Thanks, Thomas.

David



More information about the libnl mailing list