[PATCH] qdisc: add hfsc qdisc support

Thomas Graf tgraf at suug.ch
Mon Jul 28 14:24:25 PDT 2014


On 07/28/14 at 09:49am, Cong Wang wrote:
> On Sat, Jul 26, 2014 at 8:22 AM, Thomas Haller <thaller at redhat.com> wrote:
> > Hi Cong,
> >
> >
> >
> >
> >> diff --git a/include/netlink/route/qdisc/hfsc.h b/include/netlink/route/qdisc/hfsc.h
> >> new file mode 100644
> >> index 0000000..7cf1c76
> >> --- /dev/null
> >> +extern uint32_t      rtnl_hfsc_get_defcls(struct rtnl_qdisc *);
> >> +extern int   rtnl_hfsc_set_defcls(struct rtnl_qdisc *, uint32_t);
> >> +
> >> +extern int rtnl_hfsc_get_rsc(struct rtnl_class *class, struct tc_service_curve *tsc);
> >> +extern int rtnl_hfsc_set_rsc(struct rtnl_class *class, const struct tc_service_curve *tsc);
> >> +extern int rtnl_hfsc_get_fsc(struct rtnl_class *class, struct tc_service_curve *tsc);
> >> +extern int rtnl_hfsc_set_fsc(struct rtnl_class *class, const struct tc_service_curve *tsc);
> >> +extern int rtnl_hfsc_get_usc(struct rtnl_class *class, struct tc_service_curve *tsc);
> >> +extern int rtnl_hfsc_set_usc(struct rtnl_class *class, const struct tc_service_curve *tsc);
> >
> >
> > I wonder, is it correct that all functions have rtnl_hfsc_* as prefix,
> > but some operate on rtnl_qdisc, others on rtnl_class.
> >
> > How about a separate prefix for the function names?
> >
> 
> I am fine with your suggestion, just want to point out that
> htb API has the same problem. :)

I agree that Thomas's suggestion is cleaner. Personally I can live
with both variants. The qdisc/class overlap will always be a slight
API mess if we want to avoid duplicating a lot of code.



More information about the libnl mailing list