On 10/10/2023 23:42, Michael S. Tsirkin wrote:
On Tue, Oct 10, 2023 at 07:09:08PM +0300, Yishai Hadas wrote:
Assuming that we'll put each command inside virtio as the generic layer, we
won't be able to call/use this API internally to get the PF as of cyclic
dependencies between the modules, link
Hi Christoph,
> From: Christoph Hellwig
> Sent: Wednesday, October 11, 2023 12:29 PM
>
> On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote:
> > > Btw, what is that intel thing everyone is talking about? And why
> > > would the virtio core support vendor specific behavior like t
On Wed, Oct 11, 2023 at 10:44:49AM +0300, Yishai Hadas wrote:
> On 10/10/2023 23:42, Michael S. Tsirkin wrote:
> > On Tue, Oct 10, 2023 at 07:09:08PM +0300, Yishai Hadas wrote:
> > > > > Assuming that we'll put each command inside virtio as the generic
> > > > > layer, we
> > > > > won't be able t
On Wed, Oct 11, 2023 at 08:00:57AM +, Parav Pandit wrote:
> Hi Christoph,
>
> > From: Christoph Hellwig
> > Sent: Wednesday, October 11, 2023 12:29 PM
> >
> > On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote:
> > > > Btw, what is that intel thing everyone is talking about?
On Tue, Oct 10, 2023 at 11:59:26PM -0700, Christoph Hellwig wrote:
> On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote:
> > > Btw, what is that intel thing everyone is talking about? And why
> > > would the virtio core support vendor specific behavior like that?
> >
> > It's not
On 11/10/2023 11:02, Michael S. Tsirkin wrote:
On Wed, Oct 11, 2023 at 10:44:49AM +0300, Yishai Hadas wrote:
On 10/10/2023 23:42, Michael S. Tsirkin wrote:
On Tue, Oct 10, 2023 at 07:09:08PM +0300, Yishai Hadas wrote:
Assuming that we'll put each command inside virtio as the generic layer, we
On Wed, Oct 11, 2023 at 11:58:11AM +0300, Yishai Hadas wrote:
> On 11/10/2023 11:02, Michael S. Tsirkin wrote:
> > On Wed, Oct 11, 2023 at 10:44:49AM +0300, Yishai Hadas wrote:
> > > On 10/10/2023 23:42, Michael S. Tsirkin wrote:
> > > > On Tue, Oct 10, 2023 at 07:09:08PM +0300, Yishai Hadas wrote:
## 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
virtqueue_set_dma_premapped() adds a new parameter to disable the
virtqueue premapped mode.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 2 +-
drivers/virtio/virtio_ring.c | 11 ---
include/linux/virtio.h | 2 +-
3 files changed, 10 insertions(+), 5 deletions(-)
d
Introduce virtqueue_dma_[un]map_page_attrs() to do dma/unmap for pages.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 52
include/linux/virtio.h | 7 +
2 files changed, 59 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/dri
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
---
drivers/net/virtio_net.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/vi
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
---
drivers/net/virtio_net.c | 76
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
---
MAINTAINERS | 2 +-
drivers/net/Kconfig
We move some structures and APIs to the header file, but these
structures and APIs do not prefixed with virtnet. This patch adds
virtnet for these.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 122
drivers/net/virtio/virtio_net.h | 30
Move some structure definitions and inline functions into the
virtio_net.h file.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 252 +--
drivers/net/virtio/virtio_net.h | 256
2 files changed, 258 insertions(+), 250 del
virtnet_poll_tx() support to return budget when busy to be rescheduled.
When retval < budget, napi_poll() in dev.c will exit directly. And
virtqueue_napi_complete() will be called to close napi.
When retval == budget, the napi_poll() in dev.c will re-add napi to the
queue.
The purpose of this pa
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
---
drivers/net/virtio/main.c | 35 +++--
drivers/net/virtio/
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 | 10 +-
drivers/net/virtio/virtio_net.h | 18
drivers/net/virtio/xsk.c| 186
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
---
drivers/net/virtio/main.c | 29 +
drivers/net/virtio/virtio
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
---
drivers/net/virtio/main.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/main.c b/drivers/net/virtio/m
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 | 98 -
drivers/net/virtio/vi
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 | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/net/vi
If send queue sent some packets, we update the tx timeout
record to prevent the tx timeout.
Signed-off-by: Xuan Zhuo
---
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 7abd46bb0e3d..e605f860edb6 1
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 60b5bd21fcc6..a9852e9ff598 1006
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
Implementing the logic of xsk rx. If this packet is not for XSK
determined in XDP, then we need to copy once to generate a SKB.
If it is for XSK, it is a zerocopy receive packet process.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 14 ++--
drivers/net/virtio/virtio_net.h |
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 tx interrupt cpu.
Consider the effect of cache. When interrupt triggers, it is
generally fixed on a CPU. It is bet
virtnet_free_old_xmit distinguishes three type ptr(skb, xdp frame, xsk
buffer) by the last two types bits.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/virtio_net.h | 16 ++--
drivers/net/virtio/xsk.h| 5 +
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git
virtnet_sq_free_unused_buf() check xsk buffer.
Signed-off-by: Xuan Zhuo
---
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 a0a735c7aa32..8c9d8c4e6960 100644
--- a/drivers/net/virtio/m
Implement the logic of filling vq with XSK buffer.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio/main.c | 13 +++
drivers/net/virtio/virtio_net.h | 5 +++
drivers/net/virtio/xsk.c| 66 -
drivers/net/virtio/xsk.h| 2 +
4 files changed,
On 11/10/2023 12:03, Michael S. Tsirkin wrote:
On Wed, Oct 11, 2023 at 11:58:11AM +0300, Yishai Hadas wrote:
On 11/10/2023 11:02, Michael S. Tsirkin wrote:
On Wed, Oct 11, 2023 at 10:44:49AM +0300, Yishai Hadas wrote:
On 10/10/2023 23:42, Michael S. Tsirkin wrote:
On Tue, Oct 10, 2023 at 07:0
On Tue, Oct 10, 2023 at 10:15:14PM +0300, Arseniy Krasnov wrote:
This adds handling of MSG_ERRQUEUE input flag in receive call. This flag
is used to read socket's error queue instead of data queue. Possible
scenario of error queue usage is receiving completions for transmission
with MSG_ZEROCOPY
On Tue, Oct 10, 2023 at 10:15:22PM +0300, Arseniy Krasnov wrote:
This adds three tests for MSG_ZEROCOPY feature:
1) SOCK_STREAM tx with different buffers.
2) SOCK_SEQPACKET tx with different buffers.
3) SOCK_STREAM test to read empty error queue of the socket.
Patch also works as preparation for
On Tue, Oct 10, 2023 at 10:15:24PM +0300, Arseniy Krasnov wrote:
This adds set of tests which use io_uring for rx/tx. This test suite is
implemented as separated util like 'vsock_test' and has the same set of
input arguments as 'vsock_test'. These tests only cover cases of data
transmission (no c
On Tue, Oct 10, 2023 at 10:15:12PM +0300, Arseniy Krasnov wrote:
Hello,
this patchset contains second and third parts of another big patchset
for MSG_ZEROCOPY flag support:
https://lore.kernel.org/netdev/20230701063947.3422088-1-avkras...@sberdevices.ru/
During review of this series, Stefano Ga
Hi Xuan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc5 next-20231011]
[cannot apply to mst-vhost/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch
On Wed, Oct 11, 2023 at 10:57:09AM -0300, Jason Gunthorpe wrote:
> > Independent of my above points on the doubts on VF-controlled live
> > migration for PCe device I absolutely agree with your that the Linux
> > abstraction and user interface should be VF based. Which further
> > reinforeces my p
On Wed, Oct 11, 2023 at 11:58:10AM -0300, Jason Gunthorpe wrote:
> Trying to put VFIO-only code in virtio is what causes all the
> issues. If you mis-design the API boundary everything will be painful,
> no matter where you put the code.
Are you implying the whole idea of adding these legacy virti
On Wed, Oct 11, 2023 at 09:18:49AM -0300, Jason Gunthorpe wrote:
> The simple way to be sure is to never touch the PCI function that has
> DMA assigned to a VM from the hypervisor, except through config space.
What makes config space different that it's safe though?
Isn't this more of a "we can't
On Wed, Oct 11, 2023 at 09:18:49AM -0300, Jason Gunthorpe wrote:
> With VDPA doing the same stuff as vfio I'm not sure who is auditing it
> for security.
Check the signed off tags and who sends the pull requests if you want to
know.
--
MST
___
Virtual
On Wed, Oct 11, 2023 at 02:19:44PM -0300, Jason Gunthorpe wrote:
> On Wed, Oct 11, 2023 at 12:59:30PM -0400, Michael S. Tsirkin wrote:
> > On Wed, Oct 11, 2023 at 11:58:10AM -0300, Jason Gunthorpe wrote:
> > > Trying to put VFIO-only code in virtio is what causes all the
> > > issues. If you mis-de
Hi Xuan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc5 next-20231011]
[cannot apply to mst-vhost/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch
On Wed, 11 Oct 2023 10:00:57 -0700, Jakub Kicinski wrote:
> On Wed, 11 Oct 2023 17:27:06 +0800 Xuan Zhuo wrote:
> > ## 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
> > perfo
On 10/11/2023 4:21 AM, Eugenio Perez Martin wrote:
On Tue, Oct 10, 2023 at 11:05 AM Si-Wei Liu wrote:
Devices with on-chip IOMMU or vendor specific IOTLB implementation
may need to restore iotlb mapping to the initial or default state
using the .reset_map op, as it's desirable for some parent
44 matches
Mail list logo