On Wed, 10 Apr 2024 14:09:11 +0800, Jason Wang wrote:
> On Mon, Mar 18, 2024 at 7:06 PM Xuan Zhuo wrote:
> >
> > As the spec
> > https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> >
> > The virtnet cvq supports to get result from the device.
> >
> > Signed
On Wed, 10 Apr 2024 14:09:23 +0800, Jason Wang wrote:
> On Mon, Mar 18, 2024 at 7:06 PM Xuan Zhuo wrote:
> >
> > As the spec
> > https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> >
> > make virtio-net support getting the stats from the device by ethtool -
On Wed, 10 Apr 2024 11:09:16 +0800 Heng Qi wrote:
> The point is that the driver may check whether the user has set
> parameters that it does not want.
> For example, virtio may not want the modification of comps, and ice/idpf
> may not want the modification
> of comps and pkts.
If it's simply a
Actually, for the virtio drivers, we can enable premapped mode whatever
the value of use_dma_api. Because we provide the virtio dma apis.
So the driver can enable premapped mode unconditionally.
This patch set makes the big mode of virtio-net to support premapped mode.
And enable premapped mode fo
The virtio-net big mode sq will use these APIs to map the pages.
dma_addr_t virtqueue_dma_map_page_attrs(struct virtqueue *_vq, struct page
*page,
size_t offset, size_t size,
enum dma_data_direction dir,
Now, we have virtio DMA APIs, the driver can be the premapped
mode whatever the virtio core uses dma api or not.
So remove the limit of checking use_dma_api from
virtqueue_set_dma_premapped().
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 7 +--
1 file changed, 1 insertion(+),
Now, we chain the pages of big mode by the page's private variable.
But a subsequent patch aims to make the big mode to support
premapped mode. This requires additional space to store the dma addr.
Within the sub-struct that contains the 'private', there is no suitable
variable for storing the DMA
In big mode, pre-mapping DMA is beneficial because if the pages are not
used, we can reuse them without needing to unmap and remap.
We require space to store the DMA address. I use the page.dma_addr to
store the DMA address from the pp structure inside the page.
Every page retrieved from get_a_pa
Currently, big, merge, and small modes all support the premapped mode.
We can now enable premapped mode by default. Furthermore,
virtqueue_set_dma_premapped() must succeed when called immediately after
find_vqs(). Consequently, we can assume that premapped mode is always
enabled.
Signed-off-by: Xu
Now, for the merge and small, the premapped mode can be enabled
unconditionally.
So we can remove the failover code.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 78 +---
1 file changed, 32 insertions(+), 46 deletions(-)
diff --git a/drivers/net/v
On Wed, Apr 10, 2024 at 6:55 PM Xuan Zhuo wrote:
>
> On Wed, 10 Apr 2024 14:09:23 +0800, Jason Wang wrote:
> > On Mon, Mar 18, 2024 at 7:06 PM Xuan Zhuo
> > wrote:
> > >
> > > As the spec
> > > https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> > >
> > >
11 matches
Mail list logo