[Patch v2 1/2] tc: save error code for rtnl_tc_data_check()

Thomas Graf tgraf at suug.ch
Tue Jul 29 16:32:58 PDT 2014


On 07/30/14 at 01:10am, Thomas Haller wrote:
> On Mon, 2014-07-28 at 15:21 -0700, Cong Wang wrote:
> > Cc: Thomas Graf <tgraf at suug.ch>
> > Cc: Thomas Haller <thaller at redhat.com>
> > Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
> > ---
> >  include/netlink-private/route/tc-api.h |  2 +-
> >  lib/route/qdisc/htb.c                  | 80 ++++++++++++++++++++--------------
> >  lib/route/tc.c                         | 15 ++++++-
> >  3 files changed, 61 insertions(+), 36 deletions(-)
> 
> 
> Hi Cong,
> 
> 
> rtnl_tc_data_check() failing with NLE_OPNOTSUPP also calls APPBUG().
> It's a bit strange, either the function can be called with wrong type
> (then the library should to write to stderr), or it cannot (then no need
> for NLE_OPNOTSUPP, the caller has a bug).
> 
> Maybe it makes sense to remove APPBUG() too?
> 
> 
> 
> But anyway, that is a bit philosophical. I am fine with the two patches
> as they are now.
> 
> 
> 
> 
> 
>   * have a level of one less than their parent.
>   *
> - * @return Level or -NLE_OPNOTSUPP
> + * @return Level or a negative error code
>   */
>  int rtnl_htb_get_level(struct rtnl_class *class)
>  {
> 
> the doc is now wrong (no need to sent a new patch only for this. I will
> fix it up before merging, if you don't mind).
> 
> 
> @Thomas, ACK?

Acked-by: Thomas Graf <tgraf at suug.ch>



More information about the libnl mailing list