From mallika.gautam at gmail.com  Thu Dec  3 05:56:58 2009
From: mallika.gautam at gmail.com (Mallika Gautam)
Date: Thu, 3 Dec 2009 10:56:58 +0000
Subject: Multicast support in libnl
Message-ID: <9041a1390912030256u3f9f08f2sf068d257b7e48add@mail.gmail.com>

Hi,

This is a very basic question.

I am trying to use generic netlink linux kernel 2.6.23. Briefly, the
kernel module sends a multicast message which should then be received
in user space. There are multiple user space processes that are
interested in this multicast message.
I can see the multicast macros (CTRL_ATTR_MCAST_GRP_NAME,
CTRL_ATTR_MCAST_GRP_ID) defined in genetlink.h but no handling in
libnl 1.1. I also checked the HEAD version in libnl git, but could not
find any handling there as well.

Could anyone please point me how to register to a multicast group for
generic netlink family. Also kindly point to the correct libnl version
supporting the functionality and the site.

Thanks.
Mallika


From tgraf at infradead.org  Mon Dec  7 10:25:14 2009
From: tgraf at infradead.org (Thomas Graf)
Date: Mon, 7 Dec 2009 10:25:14 -0500
Subject: invalid comma cause segfault for nl-tctree-list, tbf.c
In-Reply-To: <200911142059.49610.denys@visp.net.lb>
References: <200911142059.49610.denys@visp.net.lb>
Message-ID: <20091207152514.GA27018@bombadil.infradead.org>

On Sat, Nov 14, 2009 at 08:59:49PM +0200, Denys Fedoryschenko wrote:
> Hi
> 
> I notice segfault while running nl-tctree-list for tbf qdisc.
> 
> Patch that fix this typo is attached.

Patch applied, thanks Denys.


From tgraf at infradead.org  Mon Dec  7 10:29:05 2009
From: tgraf at infradead.org (Thomas Graf)
Date: Mon, 7 Dec 2009 10:29:05 -0500
Subject: one more fix, u32.c
In-Reply-To: <200911142110.18753.denys@visp.net.lb>
References: <200911142110.18753.denys@visp.net.lb>
Message-ID: <20091207152905.GB27018@bombadil.infradead.org>

On Sat, Nov 14, 2009 at 09:10:18PM +0200, Denys Fedoryschenko wrote:
> One more segfault, also nl-tctree-list , fix
> Probably need reformat for better look

Patch applied, thanks!


From tgraf at infradead.org  Mon Dec  7 10:34:32 2009
From: tgraf at infradead.org (Thomas Graf)
Date: Mon, 7 Dec 2009 10:34:32 -0500
Subject: reusing genl sockets via libnl
In-Reply-To: <30214.1258313534@jerryjeff.riw.enoyolf.org>
References: <30214.1258313534@jerryjeff.riw.enoyolf.org>
Message-ID: <20091207153432.GC27018@bombadil.infradead.org>

On Sun, Nov 15, 2009 at 01:32:14PM -0600, Doug Maxey wrote:
> model.  Is that a requirement?
> 
> It would be really nice if there could be a long lived socket that
> could be
> 
> 1) be reused for at least some subset of the commands, resetting what
>    the expected command / response via nl_socket_modify_cb().
> 
> 2) a single socket (or a few) that would be expected to last the
>    lifetime of the application so a watcher could notice if the app
>    dies and clean up the resource that were claimed by the app.
> 
> Tried to set up such a socket, but it appears that -any- command after
> the first appears to never return anything other than no error on the
> operation.  The callback is never invoked.
> 
> Is this the expected behavior, or a powerpc bug?  Where is the
> expected behavior documented?

Sockets are supposed to last for the entire lifetime of an application
and shall be reused as often as possible without closing and reopening
the socket. Any issues regarding this are clearly bugs.


From tgraf at infradead.org  Mon Dec  7 10:37:09 2009
From: tgraf at infradead.org (Thomas Graf)
Date: Mon, 7 Dec 2009 10:37:09 -0500
Subject: Multicast support in libnl
In-Reply-To: <9041a1390912030256u3f9f08f2sf068d257b7e48add@mail.gmail.com>
References: <9041a1390912030256u3f9f08f2sf068d257b7e48add@mail.gmail.com>
Message-ID: <20091207153709.GD27018@bombadil.infradead.org>

On Thu, Dec 03, 2009 at 10:56:58AM +0000, Mallika Gautam wrote:
> Hi,
> 
> This is a very basic question.
> 
> I am trying to use generic netlink linux kernel 2.6.23. Briefly, the
> kernel module sends a multicast message which should then be received
> in user space. There are multiple user space processes that are
> interested in this multicast message.
> I can see the multicast macros (CTRL_ATTR_MCAST_GRP_NAME,
> CTRL_ATTR_MCAST_GRP_ID) defined in genetlink.h but no handling in
> libnl 1.1. I also checked the HEAD version in libnl git, but could not
> find any handling there as well.
> 
> Could anyone please point me how to register to a multicast group for
> generic netlink family. Also kindly point to the correct libnl version
> supporting the functionality and the site.

