• Thomas Graf's avatar
    [PKT_SCHED]: Add net/sch_generic.h with generic sched definitions. · 7f265570
    Thomas Graf authored
    Adds net/sch_generic.h containing all bits directly referenced by
    schedulers and classifiers. Map of users:
    
    Group 1)
     struct qdisc_rate_table         sch_*, tcf_police -> cls_*
    
       Could theoretically be moved to pkt_sched.h with Patch 4
       but the long term goal it so make net/act_api.h to being
       dependent on net/pkt_sched.h
    
    Group 2)
     struct Qdisc                    sch_*, tcf_proto -> cls_*
     struct Qdisc_ops                sch_*, tcf_proto -> cls_*
     struct Qdisc_class_ops          sch_*, tcf_proto -> cls_*
     struct tcf_proto_ops            sch_*, cls_*
     struct tcf_proto                sch_*, cls_*
    
       Obviously used by schedulers but also by classifiers to
       bind classes (tcf_proto -> Qdisc -> Qdisc_ops ->
       Qdisc_class_ops). tcf_proto OTOH is used by schedulers,
       (neat cross usage).
    
    Group 3)
     struct tcf_result               sch_*, cls_*
    
       Used to communicate between scheduler and classifer
       to report classify result.
     
    Group 4)
     sch_tree_(un)lock               sch_*, cls_*
     tcf_tree_(un)lock               sch_*, cls_*
     qdisc(un)lock_tree              sch_*, cls_*
       
       Randomly used in schedulers and classifiers.
     
    Group 5)
     tcf_destroy                     sch_*, cls_api.c
    
       Coud theoretically be moved to pkt_sched.h if we include
       pkt_sched.h in cls_api.c but this is really generic and
       it seemd cleaner to have it here. This would be the only
       classifier related action in pkt_sched.h
    
    The following types are referenced in sch_generic.h but defined in
    either pkt_cls.h or pkt_sched.h because they will never be used
    by the other side:
    
      - qdisc_walker (pkt_sched.h)
      - tcf_walker (pkt_cls.h)
    Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7f265570
sch_generic.h 4.27 KB