[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0501MB21433A4491732D03F13F84E8AB100@VI1PR0501MB2143.eurprd05.prod.outlook.com>
Date: Tue, 9 Jan 2018 06:44:35 +0000
From: Chris Mi <chrism@...lanox.com>
To: David Ahern <dsahern@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "gerlitz.or@...il.com" <gerlitz.or@...il.com>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"marcelo.leitner@...il.com" <marcelo.leitner@...il.com>
Subject: RE: [patch iproute2 v6 1/3] lib/libnetlink: Add a function
rtnl_talk_msg
> -----Original Message-----
> From: David Ahern [mailto:dsahern@...il.com]
> Sent: Saturday, January 6, 2018 1:51 AM
> To: Chris Mi <chrism@...lanox.com>; netdev@...r.kernel.org
> Cc: gerlitz.or@...il.com; stephen@...workplumber.org;
> marcelo.leitner@...il.com
> Subject: Re: [patch iproute2 v6 1/3] lib/libnetlink: Add a function
> rtnl_talk_msg
>
> On 1/4/18 12:34 AM, Chris Mi wrote:
> > rtnl_talk can only send a single message to kernel. Add a new function
> > rtnl_talk_msg that can send multiple messages to kernel.
> >
> > Signed-off-by: Chris Mi <chrism@...lanox.com>
> > ---
> > include/libnetlink.h | 3 +++
> > lib/libnetlink.c | 66 ++++++++++++++++++++++++++++++++++++++----
> ----------
> > 2 files changed, 51 insertions(+), 18 deletions(-)
> >
>
> I think you should add an argument to rtnl_talk_msg to return the number of
> messages processed. That can be used to refine which line failed. As batch
> size increases the current design puts the burden on the user to scan a lot of
> lines to find the one that fails:
>
> tc -b tc.batch -bs 50
> RTNETLINK answers: File exists
> We have an error talking to the kernel, -1 Command failed tc.batch:2-51
>
> We should be able to tell them exactly which line failed.
Done.
>
> Also, it would be better to call this rtnl_talk_iov, take an iov as an argument
> and have a common rtnl_talk_msg for existing code and this new one.
>
> As it stands you are having to add:
> struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK };
>
> to tc functions when it really only needs to know about iov's.
Done.
Powered by blists - more mailing lists