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

Thomas Haller thaller at redhat.com
Tue Jul 29 16:10:27 PDT 2014


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?

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140730/2f48f5c6/attachment.sig>


More information about the libnl mailing list