[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170704054832.GA1865@nanopsycho>
Date: Tue, 4 Jul 2017 07:48:32 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: "McCabe, Robert J" <Robert.McCabe@...kwellcollins.com>
Cc: netdev@...r.kernel.org, McCabe@...kwellcollins.com
Subject: Re: [PATCH 1/1] net sched: Added the TC_LINKLAYER_CUSTOM linklayer
type
Tue, Jul 04, 2017 at 02:14:25AM CEST, Robert.McCabe@...kwellcollins.com wrote:
>This is to support user-space modification of the qdisc stab.
>
>Signed-off-by: McCabe, Robert J <Robert.McCabe@...kwellcollins.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;
You dump stab->data to user. How is this related to TC_LINKLAYER_CUSTOM
and howcome this "is to support user-space modification of the qdisc
stab" as your description says? I'm confused...
> nla_nest_end(skb, nest);
>
> return skb->len;
>--
>2.7.4
>
Powered by blists - more mailing lists