diff mbox series

[v7,1/4] vdpa: Add suspend operation

Message ID 20220810171512.2343333-2-eperezma@redhat.com (mailing list archive)
State Superseded
Headers show
Series Implement vdpasim suspend operation | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Eugenio Perez Martin Aug. 10, 2022, 5:15 p.m. UTC
This operation is optional: It it's not implemented, backend feature bit
will not be exposed.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20220623160738.632852-2-eperezma@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/linux/vdpa.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michael S. Tsirkin Aug. 11, 2022, 8:27 a.m. UTC | #1
On Wed, Aug 10, 2022 at 07:15:09PM +0200, Eugenio Pérez wrote:
> This operation is optional: It it's not implemented, backend feature bit
> will not be exposed.
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> Message-Id: <20220623160738.632852-2-eperezma@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

What is this message id doing here?

> ---
>  include/linux/vdpa.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 7b4a13d3bd91..d282f464d2f1 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -218,6 +218,9 @@ struct vdpa_map_file {
>   * @reset:			Reset device
>   *				@vdev: vdpa device
>   *				Returns integer: success (0) or error (< 0)
> + * @suspend:			Suspend or resume the device (optional)
> + *				@vdev: vdpa device
> + *				Returns integer: success (0) or error (< 0)
>   * @get_config_size:		Get the size of the configuration space includes
>   *				fields that are conditional on feature bits.
>   *				@vdev: vdpa device
> @@ -319,6 +322,7 @@ struct vdpa_config_ops {
>  	u8 (*get_status)(struct vdpa_device *vdev);
>  	void (*set_status)(struct vdpa_device *vdev, u8 status);
>  	int (*reset)(struct vdpa_device *vdev);
> +	int (*suspend)(struct vdpa_device *vdev);
>  	size_t (*get_config_size)(struct vdpa_device *vdev);
>  	void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
>  			   void *buf, unsigned int len);
> -- 
> 2.31.1
Dan Carpenter Aug. 11, 2022, 10:15 a.m. UTC | #2
On Thu, Aug 11, 2022 at 04:27:32AM -0400, Michael S. Tsirkin wrote:
> On Wed, Aug 10, 2022 at 07:15:09PM +0200, Eugenio Pérez wrote:
> > This operation is optional: It it's not implemented, backend feature bit
> > will not be exposed.
> > 
> > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > Message-Id: <20220623160738.632852-2-eperezma@redhat.com>
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> What is this message id doing here?
> 

I like the Message-Id tag.  It means you can `b4 mbox <mesg-id>` and get
the thread.

Linus has complained (rough remembering) that everyone is using the
Link: tag for links to the patch itself.  It's supposed to be for Links
to bugzilla or to the spec or whatever.  Extra information, too much to
put in the commit message.  Now the Link tag is useless because it either
points to the patch or to a bugzilla.  Depend on what you want it to do,
it *always* points to the opposite thing.

But I can't remember what people settled on as the alternative to use
to link to lore...

In theory, we should be able to figure out the link to lore automatically
and there have been a couple projects which tried to do this but they
can't make it work 100%.  Maintainers massage and reformat the patches
too much before applying them.

regards,
dan carpenter
Michael S. Tsirkin Aug. 11, 2022, 11:23 a.m. UTC | #3
On Thu, Aug 11, 2022 at 01:15:08PM +0300, Dan Carpenter wrote:
> On Thu, Aug 11, 2022 at 04:27:32AM -0400, Michael S. Tsirkin wrote:
> > On Wed, Aug 10, 2022 at 07:15:09PM +0200, Eugenio Pérez wrote:
> > > This operation is optional: It it's not implemented, backend feature bit
> > > will not be exposed.
> > > 
> > > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > > Message-Id: <20220623160738.632852-2-eperezma@redhat.com>
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > 
> > What is this message id doing here?
> > 
> 
> I like the Message-Id tag.  It means you can `b4 mbox <mesg-id>` and get
> the thread.

Yes it makes sense in git. But I don't see what it does in this patch
posted to the list. It seems to refer to the previous version of the
patch here. Which is ok I guess but better called out e.g.

Previous-version: <20220623160738.632852-2-eperezma@redhat.com>


> Linus has complained (rough remembering) that everyone is using the
> Link: tag for links to the patch itself.  It's supposed to be for Links
> to bugzilla or to the spec or whatever.  Extra information, too much to
> put in the commit message.  Now the Link tag is useless because it either
> points to the patch or to a bugzilla.  Depend on what you want it to do,
> it *always* points to the opposite thing.
> 
> But I can't remember what people settled on as the alternative to use
> to link to lore...
> 
> In theory, we should be able to figure out the link to lore automatically
> and there have been a couple projects which tried to do this but they
> can't make it work 100%.  Maintainers massage and reformat the patches
> too much before applying them.
> 
> regards,
> dan carpenter
Dan Carpenter Aug. 11, 2022, 12:40 p.m. UTC | #4
On Thu, Aug 11, 2022 at 07:23:44AM -0400, Michael S. Tsirkin wrote:
> On Thu, Aug 11, 2022 at 01:15:08PM +0300, Dan Carpenter wrote:
> > On Thu, Aug 11, 2022 at 04:27:32AM -0400, Michael S. Tsirkin wrote:
> > > On Wed, Aug 10, 2022 at 07:15:09PM +0200, Eugenio Pérez wrote:
> > > > This operation is optional: It it's not implemented, backend feature bit
> > > > will not be exposed.
> > > > 
> > > > Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> > > > Message-Id: <20220623160738.632852-2-eperezma@redhat.com>
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > 
> > > What is this message id doing here?
> > > 
> > 
> > I like the Message-Id tag.  It means you can `b4 mbox <mesg-id>` and get
> > the thread.
> 
> Yes it makes sense in git. But I don't see what it does in this patch
> posted to the list.

Ah.  Okay.  I misunderstood.

> It seems to refer to the previous version of the
> patch here. Which is ok I guess but better called out e.g.
> 
> Previous-version: <20220623160738.632852-2-eperezma@redhat.com>
> 

Let's not go over board with storing previous threads.  That seems like
a headache...

regards,
dan carpenter
diff mbox series

Patch

diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index 7b4a13d3bd91..d282f464d2f1 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -218,6 +218,9 @@  struct vdpa_map_file {
  * @reset:			Reset device
  *				@vdev: vdpa device
  *				Returns integer: success (0) or error (< 0)
+ * @suspend:			Suspend or resume the device (optional)
+ *				@vdev: vdpa device
+ *				Returns integer: success (0) or error (< 0)
  * @get_config_size:		Get the size of the configuration space includes
  *				fields that are conditional on feature bits.
  *				@vdev: vdpa device
@@ -319,6 +322,7 @@  struct vdpa_config_ops {
 	u8 (*get_status)(struct vdpa_device *vdev);
 	void (*set_status)(struct vdpa_device *vdev, u8 status);
 	int (*reset)(struct vdpa_device *vdev);
+	int (*suspend)(struct vdpa_device *vdev);
 	size_t (*get_config_size)(struct vdpa_device *vdev);
 	void (*get_config)(struct vdpa_device *vdev, unsigned int offset,
 			   void *buf, unsigned int len);