The IOV interconnect is a virtual interconnect between an SRIOV physical function (PF) and its virtual functions (VFs). In order for negotiation (or match) to succeed, the exporter is expected to be a VF while the importer is expected to be the PF.
Cc: Jason Gunthorpe <[email protected]> Cc: Christian Koenig <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Simona Vetter <[email protected]> Signed-off-by: Vivek Kasireddy <[email protected]> --- drivers/dma-buf/dma-buf-interconnect.c | 3 +++ include/linux/dma-buf-interconnect.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/dma-buf/dma-buf-interconnect.c b/drivers/dma-buf/dma-buf-interconnect.c index 12db77e6b9f1..492e4d3fe4c8 100644 --- a/drivers/dma-buf/dma-buf-interconnect.c +++ b/drivers/dma-buf/dma-buf-interconnect.c @@ -159,3 +159,6 @@ bool dma_buf_match_interconnects(struct dma_buf_attachment *attach, return false; } EXPORT_SYMBOL_NS_GPL(dma_buf_match_interconnects, "DMA_BUF"); + +CREATE_INTERCONNECT(iov) +EXPORT_SYMBOL_NS_GPL(iov_interconnect, "DMA_BUF"); diff --git a/include/linux/dma-buf-interconnect.h b/include/linux/dma-buf-interconnect.h index efe3ca1c354a..37dee1a26f24 100644 --- a/include/linux/dma-buf-interconnect.h +++ b/include/linux/dma-buf-interconnect.h @@ -20,6 +20,13 @@ struct dma_buf_attachment; +/** + * The iov interconnect instance would be created and exported out of + * dma-buf-interconnect.c as it is a global interconnect that is expected + * to be supported by different exporters and importers. + */ +extern const struct dma_buf_interconnect *iov_interconnect; + /** * struct dma_buf_interconnect - holds info associated with an interconnect * @name: name of the interconnect. -- 2.50.1
