From: "Dr. David Alan Gilbert (git)" Date: Thu, 18 Jul 2019 16:13:54 +0100 Message-Id: <20190718151355.11461-2-dgilbert@redhat.com> In-Reply-To: <20190718151355.11461-1-dgilbert@redhat.com> References: <20190718151355.11461-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Virtio-fs] [PATCH 1/2] virito: Add 'id' field to capability header List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: virtio-fs@redhat.com, vgoyal@redhat.com From: "Dr. David Alan Gilbert" For the shm capability we need to have multiple capabilities of the same type, with different uses. For this we need an 'id' field to differentiate them. Place this field in one of the spare bytes of the header. Suggested-by: Michael S. Tsirkin Signed-off-by: Dr. David Alan Gilbert --- include/uapi/linux/virtio_pci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h index 31841a60a4ad..961bb6e6315c 100644 --- a/include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h @@ -123,7 +123,8 @@ struct virtio_pci_cap { __u8 cap_len; /* Generic PCI field: capability length */ __u8 cfg_type; /* Identifies the structure. */ __u8 bar; /* Where to find it. */ - __u8 padding[3]; /* Pad to full dword. */ + __u8 id; /* Multiple capabilities of the same type */ + __u8 padding[2]; /* Pad to full dword. */ __le32 offset; /* Offset within bar. */ __le32 length; /* Length of the structure, in bytes. */ }; -- 2.21.0