Re: [PATCH net-next 13/13] net: sched: add flags to Qdisc class ops struct
On Fri 07 Sep 2018 at 19:50, Cong Wang wrote: > On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: >> >> Extend Qdisc_class_ops with flags. Create enum to hold possible class ops >> flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED >> to indicate that class ops functions can be called without taking rtnl >> lock. > > We don't add anything that is not used. > > This is the last patch in this series, so I am pretty sure you split > it in a wrong way, it certainly belongs to next series, not this series. Will do. Thank you for reviewing my code!
Re: [PATCH net-next 13/13] net: sched: add flags to Qdisc class ops struct
On Thu, Sep 6, 2018 at 12:59 AM Vlad Buslov wrote: > > Extend Qdisc_class_ops with flags. Create enum to hold possible class ops > flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED > to indicate that class ops functions can be called without taking rtnl > lock. We don't add anything that is not used. This is the last patch in this series, so I am pretty sure you split it in a wrong way, it certainly belongs to next series, not this series.
[PATCH net-next 13/13] net: sched: add flags to Qdisc class ops struct
Extend Qdisc_class_ops with flags. Create enum to hold possible class ops flag values. Add first class ops flags value QDISC_CLASS_OPS_DOIT_UNLOCKED to indicate that class ops functions can be called without taking rtnl lock. Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko --- include/net/sch_generic.h | 8 1 file changed, 8 insertions(+) diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 2b87b47c49f6..bc4082961726 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -174,6 +174,7 @@ static inline int qdisc_avail_bulklimit(const struct netdev_queue *txq) } struct Qdisc_class_ops { + unsigned intflags; /* Child qdisc manipulation */ struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); int (*graft)(struct Qdisc *, unsigned long cl, @@ -205,6 +206,13 @@ struct Qdisc_class_ops { struct gnet_dump *); }; +/* Qdisc_class_ops flag values */ + +/* Implements API that doesn't require rtnl lock */ +enum qdisc_class_ops_flags { + QDISC_CLASS_OPS_DOIT_UNLOCKED = 1, +}; + struct Qdisc_ops { struct Qdisc_ops*next; const struct Qdisc_class_ops*cl_ops; -- 2.7.5