search for: container_off

Displaying 6 results from an estimated 6 matches for "container_off".

Did you mean: container_of
2020 Jun 04
2
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...gt;priv; > + BUILD_BUG_ON(sizeof(struct virtio_dma_buf_export_info) > + != sizeof(struct dma_buf_export_info)); This is the only part that gives me pause. Why do we need this hack? What's wrong with just using dma_buf_export_info directly, and if you want the virtio ops, just using container_off? > + > + return dma_buf_export(&exp_info); > +} > +EXPORT_SYMBOL(virtio_dma_buf_export); > + > +/** > + * virtio_dma_buf_attach - mandatory attach callback for virtio dma-bufs > + */ > +int virtio_dma_buf_attach(struct dma_buf *dma_buf, > + struct dma_buf_at...
2020 Jun 04
2
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...gt;priv; > + BUILD_BUG_ON(sizeof(struct virtio_dma_buf_export_info) > + != sizeof(struct dma_buf_export_info)); This is the only part that gives me pause. Why do we need this hack? What's wrong with just using dma_buf_export_info directly, and if you want the virtio ops, just using container_off? > + > + return dma_buf_export(&exp_info); > +} > +EXPORT_SYMBOL(virtio_dma_buf_export); > + > +/** > + * virtio_dma_buf_attach - mandatory attach callback for virtio dma-bufs > + */ > +int virtio_dma_buf_attach(struct dma_buf *dma_buf, > + struct dma_buf_at...
2020 Jun 06
0
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...port_info) > > > + != sizeof(struct dma_buf_export_info)); > > > > This is the only part that gives me pause. Why do we need this hack? > > What's wrong with just using dma_buf_export_info directly, > > and if you want the virtio ops, just using container_off? > > This approach provides a more explicit type signature and a little > more type safety, I think. If others don't think it's a worthwhile > tradeoff, I can remove it. > > -David The cost is that if dma_buf_export_info changes even slightly, we get weird crashes. --...
2020 Jun 08
0
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...!= sizeof(struct dma_buf_export_info)); > > > > > > > > This is the only part that gives me pause. Why do we need this hack? > > > > What's wrong with just using dma_buf_export_info directly, > > > > and if you want the virtio ops, just using container_off? > > > > > > This approach provides a more explicit type signature and a little > > > more type safety, I think. If others don't think it's a worthwhile > > > tradeoff, I can remove it. > > > > > > -David > > > > The cost is...
2020 Jun 08
0
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...o)); > > > > > > > > > > > > This is the only part that gives me pause. Why do we need this hack? > > > > > > What's wrong with just using dma_buf_export_info directly, > > > > > > and if you want the virtio ops, just using container_off? > > > > > > > > > > This approach provides a more explicit type signature and a little > > > > > more type safety, I think. If others don't think it's a worthwhile > > > > > tradeoff, I can remove it. > > > > > >...
2020 Jun 19
0
[PATCH v4 1/3] virtio: add dma-buf support for exported objects
...t; > + != sizeof(struct dma_buf_export_info)); > > > > > > This is the only part that gives me pause. Why do we need this hack? > > > What's wrong with just using dma_buf_export_info directly, > > > and if you want the virtio ops, just using container_off? > > > > > > > > > > > > > + > > > > + return dma_buf_export(&exp_info); > > > > +} > > > > +EXPORT_SYMBOL(virtio_dma_buf_export); > > > > + > > > > +/** > > > > + * virtio_dma_buf_a...