[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51dd35c9-ff5b-5b11-04d1-9a5ae9466780@blackwall.org>
Date: Thu, 30 Nov 2023 11:06:27 +0200
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Feng zhou <zhoufeng.zf@...edance.com>, daniel@...earbox.net,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, yangzhenze@...edance.com,
wangdongdong.6@...edance.com, tangchen.1@...edance.com
Subject: Re: [PATCH bpf-next] netkit: Add some ethtool ops to provide
information to user
On 11/30/23 09:58, Feng zhou wrote:
> From: Feng Zhou <zhoufeng.zf@...edance.com>
>
> Add get_strings, get_sset_count, get_ethtool_stats to get peer
> ifindex.
> ethtool -S nk1
> NIC statistics:
> peer_ifindex: 36
>
> Add get_link, get_link_ksettings to get link stat.
> ethtool nk1
> Settings for nk1:
> ...
> Link detected: yes
>
> Add get_ts_info.
> ethtool -T nk1
> Time stamping parameters for nk1:
> ...
>
> Signed-off-by: Feng Zhou <zhoufeng.zf@...edance.com>
> ---
> drivers/net/netkit.c | 53 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
Hi,
I don't see any point in sending peer_ifindex through ethtool, even
worse through ethtool stats. That is definitely the wrong place for it.
You can already retrieve that through netlink. About the speed/duplex
this one makes more sense, but this is the wrong way to do it.
See how we did it for virtio_net (you are free to set speed/duplex
to anything to please bonding for example). Although I doubt anyone will
use netkit with bonding, so even that is questionable. :)
Nacked-by: Nikolay Aleksandrov <razor@...ckwall.org>
Cheers,
Nik
Powered by blists - more mailing lists