Michael S. Tsirkin
2023-Mar-05 09:53 UTC
[PATCH v3] virtio-net: Fix probe of virtio-net on kvmtool
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? -- MST
On Sun, 5 Mar 2023 04:53:58 -0500, "Michael S. Tsirkin" <mst at 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 at lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Apparently Analagous Threads
- [PATCH v3] virtio-net: Fix probe of virtio-net on kvmtool
- [PATCH v2] virtio-net: Fix probe of virtio-net on kvmtool
- [PATCH v2] virtio-net: Fix probe of virtio-net on kvmtool
- [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support
- [PATCH 1/2] virtio-net: don't disable guest csum when disable LRO