Using libnl to create u32 hashkey

Adrian Ban adrian.ban at mantech.ro
Wed May 9 05:32:24 EDT 2012


Hi,

I have few questions:

If I'm trying to include:

#include <netlink/route/qdisc/htb.h>

I'm receiving those warnings:

/usr/local/include/libnl3/netlink/route/qdisc/htb.h:29:42: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:30:37: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:31:42: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:32:37: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:33:42: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:34:37: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:35:45: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:36:40: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:37:45: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:38:40: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:39:45: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:40:40: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:41:38: warning: 
'struct rtnl_class' declared inside parameter list [enabled by default]
....
test-complex-HTB-with-hash-filters.c: In function 'class_add_HTB':
test-complex-HTB-with-hash-filters.c:358:31: warning: passing argument 1 
of 'rtnl_htb_set_prio' from incompatible pointer type [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:30:12: note: 
expected 'struct rtnl_class *' but argument is of type 'struct rtnl_class *'
test-complex-HTB-with-hash-filters.c:362:2: warning: passing argument 1 
of 'rtnl_htb_set_rate' from incompatible pointer type [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:32:12: note: 
expected 'struct rtnl_class *' but argument is of type 'struct rtnl_class *'
test-complex-HTB-with-hash-filters.c:366:2: warning: passing argument 1 
of 'rtnl_htb_set_ceil' from incompatible pointer type [enabled by default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:34:12: note: 
expected 'struct rtnl_class *' but argument is of type 'struct rtnl_class *'
test-complex-HTB-with-hash-filters.c:371:9: warning: passing argument 1 
of 'rtnl_htb_set_rbuffer' from incompatible pointer type [enabled by 
default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:36:12: note: 
expected 'struct rtnl_class *' but argument is of type 'struct rtnl_class *'
test-complex-HTB-with-hash-filters.c:375:9: warning: passing argument 1 
of 'rtnl_htb_set_cbuffer' from incompatible pointer type [enabled by 
default]
/usr/local/include/libnl3/netlink/route/qdisc/htb.h:38:12: note: 
expected 'struct rtnl_class *' but argument is of type 'struct rtnl_class *'


If I don't include this file, I'm receiving only those warnings:

...
test-complex-HTB-with-hash-filters.c:310:5: warning: implicit 
declaration of function 'rtnl_htb_set_defcls' 
[-Wimplicit-function-declaration]
test-complex-HTB-with-hash-filters.c:311:5: warning: implicit 
declaration of function 'rtnl_htb_set_rate2quantum' 
[-Wimplicit-function-declaration]
test-complex-HTB-with-hash-filters.c: In function 'class_add_HTB':
test-complex-HTB-with-hash-filters.c:358:5: warning: implicit 
declaration of function 'rtnl_htb_set_prio' 
[-Wimplicit-function-declaration]
test-complex-HTB-with-hash-filters.c:362:2: warning: implicit 
declaration of function 'rtnl_htb_set_rate' 
[-Wimplicit-function-declaration]
test-complex-HTB-with-hash-filters.c:366:2: warning: implicit 
declaration of function 'rtnl_htb_set_ceil' 
[-Wimplicit-function-declaration]
test-complex-HTB-with-hash-filters.c:371:9: warning: implicit 
declaration of function 'rtnl_htb_set_rbuffer' 
[-Wimplicit-function-declaration]
test-complex-HTB-with-hash-filters.c:375:9: warning: implicit 
declaration of function 'rtnl_htb_set_cbuffer' 
[-Wimplicit-function-declaration]
...

I've read the Routing Family Netlink Library and there is no information 
about what or what to not include for HTB Class Attributes.

Any tips for how to fix this? I guess I'm missing something .. but I 
don't know what.

Best regards,
Adrian


On 05/09/2012 10:06 AM, Adrian Ban wrote:
> Hi,
>
> Thanks. I'll take a look. There are over 7 months.
> I'll keep you in touch.
>
> Best regards,
> Adrian
>
> On 05/09/2012 12:21 AM, Thomas Graf wrote:
>> On Tue, May 08, 2012 at 11:41:46AM +0300, Adrian Ban wrote:
>>> Hi all!
>>>
>>> Can anybody tell me any status of the u32 hash filters integration?
>>> There are 5 new simple functions.
>>> I really need u32 hash filters to load filters faster in kernel.
>>>
>>> I've submitted a patch int November 2011 an we are in May already
>>> and there is no update status for this patch.
>>> I really want to help this project, but as I'm seeing that after 5
>>> releases there is no hope of integration.
>> I have merged your patches. I have moved complex-HTB-with-hash-filters.c
>> to test/ and included it in the Makefile. Compiling it spews a ton of
>> warnings. You might want to fix this.
>>
>> The reason for the delay was because the patch ...
>>    ... contained obvious style errors
>>    ... was not submitted in an easily acceptable format
>>
>> commit 7b503a12a039aeb129fb75804824f6b365adb54b
>> Author: Adrian Ban<adrian.ban at mantech.ro>
>> Date:   Tue May 8 23:17:53 2012 +0200
>>
>>      u32: example/test code for u32 hashing with HTB
>>
>> commit beb40e2b4ed22ab11867b8c7e68d3be9da64fed8
>> Author: Adrian Ban<adrian.ban at mantech.ro>
>> Date:   Tue May 8 23:14:13 2012 +0200
>>
>>      u32: add support for hashing
>
> _______________________________________________
> libnl mailing list
> libnl at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libnl



More information about the libnl mailing list