On Mon, Apr 24, 2023 at 12:53 PM Michael S. Tsirkin wrote:
>
> On Mon, Apr 24, 2023 at 11:50:20AM +0800, Jason Wang wrote:
> > On Thu, Apr 20, 2023 at 5:17 PM Zhu, Lingshan
> > wrote:
> > >
> > >
> > >
> > > On 4/3/2023 6:10 PM, Zhu, Lingshan wrote:
> > > >
> > > >
> > > > On 4/3/2023 1:28 PM, J
On Mon, Apr 24, 2023 at 11:50:20AM +0800, Jason Wang wrote:
> On Thu, Apr 20, 2023 at 5:17 PM Zhu, Lingshan wrote:
> >
> >
> >
> > On 4/3/2023 6:10 PM, Zhu, Lingshan wrote:
> > >
> > >
> > > On 4/3/2023 1:28 PM, Jason Wang wrote:
> > >> On Fri, Mar 31, 2023 at 8:49 PM Zhu Lingshan
> > >> wrote:
>
On Sat, Apr 01, 2023 at 04:48:49AM +0800, Zhu Lingshan wrote:
> Formerly, ifcvf driver has implemented a lazy-initialization mechanism
> for the virtqueues and other config space contents,
> it would store all configurations that passed down from the userspace,
> then load them to the device config
subj typo: virtio
On Sat, Apr 01, 2023 at 04:48:51AM +0800, Zhu Lingshan wrote:
> This commit implements a new function ifcvf_get_driver_feature()
> which read driver_features from virtio registers.
>
> To be less ambiguous, ifcvf_set_features() is renamed to
> ifcvf_set_driver_features(), and if
On Thu, Apr 20, 2023 at 5:17 PM Zhu, Lingshan wrote:
>
>
>
> On 4/3/2023 6:10 PM, Zhu, Lingshan wrote:
> >
> >
> > On 4/3/2023 1:28 PM, Jason Wang wrote:
> >> On Fri, Mar 31, 2023 at 8:49 PM Zhu Lingshan
> >> wrote:
> >>> Formerly, ifcvf driver has implemented a lazy-initialization mechanism
> >>
On Thu, Apr 20, 2023 at 11:17 PM Cindy Lu wrote:
>
> While using the vdpa device with vIOMMU enabled
> in the guest VM, when the vdpa device bind to vfio-pci and run testpmd
> then system will fail to unmap.
> The test process is
> Load guest VM --> attach to virtio driver--> bind to vfio-pci driv
On Sun, Apr 23, 2023 at 4:22 PM Yongji Xie wrote:
>
> On Sun, Apr 23, 2023 at 2:31 PM Jason Wang wrote:
> >
> > On Fri, Apr 21, 2023 at 10:28 PM Maxime Coquelin
> > wrote:
> > >
> > >
> > >
> > > On 4/21/23 07:51, Jason Wang wrote:
> > > > On Thu, Apr 20, 2023 at 10:16 PM Maxime Coquelin
> > > >
On Sun, Apr 23, 2023 at 08:45:20AM +0200, Greg KH wrote:
> On Sun, Apr 23, 2023 at 02:25:45PM +0800, Xuan Zhuo wrote:
> > The purpose of this patch is to allow driver pass the own dma callbacks
> > to xsk.
> >
> > This is to cope with the scene of virtio-net. If virtio does not have
> > VIRTIO_F_A
On Sun, Apr 23, 2023 at 12:28:49PM +, Alvaro Karsz wrote:
>
> > > > The rest of stuff can probably just be moved to after find_vqs without
> > > > much pain.
> > > >
> > > Actually, I think that with a little bit of pain :)
> > > If we use small vrings and a GRO feature bit is set, Linux will
> > > The rest of stuff can probably just be moved to after find_vqs without
> > > much pain.
> > >
> > Actually, I think that with a little bit of pain :)
> > If we use small vrings and a GRO feature bit is set, Linux will need to
> > allocate 64KB of continuous memory for every receive descrip
On Mon, Apr 17, 2023 at 06:43:39AM +, Alvaro Karsz wrote:
> > > +static int virtnet_validate_vqs(struct virtnet_info *vi)
> > > +{
> > > + u32 i, min_size = roundup_pow_of_two(MAX_SKB_FRAGS + 2);
> >
> > why power of two?
>
> The ring size is always a power of 2,
Not really, packed rings
On Sun, Apr 23, 2023 at 08:01:35AM +, Alvaro Karsz wrote:
> We could add a new virtio_config_ops: peek_vqs.
> We can call it during virtnet_validate, and then fixup the features in case
> of small vrings.
>
> If peek_vqs is not implemented by the transport, we can just fail probe later
> in
On Sun, Apr 23, 2023 at 07:52:10AM +, Alvaro Karsz wrote:
> > Hmm. I was wrong. There is no way to disable CVQ feature bit.
> >
> > 1. Reset the device.
> > 2. Set the ACKNOWLEDGE status bit: the guest OS has notice the device.
> > 3. Set the DRIVER status bit: the guest OS knows how to drive
This logic is used in multiple places, now we separate it into
a helper.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 34 +-
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 811cf1
now, the process of xdp is simple, we can remove the skip_xdp.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 601c0e7fc32b..d2973c8fa4
In the case of XDP-PASS, skb_reserve uses the delta to compatible
non-XDP, now remove this logic.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net
Simplifying receive_small() function. Bringing the logic relating to
build_skb together.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 48 ++--
1 file changed, 31 insertions(+), 17 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/vir
virtnet_build_xdp_buff_mrg() and virtnet_xdp_handler() auto
release xdp shinfo then the caller no need to careful the xdp shinfo.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 29 +
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/drivers/net/
Now, the logic of merge xdp process is simple, we can remove the
skip_xdp.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
The purpose of this patch is to simplify the receive_mergeable().
Separate all the logic of XDP into a function.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 100 ---
1 file changed, 62 insertions(+), 38 deletions(-)
diff --gi
This patch introduce a new function that frees the rest mergeable buf.
The subsequent patch will reuse this function.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 36
1 file changed, 24 insertions(+), 12 deletions(-)
diff --g
Avoid the problem that some variables(headroom and so on) will repeat
the calculation when process xdp.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index
At present, we have two similar logic to perform the XDP prog.
Therefore, this patch separates the code of executing XDP, which is
conducive to later maintenance.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 118 +++
1 file ch
The purpose of this patch is to simplify the receive_small().
Separate all the logic of XDP of small into a function.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 165 ---
1 file changed, 100 insertions(+), 65 deletions(-)
diff --git a/drivers/net/
Separating the logic of preparation for xdp from receive_mergeable.
The purpose of this is to simplify the logic of execution of XDP.
The main logic here is that when headroom is insufficient, we need to
allocate a new page and calculate offset. It should be noted that if
there is new page, the v
This patch introduce a new function that releases the
xdp shinfo. The subsequent patch will reuse this function.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/n
In the xdp implementation of virtio-net mergeable, it always checks
whether two page is used and a page is selected to release. This is
complicated for the processing of action, and be careful.
In the entire process, we have such principles:
* If xdp_page is used (PASS, TX, Redirect), then we rele
Due to historical reasons, the implementation of XDP in virtio-net is relatively
chaotic. For example, the processing of XDP actions has two copies of similar
code. Such as page, xdp_page processing, etc.
The purpose of this patch set is to refactor these code. Reduce the difficulty
of subsequent
The previous patch, in order to facilitate review, I do not do any
modification. This patch has made some optimization on the top.
* remove some repeated logics in this function.
* add fast check for passing without any alloc.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virti
On Sun, 23 Apr 2023 10:39:15 +0200, Greg KH wrote:
> On Sun, Apr 23, 2023 at 02:58:36PM +0800, Xuan Zhuo wrote:
> > On Sun, 23 Apr 2023 08:45:20 +0200, Greg KH
> > wrote:
> > > On Sun, Apr 23, 2023 at 02:25:45PM +0800, Xuan Zhuo wrote:
> > > > The purpose of this patch is to allow driver pass th
On Sun, Apr 23, 2023 at 02:58:36PM +0800, Xuan Zhuo wrote:
> On Sun, 23 Apr 2023 08:45:20 +0200, Greg KH
> wrote:
> > On Sun, Apr 23, 2023 at 02:25:45PM +0800, Xuan Zhuo wrote:
> > > The purpose of this patch is to allow driver pass the own dma callbacks
> > > to xsk.
> > >
> > > This is to cope
We could add a new virtio_config_ops: peek_vqs.
We can call it during virtnet_validate, and then fixup the features in case of
small vrings.
If peek_vqs is not implemented by the transport, we can just fail probe later
in case of small vrings.
___
Vir
> Hmm. I was wrong. There is no way to disable CVQ feature bit.
>
> 1. Reset the device.
> 2. Set the ACKNOWLEDGE status bit: the guest OS has notice the device.
> 3. Set the DRIVER status bit: the guest OS knows how to drive the device.
> 4. Read device feature bits, and write the subset of featu
On Sun, 23 Apr 2023 08:45:20 +0200, Greg KH wrote:
> On Sun, Apr 23, 2023 at 02:25:45PM +0800, Xuan Zhuo wrote:
> > The purpose of this patch is to allow driver pass the own dma callbacks
> > to xsk.
> >
> > This is to cope with the scene of virtio-net. If virtio does not have
> > VIRTIO_F_ACCESS_
On Sun, Apr 23, 2023 at 06:51:46AM +, Alvaro Karsz wrote:
> > Yes that makes sense, it's architetural. We can disable ctrl vq though.
>
> The problem here is that we know the vring size after calling
> virtnet_find_vqs, so the number of VQs already includes the control VQ.
>
> Actually, many
35 matches
Mail list logo