diff options
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r-- | net/sched/sch_cbq.c | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index bea123fc24a4..5c8667ef4ba7 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -1377,24 +1377,24 @@ static int cbq_set_fopt(struct cbq_class *cl, struct tc_cbq_fopt *fopt) | |||
1377 | return 0; | 1377 | return 0; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | static int cbq_init(struct Qdisc *sch, struct rtattr *opt) | 1380 | static int cbq_init(struct Qdisc *sch, struct nlattr *opt) |
1381 | { | 1381 | { |
1382 | struct cbq_sched_data *q = qdisc_priv(sch); | 1382 | struct cbq_sched_data *q = qdisc_priv(sch); |
1383 | struct rtattr *tb[TCA_CBQ_MAX]; | 1383 | struct nlattr *tb[TCA_CBQ_MAX + 1]; |
1384 | struct tc_ratespec *r; | 1384 | struct tc_ratespec *r; |
1385 | 1385 | ||
1386 | if (rtattr_parse_nested(tb, TCA_CBQ_MAX, opt) < 0 || | 1386 | if (nla_parse_nested(tb, TCA_CBQ_MAX, opt, NULL) < 0 || |
1387 | tb[TCA_CBQ_RTAB-1] == NULL || tb[TCA_CBQ_RATE-1] == NULL || | 1387 | tb[TCA_CBQ_RTAB] == NULL || tb[TCA_CBQ_RATE] == NULL || |
1388 | RTA_PAYLOAD(tb[TCA_CBQ_RATE-1]) < sizeof(struct tc_ratespec)) | 1388 | nla_len(tb[TCA_CBQ_RATE]) < sizeof(struct tc_ratespec)) |
1389 | return -EINVAL; | 1389 | return -EINVAL; |
1390 | 1390 | ||
1391 | if (tb[TCA_CBQ_LSSOPT-1] && | 1391 | if (tb[TCA_CBQ_LSSOPT] && |
1392 | RTA_PAYLOAD(tb[TCA_CBQ_LSSOPT-1]) < sizeof(struct tc_cbq_lssopt)) | 1392 | nla_len(tb[TCA_CBQ_LSSOPT]) < sizeof(struct tc_cbq_lssopt)) |
1393 | return -EINVAL; | 1393 | return -EINVAL; |
1394 | 1394 | ||
1395 | r = RTA_DATA(tb[TCA_CBQ_RATE-1]); | 1395 | r = nla_data(tb[TCA_CBQ_RATE]); |
1396 | 1396 | ||
1397 | if ((q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB-1])) == NULL) | 1397 | if ((q->link.R_tab = qdisc_get_rtab(r, tb[TCA_CBQ_RTAB])) == NULL) |
1398 | return -EINVAL; | 1398 | return -EINVAL; |
1399 | 1399 | ||
1400 | q->link.refcnt = 1; | 1400 | q->link.refcnt = 1; |
@@ -1427,8 +1427,8 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt) | |||
1427 | 1427 | ||
1428 | cbq_link_class(&q->link); | 1428 | cbq_link_class(&q->link); |
1429 | 1429 | ||
1430 | if (tb[TCA_CBQ_LSSOPT-1]) | 1430 | if (tb[TCA_CBQ_LSSOPT]) |
1431 | cbq_set_lss(&q->link, RTA_DATA(tb[TCA_CBQ_LSSOPT-1])); | 1431 | cbq_set_lss(&q->link, nla_data(tb[TCA_CBQ_LSSOPT])); |
1432 | 1432 | ||
1433 | cbq_addprio(q, &q->link); | 1433 | cbq_addprio(q, &q->link); |
1434 | return 0; | 1434 | return 0; |
@@ -1438,10 +1438,10 @@ static __inline__ int cbq_dump_rate(struct sk_buff *skb, struct cbq_class *cl) | |||
1438 | { | 1438 | { |
1439 | unsigned char *b = skb_tail_pointer(skb); | 1439 | unsigned char *b = skb_tail_pointer(skb); |
1440 | 1440 | ||
1441 | RTA_PUT(skb, TCA_CBQ_RATE, sizeof(cl->R_tab->rate), &cl->R_tab->rate); | 1441 | NLA_PUT(skb, TCA_CBQ_RATE, sizeof(cl->R_tab->rate), &cl->R_tab->rate); |
1442 | return skb->len; | 1442 | return skb->len; |
1443 | 1443 | ||
1444 | rtattr_failure: | 1444 | nla_put_failure: |
1445 | nlmsg_trim(skb, b); | 1445 | nlmsg_trim(skb, b); |
1446 | return -1; | 1446 | return -1; |
1447 | } | 1447 | } |
@@ -1463,10 +1463,10 @@ static __inline__ int cbq_dump_lss(struct sk_buff *skb, struct cbq_class *cl) | |||
1463 | opt.minidle = (u32)(-cl->minidle); | 1463 | opt.minidle = (u32)(-cl->minidle); |
1464 | opt.offtime = cl->offtime; | 1464 | opt.offtime = cl->offtime; |
1465 | opt.change = ~0; | 1465 | opt.change = ~0; |
1466 | RTA_PUT(skb, TCA_CBQ_LSSOPT, sizeof(opt), &opt); | 1466 | NLA_PUT(skb, TCA_CBQ_LSSOPT, sizeof(opt), &opt); |
1467 | return skb->len; | 1467 | return skb->len; |
1468 | 1468 | ||
1469 | rtattr_failure: | 1469 | nla_put_failure: |
1470 | nlmsg_trim(skb, b); | 1470 | nlmsg_trim(skb, b); |
1471 | return -1; | 1471 | return -1; |
1472 | } | 1472 | } |
@@ -1481,10 +1481,10 @@ static __inline__ int cbq_dump_wrr(struct sk_buff *skb, struct cbq_class *cl) | |||
1481 | opt.priority = cl->priority+1; | 1481 | opt.priority = cl->priority+1; |
1482 | opt.cpriority = cl->cpriority+1; | 1482 | opt.cpriority = cl->cpriority+1; |
1483 | opt.weight = cl->weight; | 1483 | opt.weight = cl->weight; |
1484 | RTA_PUT(skb, TCA_CBQ_WRROPT, sizeof(opt), &opt); | 1484 | NLA_PUT(skb, TCA_CBQ_WRROPT, sizeof(opt), &opt); |
1485 | return skb->len; | 1485 | return skb->len; |
1486 | 1486 | ||
1487 | rtattr_failure: | 1487 | nla_put_failure: |
1488 | nlmsg_trim(skb, b); | 1488 | nlmsg_trim(skb, b); |
1489 | return -1; | 1489 | return -1; |
1490 | } | 1490 | } |
@@ -1498,10 +1498,10 @@ static __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl) | |||
1498 | opt.priority2 = cl->priority2+1; | 1498 | opt.priority2 = cl->priority2+1; |
1499 | opt.pad = 0; | 1499 | opt.pad = 0; |
1500 | opt.penalty = cl->penalty; | 1500 | opt.penalty = cl->penalty; |
1501 | RTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); | 1501 | NLA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt); |
1502 | return skb->len; | 1502 | return skb->len; |
1503 | 1503 | ||
1504 | rtattr_failure: | 1504 | nla_put_failure: |
1505 | nlmsg_trim(skb, b); | 1505 | nlmsg_trim(skb, b); |
1506 | return -1; | 1506 | return -1; |
1507 | } | 1507 | } |
@@ -1515,11 +1515,11 @@ static __inline__ int cbq_dump_fopt(struct sk_buff *skb, struct cbq_class *cl) | |||
1515 | opt.split = cl->split ? cl->split->classid : 0; | 1515 | opt.split = cl->split ? cl->split->classid : 0; |
1516 | opt.defmap = cl->defmap; | 1516 | opt.defmap = cl->defmap; |
1517 | opt.defchange = ~0; | 1517 | opt.defchange = ~0; |
1518 | RTA_PUT(skb, TCA_CBQ_FOPT, sizeof(opt), &opt); | 1518 | NLA_PUT(skb, TCA_CBQ_FOPT, sizeof(opt), &opt); |
1519 | } | 1519 | } |
1520 | return skb->len; | 1520 | return skb->len; |
1521 | 1521 | ||
1522 | rtattr_failure: | 1522 | nla_put_failure: |
1523 | nlmsg_trim(skb, b); | 1523 | nlmsg_trim(skb, b); |
1524 | return -1; | 1524 | return -1; |
1525 | } | 1525 | } |
@@ -1534,11 +1534,11 @@ static __inline__ int cbq_dump_police(struct sk_buff *skb, struct cbq_class *cl) | |||
1534 | opt.police = cl->police; | 1534 | opt.police = cl->police; |
1535 | opt.__res1 = 0; | 1535 | opt.__res1 = 0; |
1536 | opt.__res2 = 0; | 1536 | opt.__res2 = 0; |
1537 | RTA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt); | 1537 | NLA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt); |
1538 | } | 1538 | } |
1539 | return skb->len; | 1539 | return skb->len; |
1540 | 1540 | ||
1541 | rtattr_failure: | 1541 | nla_put_failure: |
1542 | nlmsg_trim(skb, b); | 1542 | nlmsg_trim(skb, b); |
1543 | return -1; | 1543 | return -1; |
1544 | } | 1544 | } |
@@ -1562,16 +1562,16 @@ static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
1562 | { | 1562 | { |
1563 | struct cbq_sched_data *q = qdisc_priv(sch); | 1563 | struct cbq_sched_data *q = qdisc_priv(sch); |
1564 | unsigned char *b = skb_tail_pointer(skb); | 1564 | unsigned char *b = skb_tail_pointer(skb); |
1565 | struct rtattr *rta; | 1565 | struct nlattr *nla; |
1566 | 1566 | ||
1567 | rta = (struct rtattr*)b; | 1567 | nla = (struct nlattr*)b; |
1568 | RTA_PUT(skb, TCA_OPTIONS, 0, NULL); | 1568 | NLA_PUT(skb, TCA_OPTIONS, 0, NULL); |
1569 | if (cbq_dump_attr(skb, &q->link) < 0) | 1569 | if (cbq_dump_attr(skb, &q->link) < 0) |
1570 | goto rtattr_failure; | 1570 | goto nla_put_failure; |
1571 | rta->rta_len = skb_tail_pointer(skb) - b; | 1571 | nla->nla_len = skb_tail_pointer(skb) - b; |
1572 | return skb->len; | 1572 | return skb->len; |
1573 | 1573 | ||
1574 | rtattr_failure: | 1574 | nla_put_failure: |
1575 | nlmsg_trim(skb, b); | 1575 | nlmsg_trim(skb, b); |
1576 | return -1; | 1576 | return -1; |
1577 | } | 1577 | } |
@@ -1591,7 +1591,7 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg, | |||
1591 | { | 1591 | { |
1592 | struct cbq_class *cl = (struct cbq_class*)arg; | 1592 | struct cbq_class *cl = (struct cbq_class*)arg; |
1593 | unsigned char *b = skb_tail_pointer(skb); | 1593 | unsigned char *b = skb_tail_pointer(skb); |
1594 | struct rtattr *rta; | 1594 | struct nlattr *nla; |
1595 | 1595 | ||
1596 | if (cl->tparent) | 1596 | if (cl->tparent) |
1597 | tcm->tcm_parent = cl->tparent->classid; | 1597 | tcm->tcm_parent = cl->tparent->classid; |
@@ -1600,14 +1600,14 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg, | |||
1600 | tcm->tcm_handle = cl->classid; | 1600 | tcm->tcm_handle = cl->classid; |
1601 | tcm->tcm_info = cl->q->handle; | 1601 | tcm->tcm_info = cl->q->handle; |
1602 | 1602 | ||
1603 | rta = (struct rtattr*)b; | 1603 | nla = (struct nlattr*)b; |
1604 | RTA_PUT(skb, TCA_OPTIONS, 0, NULL); | 1604 | NLA_PUT(skb, TCA_OPTIONS, 0, NULL); |
1605 | if (cbq_dump_attr(skb, cl) < 0) | 1605 | if (cbq_dump_attr(skb, cl) < 0) |
1606 | goto rtattr_failure; | 1606 | goto nla_put_failure; |
1607 | rta->rta_len = skb_tail_pointer(skb) - b; | 1607 | nla->nla_len = skb_tail_pointer(skb) - b; |
1608 | return skb->len; | 1608 | return skb->len; |
1609 | 1609 | ||
1610 | rtattr_failure: | 1610 | nla_put_failure: |
1611 | nlmsg_trim(skb, b); | 1611 | nlmsg_trim(skb, b); |
1612 | return -1; | 1612 | return -1; |
1613 | } | 1613 | } |
@@ -1753,43 +1753,43 @@ static void cbq_put(struct Qdisc *sch, unsigned long arg) | |||
1753 | } | 1753 | } |
1754 | 1754 | ||
1755 | static int | 1755 | static int |
1756 | cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **tca, | 1756 | cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, |
1757 | unsigned long *arg) | 1757 | unsigned long *arg) |
1758 | { | 1758 | { |
1759 | int err; | 1759 | int err; |
1760 | struct cbq_sched_data *q = qdisc_priv(sch); | 1760 | struct cbq_sched_data *q = qdisc_priv(sch); |
1761 | struct cbq_class *cl = (struct cbq_class*)*arg; | 1761 | struct cbq_class *cl = (struct cbq_class*)*arg; |
1762 | struct rtattr *opt = tca[TCA_OPTIONS-1]; | 1762 | struct nlattr *opt = tca[TCA_OPTIONS]; |
1763 | struct rtattr *tb[TCA_CBQ_MAX]; | 1763 | struct nlattr *tb[TCA_CBQ_MAX + 1]; |
1764 | struct cbq_class *parent; | 1764 | struct cbq_class *parent; |
1765 | struct qdisc_rate_table *rtab = NULL; | 1765 | struct qdisc_rate_table *rtab = NULL; |
1766 | 1766 | ||
1767 | if (opt==NULL || rtattr_parse_nested(tb, TCA_CBQ_MAX, opt)) | 1767 | if (opt==NULL || nla_parse_nested(tb, TCA_CBQ_MAX, opt, NULL)) |
1768 | return -EINVAL; | 1768 | return -EINVAL; |
1769 | 1769 | ||
1770 | if (tb[TCA_CBQ_OVL_STRATEGY-1] && | 1770 | if (tb[TCA_CBQ_OVL_STRATEGY] && |
1771 | RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY-1]) < sizeof(struct tc_cbq_ovl)) | 1771 | nla_len(tb[TCA_CBQ_OVL_STRATEGY]) < sizeof(struct tc_cbq_ovl)) |
1772 | return -EINVAL; | 1772 | return -EINVAL; |
1773 | 1773 | ||
1774 | if (tb[TCA_CBQ_FOPT-1] && | 1774 | if (tb[TCA_CBQ_FOPT] && |
1775 | RTA_PAYLOAD(tb[TCA_CBQ_FOPT-1]) < sizeof(struct tc_cbq_fopt)) | 1775 | nla_len(tb[TCA_CBQ_FOPT]) < sizeof(struct tc_cbq_fopt)) |
1776 | return -EINVAL; | 1776 | return -EINVAL; |
1777 | 1777 | ||
1778 | if (tb[TCA_CBQ_RATE-1] && | 1778 | if (tb[TCA_CBQ_RATE] && |
1779 | RTA_PAYLOAD(tb[TCA_CBQ_RATE-1]) < sizeof(struct tc_ratespec)) | 1779 | nla_len(tb[TCA_CBQ_RATE]) < sizeof(struct tc_ratespec)) |
1780 | return -EINVAL; | 1780 | return -EINVAL; |
1781 | 1781 | ||
1782 | if (tb[TCA_CBQ_LSSOPT-1] && | 1782 | if (tb[TCA_CBQ_LSSOPT] && |
1783 | RTA_PAYLOAD(tb[TCA_CBQ_LSSOPT-1]) < sizeof(struct tc_cbq_lssopt)) | 1783 | nla_len(tb[TCA_CBQ_LSSOPT]) < sizeof(struct tc_cbq_lssopt)) |
1784 | return -EINVAL; | 1784 | return -EINVAL; |
1785 | 1785 | ||
1786 | if (tb[TCA_CBQ_WRROPT-1] && | 1786 | if (tb[TCA_CBQ_WRROPT] && |
1787 | RTA_PAYLOAD(tb[TCA_CBQ_WRROPT-1]) < sizeof(struct tc_cbq_wrropt)) | 1787 | nla_len(tb[TCA_CBQ_WRROPT]) < sizeof(struct tc_cbq_wrropt)) |
1788 | return -EINVAL; | 1788 | return -EINVAL; |
1789 | 1789 | ||
1790 | #ifdef CONFIG_NET_CLS_ACT | 1790 | #ifdef CONFIG_NET_CLS_ACT |
1791 | if (tb[TCA_CBQ_POLICE-1] && | 1791 | if (tb[TCA_CBQ_POLICE] && |
1792 | RTA_PAYLOAD(tb[TCA_CBQ_POLICE-1]) < sizeof(struct tc_cbq_police)) | 1792 | nla_len(tb[TCA_CBQ_POLICE]) < sizeof(struct tc_cbq_police)) |
1793 | return -EINVAL; | 1793 | return -EINVAL; |
1794 | #endif | 1794 | #endif |
1795 | 1795 | ||
@@ -1802,8 +1802,8 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t | |||
1802 | return -EINVAL; | 1802 | return -EINVAL; |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | if (tb[TCA_CBQ_RATE-1]) { | 1805 | if (tb[TCA_CBQ_RATE]) { |
1806 | rtab = qdisc_get_rtab(RTA_DATA(tb[TCA_CBQ_RATE-1]), tb[TCA_CBQ_RTAB-1]); | 1806 | rtab = qdisc_get_rtab(nla_data(tb[TCA_CBQ_RATE]), tb[TCA_CBQ_RTAB]); |
1807 | if (rtab == NULL) | 1807 | if (rtab == NULL) |
1808 | return -EINVAL; | 1808 | return -EINVAL; |
1809 | } | 1809 | } |
@@ -1819,45 +1819,45 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t | |||
1819 | qdisc_put_rtab(rtab); | 1819 | qdisc_put_rtab(rtab); |
1820 | } | 1820 | } |
1821 | 1821 | ||
1822 | if (tb[TCA_CBQ_LSSOPT-1]) | 1822 | if (tb[TCA_CBQ_LSSOPT]) |
1823 | cbq_set_lss(cl, RTA_DATA(tb[TCA_CBQ_LSSOPT-1])); | 1823 | cbq_set_lss(cl, nla_data(tb[TCA_CBQ_LSSOPT])); |
1824 | 1824 | ||
1825 | if (tb[TCA_CBQ_WRROPT-1]) { | 1825 | if (tb[TCA_CBQ_WRROPT]) { |
1826 | cbq_rmprio(q, cl); | 1826 | cbq_rmprio(q, cl); |
1827 | cbq_set_wrr(cl, RTA_DATA(tb[TCA_CBQ_WRROPT-1])); | 1827 | cbq_set_wrr(cl, nla_data(tb[TCA_CBQ_WRROPT])); |
1828 | } | 1828 | } |
1829 | 1829 | ||
1830 | if (tb[TCA_CBQ_OVL_STRATEGY-1]) | 1830 | if (tb[TCA_CBQ_OVL_STRATEGY]) |
1831 | cbq_set_overlimit(cl, RTA_DATA(tb[TCA_CBQ_OVL_STRATEGY-1])); | 1831 | cbq_set_overlimit(cl, nla_data(tb[TCA_CBQ_OVL_STRATEGY])); |
1832 | 1832 | ||
1833 | #ifdef CONFIG_NET_CLS_ACT | 1833 | #ifdef CONFIG_NET_CLS_ACT |
1834 | if (tb[TCA_CBQ_POLICE-1]) | 1834 | if (tb[TCA_CBQ_POLICE]) |
1835 | cbq_set_police(cl, RTA_DATA(tb[TCA_CBQ_POLICE-1])); | 1835 | cbq_set_police(cl, nla_data(tb[TCA_CBQ_POLICE])); |
1836 | #endif | 1836 | #endif |
1837 | 1837 | ||
1838 | if (tb[TCA_CBQ_FOPT-1]) | 1838 | if (tb[TCA_CBQ_FOPT]) |
1839 | cbq_set_fopt(cl, RTA_DATA(tb[TCA_CBQ_FOPT-1])); | 1839 | cbq_set_fopt(cl, nla_data(tb[TCA_CBQ_FOPT])); |
1840 | 1840 | ||
1841 | if (cl->q->q.qlen) | 1841 | if (cl->q->q.qlen) |
1842 | cbq_activate_class(cl); | 1842 | cbq_activate_class(cl); |
1843 | 1843 | ||
1844 | sch_tree_unlock(sch); | 1844 | sch_tree_unlock(sch); |
1845 | 1845 | ||
1846 | if (tca[TCA_RATE-1]) | 1846 | if (tca[TCA_RATE]) |
1847 | gen_replace_estimator(&cl->bstats, &cl->rate_est, | 1847 | gen_replace_estimator(&cl->bstats, &cl->rate_est, |
1848 | &sch->dev->queue_lock, | 1848 | &sch->dev->queue_lock, |
1849 | tca[TCA_RATE-1]); | 1849 | tca[TCA_RATE]); |
1850 | return 0; | 1850 | return 0; |
1851 | } | 1851 | } |
1852 | 1852 | ||
1853 | if (parentid == TC_H_ROOT) | 1853 | if (parentid == TC_H_ROOT) |
1854 | return -EINVAL; | 1854 | return -EINVAL; |
1855 | 1855 | ||
1856 | if (tb[TCA_CBQ_WRROPT-1] == NULL || tb[TCA_CBQ_RATE-1] == NULL || | 1856 | if (tb[TCA_CBQ_WRROPT] == NULL || tb[TCA_CBQ_RATE] == NULL || |
1857 | tb[TCA_CBQ_LSSOPT-1] == NULL) | 1857 | tb[TCA_CBQ_LSSOPT] == NULL) |
1858 | return -EINVAL; | 1858 | return -EINVAL; |
1859 | 1859 | ||
1860 | rtab = qdisc_get_rtab(RTA_DATA(tb[TCA_CBQ_RATE-1]), tb[TCA_CBQ_RTAB-1]); | 1860 | rtab = qdisc_get_rtab(nla_data(tb[TCA_CBQ_RATE]), tb[TCA_CBQ_RTAB]); |
1861 | if (rtab == NULL) | 1861 | if (rtab == NULL) |
1862 | return -EINVAL; | 1862 | return -EINVAL; |
1863 | 1863 | ||
@@ -1912,8 +1912,8 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t | |||
1912 | cl->share = cl->tparent; | 1912 | cl->share = cl->tparent; |
1913 | cbq_adjust_levels(parent); | 1913 | cbq_adjust_levels(parent); |
1914 | cl->minidle = -0x7FFFFFFF; | 1914 | cl->minidle = -0x7FFFFFFF; |
1915 | cbq_set_lss(cl, RTA_DATA(tb[TCA_CBQ_LSSOPT-1])); | 1915 | cbq_set_lss(cl, nla_data(tb[TCA_CBQ_LSSOPT])); |
1916 | cbq_set_wrr(cl, RTA_DATA(tb[TCA_CBQ_WRROPT-1])); | 1916 | cbq_set_wrr(cl, nla_data(tb[TCA_CBQ_WRROPT])); |
1917 | if (cl->ewma_log==0) | 1917 | if (cl->ewma_log==0) |
1918 | cl->ewma_log = q->link.ewma_log; | 1918 | cl->ewma_log = q->link.ewma_log; |
1919 | if (cl->maxidle==0) | 1919 | if (cl->maxidle==0) |
@@ -1921,19 +1921,19 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t | |||
1921 | if (cl->avpkt==0) | 1921 | if (cl->avpkt==0) |
1922 | cl->avpkt = q->link.avpkt; | 1922 | cl->avpkt = q->link.avpkt; |
1923 | cl->overlimit = cbq_ovl_classic; | 1923 | cl->overlimit = cbq_ovl_classic; |
1924 | if (tb[TCA_CBQ_OVL_STRATEGY-1]) | 1924 | if (tb[TCA_CBQ_OVL_STRATEGY]) |
1925 | cbq_set_overlimit(cl, RTA_DATA(tb[TCA_CBQ_OVL_STRATEGY-1])); | 1925 | cbq_set_overlimit(cl, nla_data(tb[TCA_CBQ_OVL_STRATEGY])); |
1926 | #ifdef CONFIG_NET_CLS_ACT | 1926 | #ifdef CONFIG_NET_CLS_ACT |
1927 | if (tb[TCA_CBQ_POLICE-1]) | 1927 | if (tb[TCA_CBQ_POLICE]) |
1928 | cbq_set_police(cl, RTA_DATA(tb[TCA_CBQ_POLICE-1])); | 1928 | cbq_set_police(cl, nla_data(tb[TCA_CBQ_POLICE])); |
1929 | #endif | 1929 | #endif |
1930 | if (tb[TCA_CBQ_FOPT-1]) | 1930 | if (tb[TCA_CBQ_FOPT]) |
1931 | cbq_set_fopt(cl, RTA_DATA(tb[TCA_CBQ_FOPT-1])); | 1931 | cbq_set_fopt(cl, nla_data(tb[TCA_CBQ_FOPT])); |
1932 | sch_tree_unlock(sch); | 1932 | sch_tree_unlock(sch); |
1933 | 1933 | ||
1934 | if (tca[TCA_RATE-1]) | 1934 | if (tca[TCA_RATE]) |
1935 | gen_new_estimator(&cl->bstats, &cl->rate_est, | 1935 | gen_new_estimator(&cl->bstats, &cl->rate_est, |
1936 | &sch->dev->queue_lock, tca[TCA_RATE-1]); | 1936 | &sch->dev->queue_lock, tca[TCA_RATE]); |
1937 | 1937 | ||
1938 | *arg = (unsigned long)cl; | 1938 | *arg = (unsigned long)cl; |
1939 | return 0; | 1939 | return 0; |