All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] net sched: Added the TC_LINKLAYER_CUSTOM linklayer type
@ 2017-07-04  0:14 McCabe, Robert J
  2017-07-04  0:14 ` [PATCH 1/1] tc: custom qdisc pkt size translation table McCabe, Robert J
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: McCabe, Robert J @ 2017-07-04  0:14 UTC (permalink / raw)
  To: netdev; +Cc: robert.mccabe, McCabe, Robert J, McCabe

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

Signed-off-by: McCabe, Robert J <Robert.McCabe@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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-07-06  9:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04  0:14 [PATCH 1/1] net sched: Added the TC_LINKLAYER_CUSTOM linklayer type McCabe, Robert J
2017-07-04  0:14 ` [PATCH 1/1] tc: custom qdisc pkt size translation table McCabe, Robert J
2017-07-04  5:48 ` [PATCH 1/1] net sched: Added the TC_LINKLAYER_CUSTOM linklayer type Jiri Pirko
2017-07-04 14:49   ` Robert McCabe
2017-07-04 15:34     ` Jiri Pirko
2017-07-04 15:40       ` Jiri Pirko
2017-07-04 17:12         ` Robert McCabe
2017-07-05  7:01           ` Jiri Pirko
2017-07-06  9:03 ` David Laight

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.