aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index d83414d828d8..be98a01253e9 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1465,7 +1465,7 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt)
1465 1465
1466static __inline__ int cbq_dump_rate(struct sk_buff *skb, struct cbq_class *cl) 1466static __inline__ int cbq_dump_rate(struct sk_buff *skb, struct cbq_class *cl)
1467{ 1467{
1468 unsigned char *b = skb->tail; 1468 unsigned char *b = skb_tail_pointer(skb);
1469 1469
1470 RTA_PUT(skb, TCA_CBQ_RATE, sizeof(cl->R_tab->rate), &cl->R_tab->rate); 1470 RTA_PUT(skb, TCA_CBQ_RATE, sizeof(cl->R_tab->rate), &cl->R_tab->rate);
1471 return skb->len; 1471 return skb->len;
@@ -1477,7 +1477,7 @@ rtattr_failure:
1477 1477
1478static __inline__ int cbq_dump_lss(struct sk_buff *skb, struct cbq_class *cl) 1478static __inline__ int cbq_dump_lss(struct sk_buff *skb, struct cbq_class *cl)
1479{ 1479{
1480 unsigned char *b = skb->tail; 1480 unsigned char *b = skb_tail_pointer(skb);
1481 struct tc_cbq_lssopt opt; 1481 struct tc_cbq_lssopt opt;
1482 1482
1483 opt.flags = 0; 1483 opt.flags = 0;
@@ -1502,7 +1502,7 @@ rtattr_failure:
1502 1502
1503static __inline__ int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl) 1503static __inline__ int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl)
1504{ 1504{
1505 unsigned char *b = skb->tail; 1505 unsigned char *b = skb_tail_pointer(skb);
1506 struct tc_cbq_wrropt opt; 1506 struct tc_cbq_wrropt opt;
1507 1507
1508 opt.flags = 0; 1508 opt.flags = 0;
@@ -1520,7 +1520,7 @@ rtattr_failure:
1520 1520
1521static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl) 1521static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl)
1522{ 1522{
1523 unsigned char *b = skb->tail; 1523 unsigned char *b = skb_tail_pointer(skb);
1524 struct tc_cbq_ovl opt; 1524 struct tc_cbq_ovl opt;
1525 1525
1526 opt.strategy = cl->ovl_strategy; 1526 opt.strategy = cl->ovl_strategy;
@@ -1537,7 +1537,7 @@ rtattr_failure:
1537 1537
1538static __inline__ int cbq_dump_fopt(struct sk_buff *skb, struct cbq_class *cl) 1538static __inline__ int cbq_dump_fopt(struct sk_buff *skb, struct cbq_class *cl)
1539{ 1539{
1540 unsigned char *b = skb->tail; 1540 unsigned char *b = skb_tail_pointer(skb);
1541 struct tc_cbq_fopt opt; 1541 struct tc_cbq_fopt opt;
1542 1542
1543 if (cl->split || cl->defmap) { 1543 if (cl->split || cl->defmap) {
@@ -1556,7 +1556,7 @@ rtattr_failure:
1556#ifdef CONFIG_NET_CLS_POLICE 1556#ifdef CONFIG_NET_CLS_POLICE
1557static __inline__ int cbq_dump_police(struct sk_buff *skb, struct cbq_class *cl) 1557static __inline__ int cbq_dump_police(struct sk_buff *skb, struct cbq_class *cl)
1558{ 1558{
1559 unsigned char *b = skb->tail; 1559 unsigned char *b = skb_tail_pointer(skb);
1560 struct tc_cbq_police opt; 1560 struct tc_cbq_police opt;
1561 1561
1562 if (cl->police) { 1562 if (cl->police) {
@@ -1590,14 +1590,14 @@ static int cbq_dump_attr(struct sk_buff *skb, struct cbq_class *cl)
1590static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb) 1590static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb)
1591{ 1591{
1592 struct cbq_sched_data *q = qdisc_priv(sch); 1592 struct cbq_sched_data *q = qdisc_priv(sch);
1593 unsigned char *b = skb->tail; 1593 unsigned char *b = skb_tail_pointer(skb);
1594 struct rtattr *rta; 1594 struct rtattr *rta;
1595 1595
1596 rta = (struct rtattr*)b; 1596 rta = (struct rtattr*)b;
1597 RTA_PUT(skb, TCA_OPTIONS, 0, NULL); 1597 RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
1598 if (cbq_dump_attr(skb, &q->link) < 0) 1598 if (cbq_dump_attr(skb, &q->link) < 0)
1599 goto rtattr_failure; 1599 goto rtattr_failure;
1600 rta->rta_len = skb->tail - b; 1600 rta->rta_len = skb_tail_pointer(skb) - b;
1601 return skb->len; 1601 return skb->len;
1602 1602
1603rtattr_failure: 1603rtattr_failure:
@@ -1619,7 +1619,7 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg,
1619 struct sk_buff *skb, struct tcmsg *tcm) 1619 struct sk_buff *skb, struct tcmsg *tcm)
1620{ 1620{
1621 struct cbq_class *cl = (struct cbq_class*)arg; 1621 struct cbq_class *cl = (struct cbq_class*)arg;
1622 unsigned char *b = skb->tail; 1622 unsigned char *b = skb_tail_pointer(skb);
1623 struct rtattr *rta; 1623 struct rtattr *rta;
1624 1624
1625 if (cl->tparent) 1625 if (cl->tparent)
@@ -1633,7 +1633,7 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg,
1633 RTA_PUT(skb, TCA_OPTIONS, 0, NULL); 1633 RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
1634 if (cbq_dump_attr(skb, cl) < 0) 1634 if (cbq_dump_attr(skb, cl) < 0)
1635 goto rtattr_failure; 1635 goto rtattr_failure;
1636 rta->rta_len = skb->tail - b; 1636 rta->rta_len = skb_tail_pointer(skb) - b;
1637 return skb->len; 1637 return skb->len;
1638 1638
1639rtattr_failure: 1639rtattr_failure: