mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	rbradford@rivosinc.com,
	virtualization@lists.linux-foundation.org,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH v3] virtio-net: Fix probe of virtio-net on kvmtool
Date: Mon, 6 Mar 2023 16:44:32 +0800	[thread overview]
Message-ID: <1678092272.631299-1-xuanzhuo@linux.alibaba.com> (raw)
In-Reply-To: <20230305045249-mutt-send-email-mst@kernel.org>

On Sun, 5 Mar 2023 04:53:58 -0500, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Fri, Mar 03, 2023 at 04:46:03PM -0800, Jakub Kicinski wrote:
> > On Thu, 2 Mar 2023 04:48:38 -0500 Michael S. Tsirkin wrote:
> > > > Looks not the core can try to enable and disable features according to
> > > > the diff between features and hw_features
> > > >
> > > > static inline netdev_features_t netdev_get_wanted_features(
> > > >         struct net_device *dev)
> > > > {
> > > >         return (dev->features & ~dev->hw_features) | dev->wanted_features;
> > > > }
> > >
> > > yes what we do work according to code.  So the documentation is wrong then?
> >
> > It's definitely incomplete but which part are you saying is wrong?
>
> So it says:
>   2. netdev->features set contains features which are currently enabled
>      for a device.
>
> ok so far.
> But this part:
>
>   This should be changed only by network core or in
>      error paths of ndo_set_features callback.
>
> seems to say virtio should not touch netdev->features, no?


I think the "changed" here refers to the user's opening or closing a function
by network core.

If the features contain a certain function, but hw_features does not include it
means that this function cannot be modified by user.


 *	struct net_device - The DEVICE structure.
 *   [....]
 *	@features:	Currently active device features
 *	@hw_features:	User-changeable features

Thanks.


>
> --
> MST
>
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2023-03-06  9:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 13:59 Rob Bradford via B4 Relay
2023-03-01 14:44 ` Michael S. Tsirkin
2023-03-02  8:10   ` Jason Wang
2023-03-02  9:45     ` Paolo Abeni
2023-03-02  9:48     ` Michael S. Tsirkin
2023-03-04  0:46       ` Jakub Kicinski
2023-03-05  9:53         ` Michael S. Tsirkin
2023-03-06  8:44           ` Xuan Zhuo [this message]
2023-03-06 18:12           ` Jakub Kicinski

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=1678092272.631299-1-xuanzhuo@linux.alibaba.com \
    --to=xuanzhuo@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rbradford@rivosinc.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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®