diff options
| author | Jiri Pirko <jiri@mellanox.com> | 2017-08-04 08:28:56 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-08-04 14:21:23 -0400 |
| commit | f7ebdff7575c3a5c099c8b1d661b0a65f4c6f10f (patch) | |
| tree | dfff639ed8612e31e52b61e1941fdf007116782c /net/sched | |
| parent | 967b2e2a76e380abdebe7f3c7ab17e8831accd21 (diff) | |
net: sched: sch_atm: use Qdisc_class_common structure
Even if it is only for classid now, use this common struct a be aligned
with the rest of the classful qdiscs.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
| -rw-r--r-- | net/sched/sch_atm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 572fe2584e48..0af4b1c6f674 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #define VCC2FLOW(vcc) ((struct atm_flow_data *) ((vcc)->user_back)) | 41 | #define VCC2FLOW(vcc) ((struct atm_flow_data *) ((vcc)->user_back)) |
| 42 | 42 | ||
| 43 | struct atm_flow_data { | 43 | struct atm_flow_data { |
| 44 | struct Qdisc_class_common common; | ||
| 44 | struct Qdisc *q; /* FIFO, TBF, etc. */ | 45 | struct Qdisc *q; /* FIFO, TBF, etc. */ |
| 45 | struct tcf_proto __rcu *filter_list; | 46 | struct tcf_proto __rcu *filter_list; |
| 46 | struct tcf_block *block; | 47 | struct tcf_block *block; |
| @@ -49,7 +50,6 @@ struct atm_flow_data { | |||
| 49 | struct sk_buff *skb); /* chaining */ | 50 | struct sk_buff *skb); /* chaining */ |
| 50 | struct atm_qdisc_data *parent; /* parent qdisc */ | 51 | struct atm_qdisc_data *parent; /* parent qdisc */ |
| 51 | struct socket *sock; /* for closing */ | 52 | struct socket *sock; /* for closing */ |
| 52 | u32 classid; /* x:y type ID */ | ||
| 53 | int ref; /* reference count */ | 53 | int ref; /* reference count */ |
| 54 | struct gnet_stats_basic_packed bstats; | 54 | struct gnet_stats_basic_packed bstats; |
| 55 | struct gnet_stats_queue qstats; | 55 | struct gnet_stats_queue qstats; |
| @@ -75,7 +75,7 @@ static inline struct atm_flow_data *lookup_flow(struct Qdisc *sch, u32 classid) | |||
| 75 | struct atm_flow_data *flow; | 75 | struct atm_flow_data *flow; |
| 76 | 76 | ||
| 77 | list_for_each_entry(flow, &p->flows, list) { | 77 | list_for_each_entry(flow, &p->flows, list) { |
| 78 | if (flow->classid == classid) | 78 | if (flow->common.classid == classid) |
| 79 | return flow; | 79 | return flow; |
| 80 | } | 80 | } |
| 81 | return NULL; | 81 | return NULL; |
| @@ -293,7 +293,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
| 293 | flow->old_pop = flow->vcc->pop; | 293 | flow->old_pop = flow->vcc->pop; |
| 294 | flow->parent = p; | 294 | flow->parent = p; |
| 295 | flow->vcc->pop = sch_atm_pop; | 295 | flow->vcc->pop = sch_atm_pop; |
| 296 | flow->classid = classid; | 296 | flow->common.classid = classid; |
| 297 | flow->ref = 1; | 297 | flow->ref = 1; |
| 298 | flow->excess = excess; | 298 | flow->excess = excess; |
| 299 | list_add(&flow->list, &p->link.list); | 299 | list_add(&flow->list, &p->link.list); |
| @@ -549,7 +549,7 @@ static int atm_tc_init(struct Qdisc *sch, struct nlattr *opt) | |||
| 549 | 549 | ||
| 550 | p->link.vcc = NULL; | 550 | p->link.vcc = NULL; |
| 551 | p->link.sock = NULL; | 551 | p->link.sock = NULL; |
| 552 | p->link.classid = sch->handle; | 552 | p->link.common.classid = sch->handle; |
| 553 | p->link.ref = 1; | 553 | p->link.ref = 1; |
| 554 | tasklet_init(&p->task, sch_atm_dequeue, (unsigned long)sch); | 554 | tasklet_init(&p->task, sch_atm_dequeue, (unsigned long)sch); |
| 555 | return 0; | 555 | return 0; |
| @@ -594,7 +594,7 @@ static int atm_tc_dump_class(struct Qdisc *sch, unsigned long cl, | |||
| 594 | sch, p, flow, skb, tcm); | 594 | sch, p, flow, skb, tcm); |
| 595 | if (list_empty(&flow->list)) | 595 | if (list_empty(&flow->list)) |
| 596 | return -EINVAL; | 596 | return -EINVAL; |
| 597 | tcm->tcm_handle = flow->classid; | 597 | tcm->tcm_handle = flow->common.classid; |
| 598 | tcm->tcm_info = flow->q->handle; | 598 | tcm->tcm_info = flow->q->handle; |
| 599 | 599 | ||
| 600 | nest = nla_nest_start(skb, TCA_OPTIONS); | 600 | nest = nla_nest_start(skb, TCA_OPTIONS); |
| @@ -619,7 +619,7 @@ static int atm_tc_dump_class(struct Qdisc *sch, unsigned long cl, | |||
| 619 | goto nla_put_failure; | 619 | goto nla_put_failure; |
| 620 | } | 620 | } |
| 621 | if (flow->excess) { | 621 | if (flow->excess) { |
| 622 | if (nla_put_u32(skb, TCA_ATM_EXCESS, flow->classid)) | 622 | if (nla_put_u32(skb, TCA_ATM_EXCESS, flow->common.classid)) |
| 623 | goto nla_put_failure; | 623 | goto nla_put_failure; |
| 624 | } else { | 624 | } else { |
| 625 | if (nla_put_u32(skb, TCA_ATM_EXCESS, 0)) | 625 | if (nla_put_u32(skb, TCA_ATM_EXCESS, 0)) |
