mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Feng Zhou <zhoufeng.zf@bytedance.com>
To: Nikolay Aleksandrov <razor@blackwall.org>,
	daniel@iogearbox.net, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, yangzhenze@bytedance.com,
	wangdongdong.6@bytedance.com, tangchen.1@bytedance.com
Subject: Re: [External] Re: [PATCH bpf-next] netkit: Add some ethtool ops to provide information to user
Date: Thu, 30 Nov 2023 17:24:05 +0800	[thread overview]
Message-ID: <16b4d42d-2d62-460e-912f-6e3b86f3004d@bytedance.com> (raw)
In-Reply-To: <51dd35c9-ff5b-5b11-04d1-9a5ae9466780@blackwall.org>

在 2023/11/30 17:06, Nikolay Aleksandrov 写道:
> On 11/30/23 09:58, Feng zhou wrote:
>> From: Feng Zhou <zhoufeng.zf@bytedance.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@bytedance.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@blackwall.org>
> 
> Cheers,
>   Nik
> 

We use netkit to replace veth to improve performance, veth can be used 
ethtool -S veth to get peer_ifindex, so this part is added, as long as 
it is to keep the netkit part and veth unified, to ensure the same usage 
habits, and to replace it without perception.



  reply	other threads:[~2023-11-30  9:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30  7:58 Feng zhou
2023-11-30  9:06 ` Nikolay Aleksandrov
2023-11-30  9:24   ` Feng Zhou [this message]
2023-11-30 10:56     ` [External] " Daniel Borkmann
2023-12-01  8:42       ` Feng Zhou
2023-12-04 15:22         ` Daniel Borkmann
2023-12-06  6:59           ` Feng Zhou
2023-12-06 10:57             ` Daniel Borkmann
2023-12-07  9:56               ` Feng Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16b4d42d-2d62-460e-912f-6e3b86f3004d@bytedance.com \
    --to=zhoufeng.zf@bytedance.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=tangchen.1@bytedance.com \
    --cc=wangdongdong.6@bytedance.com \
    --cc=yangzhenze@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®