The code to do this has not been written yet. You may subscribe to a
generic netlink multicast group by constructing the corresponding
subscription message yourself or even better, come up with a patch to
add the relevant interfaces.


From dwm at austin.ibm.com  Tue Dec  8 01:41:29 2009
From: dwm at austin.ibm.com (Doug Maxey)
Date: Tue, 08 Dec 2009 00:41:29 -0600
Subject: reusing genl sockets via libnl
In-Reply-To: <20091207153432.GC27018@bombadil.infradead.org>
References: <30214.1258313534@jerryjeff.riw.enoyolf.org>
	<20091207153432.GC27018@bombadil.infradead.org>
Message-ID: <10423.1260254489@jerryjeff.riw.enoyolf.org>


On Mon, 07 Dec 2009 10:34:32 EST, Thomas Graf wrote:
>
>Sockets are supposed to last for the entire lifetime of an application
>and shall be reused as often as possible without closing and reopening
>the socket. Any issues regarding this are clearly bugs.
>

Thanks!  Will dig into this.

++doug




From mallika.gautam at gmail.com  Tue Dec  8 06:06:19 2009
From: mallika.gautam at gmail.com (Mallika Gautam)
Date: Tue, 8 Dec 2009 11:06:19 +0000
Subject: Multicast support in libnl
In-Reply-To: <20091207153709.GD27018@bombadil.infradead.org>
References: <9041a1390912030256u3f9f08f2sf068d257b7e48add@mail.gmail.com> 
	<20091207153709.GD27018@bombadil.infradead.org>
Message-ID: <9041a1390912080306l535a73b7sf979f2f8de26ed02@mail.gmail.com>

On Mon, Dec 7, 2009 at 3:37 PM, Thomas Graf <tgraf at infradead.org> wrote:
> On Thu, Dec 03, 2009 at 10:56:58AM +0000, Mallika Gautam wrote:
>> Hi,
>>
>> This is a very basic question.
>>
>> I am trying to use generic netlink linux kernel 2.6.23. Briefly, the
>> kernel module sends a multicast message which should then be received
>> in user space. There are multiple user space processes that are
>> interested in this multicast message.
>> I can see the multicast macros (CTRL_ATTR_MCAST_GRP_NAME,
>> CTRL_ATTR_MCAST_GRP_ID) defined in genetlink.h but no handling in
>> libnl 1.1. I also checked the HEAD version in libnl git, but could not
>> find any handling there as well.
>>
>> Could anyone please point me how to register to a multicast group for
>> generic netlink family. Also kindly point to the correct libnl version
>> supporting the functionality and the site.
>
> The code to do this has not been written yet. You may subscribe to a
> generic netlink multicast group by constructing the corresponding
> subscription message yourself or even better, come up with a patch to
> add the relevant interfaces.
>

Hi Thomas,

Thanks for clarifying my doubts.

Regards
Mallika


From moulinfr at gmail.com  Thu Dec 24 11:34:59 2009
From: moulinfr at gmail.com (=?ISO-8859-1?Q?Fr=E9d=E9ric_MOULIN?=)
Date: Thu, 24 Dec 2009 17:34:59 +0100
Subject: CBQ qdisc / class
Message-ID: <e41a6d5b0912240834w7fefd94eh927b8040f6f4910a@mail.gmail.com>

Hi fellows,

I try to manage CBQ qdiscs using the libnl library. Currently, I write a
piece of code using message functions, since apparently there is not direct
support for CBQ in libnl. I works perfectly for PFIFO qdiscs, and yet, I do
not succeed in fro CBQ, my best try is a "Invalid input data  or parameter"
(while my worst try is segfault :-x). So my code initializes correctly:
  - the qdisc ifindex,
  - the qdisc parent,
  - the qdisc handle,
  - the qdisc family and kind,
Plus, it initializes the following structures: TCA_OPTIONS (to null),
TCA_CBQ_LSSOPT, TCA_CBQ_RATE, TCA_CBQ_RTAB. In those cases, I am not
absolutely sure of the code. Please, do you have any suggestion or pointers
to solve this problems?

Thank you for your attention, and merry xmas!

Fr?d?ric MOULIN.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20091224/1266601f/attachment.htm>

From azatoth at gmail.com  Wed Dec 30 20:04:17 2009
From: azatoth at gmail.com (=?UTF-8?Q?Carl_F=C3=BCrstenberg?=)
Date: Thu, 31 Dec 2009 02:04:17 +0100
Subject: nla_for_each_nested et al and c++
Message-ID: <91f186a80912301704j4cd843feh5ab1ba00eb548daa@mail.gmail.com>

I noticed that the current nla_for_each_nested macro doesn't work
under c++. (though perhaps you should not use macros under c++ :))

Also, do you have any best practice creating the nla_policy array under c++?
-- 
/Carl F?rstenberg <azatoth at gmail.com>


