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

David Ahern dsa at cumulusnetworks.com
Mon Dec 7 07:01:32 PST 2015


On 12/7/15 4:25 AM, Thomas Haller wrote:
>> A couple of comments:
>> 1. since you changed the bitmap from unsigned longs to uint32 the
>> __builtin_ffsl should be changed to __builtin_ffs.
>
> Changed. I think it is always true on supported archs that
> sizeof(uint32_t) <= sizeof(int).

I thought 'int' was 4 bytes (or at least 4) on all modern processors.


> I am unsure what happens when casting the unsigned value to "signed
> int", but I guess it will still work as expected/correctly.

I don't follow. The prototype is 'int __builtin_ffs (unsigned int x)' so 
should not have unsigned/signed conversions.

David



More information about the libnl mailing list