[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f39ce7bb-edea-0325-1bc4-408ce9a410a5@kernel.org>
Date: Thu, 22 Sep 2022 15:41:59 -0700
From: David Ahern <dsahern@...nel.org>
To: Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH v3 iproute2-next] ip link: add sub-command to view and
change DSA conduit interface
On 9/22/22 4:06 PM, Vladimir Oltean wrote:
> Support the "dsa" kind of rtnl_link_ops exported by the kernel, and
> export reads/writes to IFLA_DSA_MASTER.
>
> Examples:
>
> $ ip link set swp0 type dsa conduit eth1
>
> $ ip -d link show dev swp0
> (...)
> dsa conduit eth0
>
> $ ip -d -j link show swp0
> [
> {
> "link": "eth1",
> "linkinfo": {
> "info_kind": "dsa",
> "info_data": {
> "conduit": "eth1"
> }
> },
> }
> ]
>
> Note that by construction and as shown in the example, the IFLA_LINK
> reported by a DSA user port is identical to what is reported through
> IFLA_DSA_MASTER. However IFLA_LINK is not writable, and overloading its
> meaning to make it writable would clash with other users of IFLA_LINK
> (vlan etc) for which writing this property does not make sense.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> v1->v2:
> - update man page
> v2->v3:
> - update main ip-link help text to print the new 'dsa' link type
> - rename the 'master' keyword to 'conduit' and keep 'master' as a
> fallback
> - to avoid using the 'DSA master' term in the man page, stop explaining
> which interfaces are eligible for this operation, and just refer to
> the kernel documentation. Note that since the support was added in
> net-next, the htmldocs have not been regenerated yet.
>
> include/uapi/linux/if_link.h | 10 ++++++
> ip/Makefile | 2 +-
> ip/iplink.c | 2 +-
> ip/iplink_dsa.c | 68 ++++++++++++++++++++++++++++++++++++
> man/man8/ip-link.8.in | 35 +++++++++++++++++++
> 5 files changed, 115 insertions(+), 2 deletions(-)
> create mode 100644 ip/iplink_dsa.c
>
LGTM.
Powered by blists - more mailing lists