[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fff2eb0-6c82-ff50-481f-0636fecd0431@gmail.com>
Date: Wed, 10 Jan 2018 11:12:44 -0700
From: David Ahern <dsahern@...il.com>
To: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc: davem@...emloft.net, jhs@...atatu.com, xiyou.wangcong@...il.com,
mlxsw@...lanox.com, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, f.fainelli@...il.com,
michael.chan@...adcom.com, ganeshgr@...lsio.com,
saeedm@...lanox.com, matanb@...lanox.com, leonro@...lanox.com,
idosch@...lanox.com, jakub.kicinski@...ronome.com,
simon.horman@...ronome.com, pieter.jansenvanvuuren@...ronome.com,
john.hurley@...ronome.com, alexander.h.duyck@...el.com,
ogerlitz@...lanox.com, john.fastabend@...il.com,
daniel@...earbox.net
Subject: Re: [patch net-next v7 07/13] net: sched: use block index as a handle
instead of qdisc when block is shared
On 1/9/18 7:07 AM, Jiri Pirko wrote:
> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
> index 843e29a..9c026d9 100644
> --- a/include/uapi/linux/rtnetlink.h
> +++ b/include/uapi/linux/rtnetlink.h
> @@ -541,9 +541,15 @@ struct tcmsg {
> int tcm_ifindex;
> __u32 tcm_handle;
> __u32 tcm_parent;
> +/* tcm_block_index is used instead of tcm_parent
> + * in case tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK
> + */
> +#define tcm_block_index tcm_parent
> __u32 tcm_info;
> };
>
> +#define TCM_IFINDEX_MAGIC_BLOCK (0xFFFFFFFFU)
> +
> enum {
> TCA_UNSPEC,
> TCA_KIND,
This could be more clearly documented for anyone wanting to write an app
against the API. Something like:
For shared blocks, tcm_ifindex is set to TCM_IFINDEX_MAGIC_BLOCK, and
tcm_parent is aliased to tcm_block_index which is the block index.
Powered by blists - more mailing lists