On Mon, 22 Apr 2024 16:33:01 -0400, "Michael S. Tsirkin"
wrote:
> On Mon, Mar 18, 2024 at 07:05:53PM +0800, Xuan Zhuo wrote:
> > As the spec:
> >
> > https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> >
> > The virtio net supports to get device stats.
> >
>
On Tue, 23 Apr 2024 12:36:42 +0800, Jason Wang wrote:
> On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo wrote:
> >
> > 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 addres
On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo wrote:
>
> 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 s
Once the RTNL locking around the control buffer is removed there can be
contention on the per queue RX interrupt coalescing data. Use a mutex
per queue. A mutex is required because virtnet_send_command can sleep.
Signed-off-by: Daniel Jurgens
---
drivers/net/virtio_net.c | 53 +++
The rtnl lock is no longer needed to protect the control buffer and
command VQ.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net
Since we no longer have to hold the RTNL lock here just do updates for
the specified queue.
Signed-off-by: Daniel Jurgens
---
drivers/net/virtio_net.c | 40 +++-
1 file changed, 15 insertions(+), 25 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers
The command VQ will no longer be protected by the RTNL lock. Use a
mutex to protect the control buffer header and the VQ.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/
Stop storing RSS setting in the control buffer. This is prep work for
removing RTNL lock protection of the control buffer.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/virtio_net.c | 40
1 file changed, 20 insertions(+), 20 delet
Allocate memory for the data when it's used. Ideally the could be on the
stack, but we can't DMA stack memory. With this change only the header
and status memory are shared between commands, which will allow using a
tighter lock than RTNL.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
--
Currently the buffer used for control VQ commands is protected by the
RTNL lock. Previously this wasn't a major concern because the control VQ
was only used during device setup and user interaction. With the recent
addition of dynamic interrupt moderation the control VQ may be used
frequently durin
On Mon, Apr 22, 2024 at 3:24 PM Xuan Zhuo wrote:
>
> We call the build_skb() actually without copying data.
> The comment is misleading. So remove it.
>
> Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Thanks
> ---
> drivers/net/virtio_net.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --g
On Fri, 19 Apr 2024 12:08:38 +0100, Pavel Begunkov wrote:
> Please, don't take directly, conflicts with io_uring.
>
> To have per request buffer notifications each zerocopy io_uring send
> request allocates a new ubuf_info. However, as an skb can carry only
> one uarg, it may force the stack to
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Fri, 19 Apr 2024 12:08:38 +0100 you wrote:
> Please, don't take directly, conflicts with io_uring.
>
> To have per request buffer notifications each zerocopy io_uring send
> request allocates a new ubuf_info. How
On Thu, Apr 18, 2024 at 06:08:24PM +0200, Jiri Pirko wrote:
> From: Jiri Pirko
>
> This patchset aims at introducing very basic initial infrastructure
> for virtio_net testing, namely it focuses on virtio feature testing.
>
> The first patch adds support for debugfs for virtio devices, allowing
On Mon, Apr 15, 2024 at 09:38:03PM +0800, Heng Qi wrote:
> The NetDIM library provides excellent acceleration for many modern
> network cards. However, the default profiles of DIM limits its maximum
> capabilities for different NICs, so providing a way which the NIC can
> be custom configured is ne
On Mon, Mar 18, 2024 at 07:05:53PM +0800, Xuan Zhuo wrote:
> As the spec:
>
> https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
>
> The virtio net supports to get device stats.
>
> Please review.
series:
Acked-by: Michael S. Tsirkin
I think you can now
On 2024-04-22 17:32 +0200, Jiri Pirko wrote:
> From: Jiri Pirko
>
> Add a helper to be used to check if the netdevice is backed by specified
> driver.
>
> Signed-off-by: Jiri Pirko
> Reviewed-by: Petr Machata
> ---
> tools/testing/selftests/net/forwarding/lib.sh | 15 +++
> 1 file
Pavel Begunkov wrote:
> At the moment an skb can only have one ubuf_info associated with it,
> which might be a performance problem for zerocopy sends in cases like
> TCP via io_uring. Add a callback for assigning ubuf_info to skb, this
> way we will implement smarter assignment later like linking
Pavel Begunkov wrote:
> We'll need to associate additional callbacks with ubuf_info, introduce
> a structure holding ubuf_info callbacks. Apart from a more smarter
> io_uring notification management introduced in next patches, it can be
> used to generalise msg_zerocopy_put_abort() and also store
>
From: Jiri Pirko
Introduce initial tests for virtio_net driver. Focus on feature testing
leveraging previously introduced debugfs feature filtering
infrastructure. Add very basic ping and F_MAC feature tests.
To run this, do:
$ make -C tools/testing/selftests/ TARGETS=drivers/net/virtio_net/ run
From: Jiri Pirko
The existing setup_wait*() helper family check the status of the
interface to be up. Introduce wait_for_dev() to wait for the netdevice
to appear, for example after test script does manual device bind.
Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
---
v3->v4:
- removed "
From: Jiri Pirko
Add a helper to be used to check if the netdevice is backed by specified
driver.
Signed-off-by: Jiri Pirko
Reviewed-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tools/te
From: Jiri Pirko
Allow driver tests to work without specifying the netdevice names.
Introduce a possibility to search for available netdevices according to
set driver name. Allow test to specify the name by setting
NETIF_FIND_DRIVER variable.
Note that user overrides this either by passing netde
From: Jiri Pirko
Currently there is no way for user to set what features the driver
should obey or not, it is hard wired in the code.
In order to be able to debug the device behavior in case some feature is
disabled, introduce a debugfs infrastructure with couple of files
allowing user to see wh
We call the build_skb() actually without copying data.
The comment is misleading. So remove it.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 848e93ccf2ef..ae15254a673b 100644
---
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
Now, the premapped mode can be enabled unconditionally.
So we can remove the failover code.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 81
1 file changed, 33 insertions(+), 48 deletions(-)
diff --git a/drivers/net/virt
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, 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
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
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 7 +--
1 file ch
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,
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
32 matches
Mail list logo