This is to support user-space modification of the qdisc stab.

Signed-off-by: McCabe, Robert J <robert.mcc...@rockwellcollins.com>
---
 include/uapi/linux/pkt_sched.h | 1 +
 net/sched/sch_api.c            | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 099bf55..289bb81 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -82,6 +82,7 @@ enum tc_link_layer {
        TC_LINKLAYER_UNAWARE, /* Indicate unaware old iproute2 util */
        TC_LINKLAYER_ETHERNET,
        TC_LINKLAYER_ATM,
+       TC_LINKLAYER_CUSTOM,
 };
 #define TC_LINKLAYER_MASK 0x0F /* limit use to lower 4 bits */
 
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 43b94c7..174a925 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -533,6 +533,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct 
qdisc_size_table *stab)
                goto nla_put_failure;
        if (nla_put(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts))
                goto nla_put_failure;
+       if (nla_put(skb, TCA_STAB_DATA, sizeof(stab->szopts)*sizeof(u16), 
&stab->data))
+               goto nla_put_failure;
        nla_nest_end(skb, nest);
 
        return skb->len;
-- 
2.7.4

Reply via email to