[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ecvtf7y9.fsf@nvidia.com>
Date: Mon, 9 Jun 2025 15:39:36 +0200
From: Petr Machata <petrm@...dia.com>
To: Nikolay Aleksandrov <razor@...ckwall.org>
CC: Petr Machata <petrm@...dia.com>, David Ahern <dsahern@...il.com>,
<netdev@...r.kernel.org>, Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH iproute2-next 3/4] lib: bridge: Add a module for
bridge-related helpers
Nikolay Aleksandrov <razor@...ckwall.org> writes:
> On 6/6/25 18:04, Petr Machata wrote:
>> `ip stats' displays a range of bridge_slave-related statistics, but not
>> the VLAN stats. `bridge vlan' actually has code to show these. Extract the
>> code to libutil so that it can be reused between the bridge and ip stats
>> tools.
>> Rename them reasonably so as not to litter the global namespace.
>> Signed-off-by: Petr Machata <petrm@...dia.com>
>> ---
>> bridge/vlan.c | 50 +++++-------------------------------------------
>> include/bridge.h | 11 +++++++++++
>> lib/Makefile | 3 ++-
>> lib/bridge.c | 47 +++++++++++++++++++++++++++++++++++++++++++++
>> 4 files changed, 65 insertions(+), 46 deletions(-)
>> create mode 100644 include/bridge.h
>> create mode 100644 lib/bridge.c
>>
>
> lol, Ido didn't we just have a discussion in another thread about adding
> a bridge lib? :-)
>
> https://www.spinics.net/lists/netdev/msg1096403.html
>
> I'm not strictly against adding a lib, I think this approach might
> actually save us from the tools going out of sync and we can avoid
> repeating to people they have to update both places when they forget.
Fun. I really think reuse is better in this case. Or, you know, by and
large. But particularly having both bridge and ip stats give the data
with the same structure is valuable. But y'all's call.
Powered by blists - more mailing lists