Re: [PATCH v1 1/7] vdpa: Provide interface to read driver features

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 9, 2021 at 3:07 PM Eli Cohen <elic@xxxxxxxxxx> wrote:
>
> On Thu, Dec 09, 2021 at 01:33:01PM +0800, Jason Wang wrote:
> > On Thu, Dec 9, 2021 at 4:14 AM Eli Cohen <elic@xxxxxxxxxx> wrote:
> > >
> > > Provide an interface to read the negotiated features. This is needed
> > > when building the netlink message in vdpa_dev_net_config_fill().
> > >
> > > Also fix the implementation of vdpa_dev_net_config_fill() to use the
> > > negotiated features instead of the device features.
> > >
> > > To make APIs clearer, make the following name changes to struct
> > > vdpa_config_ops so they better describe their operations:
> > >
> > > get_features -> get_device_features
> > > set_features -> set_driver_features

[...]

> > > + * @get_driver_features:       Get virtio features in action
> >
> > Maybe "Get virtio driver features .." is better.
>
> I hope the name does not become too long.
> Which one would you favor?
>
> get_vio_driver_features
> get_virtio_drv_features
> get_virtio_driver_features

The name is fine, I mean the comment might be

"Get the virtio driver features in action"

Thanks

>
> >
> > Thanks
> >
> > > + *                             @vdev: vdpa device
> > > + *                             Returns the virtio features accepted
> > >   * @set_config_cb:             Set the config interrupt callback
> > >   *                             @vdev: vdpa device
> > >   *                             @cb: virtio-vdev interrupt callback structure
> > > @@ -276,8 +279,9 @@ struct vdpa_config_ops {
> > >
> > >         /* Device ops */
> > >         u32 (*get_vq_align)(struct vdpa_device *vdev);
> > > -       u64 (*get_features)(struct vdpa_device *vdev);
> > > -       int (*set_features)(struct vdpa_device *vdev, u64 features);
> > > +       u64 (*get_device_features)(struct vdpa_device *vdev);
> > > +       int (*set_driver_features)(struct vdpa_device *vdev, u64 features);
> > > +       u64 (*get_driver_features)(struct vdpa_device *vdev);
> > >         void (*set_config_cb)(struct vdpa_device *vdev,
> > >                               struct vdpa_callback *cb);
> > >         u16 (*get_vq_num_max)(struct vdpa_device *vdev);
> > > @@ -395,7 +399,7 @@ static inline int vdpa_set_features(struct vdpa_device *vdev, u64 features)
> > >         const struct vdpa_config_ops *ops = vdev->config;
> > >
> > >         vdev->features_valid = true;
> > > -       return ops->set_features(vdev, features);
> > > +       return ops->set_driver_features(vdev, features);
> > >  }
> > >
> > >  void vdpa_get_config(struct vdpa_device *vdev, unsigned int offset,
> > > --
> > > 2.33.1
> > >
> >
>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux