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.