From: Jiri Pirko <jiri@resnulli.us>
To: "McCabe, Robert J" <Robert.McCabe@rockwellcollins.com>
Cc: netdev@vger.kernel.org, McCabe@rockwellcollins.com
Subject: Re: [PATCH 1/1] net sched: Added the TC_LINKLAYER_CUSTOM linklayer type
Date: Tue, 4 Jul 2017 07:48:32 +0200 [thread overview]
Message-ID: <20170704054832.GA1865@nanopsycho> (raw)
In-Reply-To: <20170704001426.9268-1-Robert.McCabe@rockwellcollins.com>
Tue, Jul 04, 2017 at 02:14:25AM CEST, Robert.McCabe@rockwellcollins.com wrote:
>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;
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
>
next prev parent reply other threads:[~2017-07-04 5:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jiri Pirko [this message]
2017-07-04 14:49 ` [PATCH 1/1] net sched: Added the TC_LINKLAYER_CUSTOM linklayer type 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170704054832.GA1865@nanopsycho \
--to=jiri@resnulli.us \
--cc=McCabe@rockwellcollins.com \
--cc=Robert.McCabe@rockwellcollins.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).