On Sat, Nov 04, 2023 at 01:16:33AM +0800, Cindy Lu wrote:
>
> Hi All
> This code provides the iommufd support for vdpa device
> This code fixes the bugs from the last version and also add the asid support.
> rebase on kernel
> v6,6-rc3
> Test passed in the physical device (vp_vdpa), but there ar
Now, we supported AF_XDP(xsk). Add NETDEV_XDP_ACT_XSK_ZEROCOPY to
xdp_features.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/main.c
index 42c7dbf53e63..2c14f0c84e56 1006
When rq is bound with AF_XDP, the buffer dma is managed
by the AF_XDP APIs. So the buffer got from the virtio core should
skip the dma unmap operation.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 8 +---
drivers/net/virtio/virtio_net.h | 3 +++
drivers/net/virtio/xsk.c
If send queue sent some packets, we update the tx timeout
record to prevent the tx timeout.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/xsk.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/virtio/xsk.c b/drivers/net/virtio/xsk.c
index 5c7eb1
The virtnet_xdp_handler() is re-used. But
1. We need to copy data to create skb for XDP_PASS.
2. We need to call xsk_buff_free() to release the buffer.
3. The handle for xdp_buff is difference.
If we pushed this logic into existing receive handle(merge and small),
we would have to maintain code s
virtnet_free_old_xmit distinguishes three type ptr(skb, xdp frame, xsk
buffer) by the last bits of the pointer.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/virtio_net.h | 18 --
drivers/net/virtio/xsk.h| 5 +
2 files changed, 21 insertions(+), 2 deletions(-)
dif
Implement the logic of filling rq with XSK buffers.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 4 ++-
drivers/net/virtio/virtio_net.h | 5
drivers/net/virtio/xsk.c| 49 -
drivers/net/virtio/xsk.h| 2 ++
4 files changed,
Since this will be called in other circumstances(freeze), we must check
whether it is xsk's buffer in this function. It cannot be judged outside
this function.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/virtio/ma
virtnet_sq_free_unused_buf() check xsk buffer.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/main.c
index 6a5e74c482f3..6210a6e37396 100644
---
xsk wakeup is used to trigger the logic for xsk xmit by xsk framework or
user.
Virtio-net does not support to actively generate an interruption, so it
tries to trigger tx NAPI on the local cpu.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 20 ++--
drivers/net/v
This patch implement the logic of bind/unbind xsk pool to sq and rq.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/Makefile | 2 +-
drivers/net/virtio/main.c | 11 +-
drivers/net/virtio/virtio_net.h | 16 +++
drivers/net/virtio/xsk.c| 187
The driver's tx napi is very important for XSK. It is responsible for
obtaining data from the XSK queue and sending it out.
At the beginning, we need to trigger tx napi.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 12 +++-
drivers/net/virtio/virtio_net.h | 3 +-
drivers/ne
Since xsk's TX queue is consumed by TX NAPI, if sq is bound to xsk, then
we must stop tx napi from being disabled.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/main.c
This patch separates two sub-functions from virtnet_tx_resize():
* virtnet_tx_pause
* virtnet_tx_resume
Then the subsequent virtnet_tx_reset() can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 35 +++-
We move some structures to the header file, but these structures do not
prefixed with virtnet. This patch adds virtnet for these.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 100
drivers/net/virtio/virtio_net.h | 12 ++--
2 files changed, 56 i
Since free_old_xmit_skbs not only deals with skb, but also xdp frame and
subsequent added xsk, so change the name of this function to
free_old_xmit.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff
There are two completely similar and independent implementations. This
is inconvenient for the subsequent addition of new types. So extract a
function from this piece of code and call this function uniformly to
recover old xmit ptr.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/
__free_old_xmit
is_xdp_raw_buffer_queue
These two APIs are needed by the xsk part.
So this commit move theses to the header. And add prefix "virtnet_".
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 94 +++--
drivers/net/virtio/virtio_net.h | 80 +
Move some core structures (send_queue, receive_queue, virtnet_info)
definitions and the relative structures definitions into the
virtio_net.h file.
That will be used by the other c code files.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 189 +--
dr
If the xsk is enabling, the xsk tx will share the send queue.
But the xsk requires that the send queue use the premapped mode.
So the send queue must support premapped mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 163
drivers/net/virtio/vi
Create a separate directory for virtio-net. AF_XDP support will be added
later, then a separate xsk.c file will be added, so we should create a
directory for virtio-net.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
MAINTAINERS | 2 +-
drivers/net/Kconfig
This patch separates two sub-functions from virtnet_rx_resize():
* virtnet_rx_pause
* virtnet_rx_resume
Then the subsequent reset rx for xsk can share these two functions.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio/main.c | 29 +
dri
## AF_XDP
XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero
copy feature of xsk (XDP socket) needs to be supported by the driver. The
performance of zero copy is very good. mlx5 and intel ixgbe already support
this feature, This patch set allows virtio-net to support xsk
On Mon, Nov 06, 2023 at 02:12:23AM -0500, Tina Zhang wrote:
> Add basic hook up code to implement generic IO page table framework.
>
> Signed-off-by: Tina Zhang
> ---
> drivers/iommu/intel/Kconfig | 1 +
> drivers/iommu/intel/iommu.c | 94 +
> drivers/iommu/i
On Fri, Nov 3, 2023 at 5:45 PM Jason Gunthorpe wrote:
>
> This call chain is using dev->iommu->fwspec to pass around the fwspec
> between the three parts (acpi_iommu_configure(), acpi_iommu_fwspec_init(),
> iommu_probe_device()).
>
> However there is no locking around the accesses to dev->iommu, s
On Fri, Nov 3, 2023 at 5:45 PM Jason Gunthorpe wrote:
>
> Nothing needs this pointer. Return a normal error code with the usual
> IOMMU semantic that ENODEV means 'there is no IOMMU driver'.
>
> Signed-off-by: Jason Gunthorpe
Acked-by: Rafael J. Wysocki
> ---
> drivers/acpi/scan.c | 24 ++
On Thu, Nov 02, 2023 at 01:01:09PM +, Gonglei (Arei) wrote:
>
> > So I think the core of this question is: Can we call
> > crypto_finalize_request() in
> > the upper half of the interrupt?
The finalize path originates from the network stack. So the conditions
are the same as that of the netw
On Fri, Nov 03, 2023 at 06:55:47PM +0100, f.storniol...@gmail.com wrote:
From: Filippo Storniolo
This patch series introduce fix and tests for the following vsock bug:
If the same remote peer, using the same port, tries to connect
to a server on a listening port more than once, the server will
On Fri, Nov 03, 2023 at 06:55:51PM +0100, f.storniol...@gmail.com wrote:
From: Filippo Storniolo
This add bind connect test which creates a listening server socket
and tries to connect a client with a bound local port to it twice.
Co-developed-by: Luigi Leonardi
Signed-off-by: Luigi Leonardi
On Fri, Nov 03, 2023 at 06:55:50PM +0100, f.storniol...@gmail.com wrote:
From: Filippo Storniolo
This is a preliminary patch to introduce SOCK_STREAM bind connect test.
vsock_accept() is split into vsock_listen() and vsock_accept().
Co-developed-by: Luigi Leonardi
Signed-off-by: Luigi Leonard
On Fri, Nov 03, 2023 at 06:55:49PM +0100, f.storniol...@gmail.com wrote:
From: Filippo Storniolo
Add check on socket() return value in vsock_listen()
and vsock_connect()
Co-developed-by: Luigi Leonardi
Signed-off-by: Luigi Leonardi
Signed-off-by: Filippo Storniolo
---
tools/testing/vsock/ut
On Fri, Nov 03, 2023 at 06:55:48PM +0100, f.storniol...@gmail.com wrote:
From: Filippo Storniolo
If the same remote peer, using the same port, tries to connect
to a server on a listening port more than once, the server will
reject the connection, causing a "connection reset by peer"
error on th
On Sun, Nov 05, 2023 at 12:05:31AM +0900, Shigeru Yoshida wrote:
KMSAN reported the following uninit-value access issue:
=
BUG: KMSAN: uninit-value in virtio_transport_recv_pkt+0x1dfb/0x26a0
net/vmw_vsock/virtio_transport_common.c:1421
virtio_
For rq, we have three cases getting buffers from virtio core:
1. virtqueue_get_buf{,_ctx}
2. virtqueue_detach_unused_buf
3. callback for virtqueue_resize
But in commit 295525e29a5b("virtio_net: merge dma operations when
filling mergeable buffers"), I missed the dma unmap for the #3 case.
That wi
34 matches
Mail list logo