Don't break the resize action if the vq coalescing feature
named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated.
Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq resize")
Signed-off-by: Heng Qi
Reviewed-by: Xuan Zhuo
Acked-by: Eugenio Pé rez
Acked-by: Jason W
;v4:
- Add a comment for patch[2/2].
v2->v3:
- Break out the feature check and the fix into separate patches.
v1->v2:
- Rephrase the subject.
- Put the feature check inside the virtnet_send_{r,t}x_ctrl_coal_vq_cmd.
Heng Qi (2):
virtio-net: check feature before configuring the vq c
for the next bugfix patch.
Suggested-by: Michael S. Tsirkin
Signed-off-by: Heng Qi
---
v2->v3:
- Break out the feature check and the fix into separate patches.
drivers/net/virtio_net.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/
On Thu, 1 Aug 2024 08:30:44 -0400, "Michael S. Tsirkin" wrote:
> On Thu, Aug 01, 2024 at 08:27:39PM +0800, Heng Qi wrote:
> > Don't break the resize action if the vq coalescing feature
> > named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated.
> >
> > Fi
;v3:
- Break out the feature check and the fix into separate patches.
v1->v2:
- Rephrase the subject.
- Put the feature check inside the virtnet_send_{r,t}x_ctrl_coal_vq_cmd.
Heng Qi (2):
virtio-net: check feature before configuring the vq coalescing command
virtio-net: unbreak vq re
for the next bugfix patch.
Suggested-by: Michael S. Tsirkin
Signed-off-by: Heng Qi
---
v2->v3:
- Break out the feature check and the fix into separate patches.
drivers/net/virtio_net.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/
Don't break the resize action if the vq coalescing feature
named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated.
Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq resize")
Signed-off-by: Heng Qi
Reviewed-by: Xuan Zhuo
Acked-by: Eugenio Pé rez
Acked-by: Jason W
On Wed, 31 Jul 2024 08:46:42 -0400, "Michael S. Tsirkin"
wrote:
> On Wed, Jul 31, 2024 at 08:25:23PM +0800, Heng Qi wrote:
> > On Wed, 31 Jul 2024 08:14:43 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Wed, Jul 31, 2024 at 08:07:17PM +0800,
On Wed, 31 Jul 2024 08:14:43 -0400, "Michael S. Tsirkin"
wrote:
> On Wed, Jul 31, 2024 at 08:07:17PM +0800, Heng Qi wrote:
> > >From the virtio spec:
> >
> > The driver MUST have negotiated the VIRTIO_NET_F_VQ_NOTF_COAL
> > feature when issuing c
if
VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated. This limitation of course
applies to vq resize.
Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq resize")
Signed-off-by: Heng Qi
Reviewed-by: Xuan Zhuo
Acked-by: Eugenio Pé rez
Acked-by: Jason Wang
---
v1->v2:
- Rephrase the sub
On Tue, 30 Jul 2024 18:20:20 -0700, Jakub Kicinski wrote:
> On Mon, 29 Jul 2024 20:47:55 +0800 Heng Qi wrote:
> > Subject: [PATCH net] virtio_net: Avoid sending unnecessary vq coalescing
> > commands
>
> subject currently reads like this is an optimization, could you
On Wed, 31 Jul 2024 11:13:03 +0800, Jason Wang wrote:
> On Wed, Jul 31, 2024 at 9:20 AM Jakub Kicinski wrote:
> >
> > On Mon, 29 Jul 2024 20:47:55 +0800 Heng Qi wrote:
> > > Subject: [PATCH net] virtio_net: Avoid sending unnecessary vq coalescing
> > > command
if
VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated. This limitation of course
applies to vq resize.
Fixes: f61fe5f081cf ("virtio-net: fix the vq coalescing setting for vq resize")
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 29 +
1 file changed, 17 insertions(+), 12 delet
chael S. Tsirkin"
> >>> >> > wrote:
> >>> >> >> On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote:
> >>> >> >> > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote:
> >
On Thu, 20 Jun 2024 18:27:16 +0800, Heng Qi wrote:
> On Thu, 20 Jun 2024 06:19:01 -0400, "Michael S. Tsirkin"
> wrote:
> > On Thu, Jun 20, 2024 at 05:28:48PM +0800, Heng Qi wrote:
> > > On Thu, 20 Jun 2024 16:33:35 +0800, Jason Wang
> > > wrote:
>
On Thu, 20 Jun 2024 06:11:40 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, Jun 20, 2024 at 06:10:51AM -0400, Michael S. Tsirkin wrote:
> > On Thu, Jun 20, 2024 at 05:53:15PM +0800, Heng Qi wrote:
> > > On Thu, 20 Jun 2024 16:26:05 +0800, Jason Wang
> > > wro
On Thu, 20 Jun 2024 06:19:01 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, Jun 20, 2024 at 05:28:48PM +0800, Heng Qi wrote:
> > On Thu, 20 Jun 2024 16:33:35 +0800, Jason Wang wrote:
> > > On Tue, Jun 18, 2024 at 11:17 AM Heng Qi wrote:
> > > >
> >
On Thu, 20 Jun 2024 16:26:05 +0800, Jason Wang wrote:
> On Thu, Jun 20, 2024 at 4:21 PM Jason Wang wrote:
> >
> > On Thu, Jun 20, 2024 at 3:35 PM Heng Qi wrote:
> > >
> > > On Wed, 19 Jun 2024 17:19:12 -0400, "Michael S. Tsirkin"
> > > wro
On Thu, 20 Jun 2024 04:32:15 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, Jun 20, 2024 at 03:29:15PM +0800, Heng Qi wrote:
> > On Wed, 19 Jun 2024 17:19:12 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Thu, Jun 20, 2024 at 12:19:05AM +0800, Heng Qi
On Thu, 20 Jun 2024 16:33:35 +0800, Jason Wang wrote:
> On Tue, Jun 18, 2024 at 11:17 AM Heng Qi wrote:
> >
> > On Tue, 18 Jun 2024 11:10:26 +0800, Jason Wang wrote:
> > > On Mon, Jun 17, 2024 at 9:15 PM Heng Qi wrote:
> > > >
> > > >
On Wed, 19 Jun 2024 17:19:12 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, Jun 20, 2024 at 12:19:05AM +0800, Heng Qi wrote:
> > @@ -5312,7 +5315,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
> >
> > /* Parameters for control virtqueue, if
On Wed, 19 Jun 2024 17:16:57 -0400, "Michael S. Tsirkin"
wrote:
> On Thu, Jun 20, 2024 at 12:19:03AM +0800, Heng Qi wrote:
> > Ctrlq in polling mode may cause the virtual machine to hang and
> > occupy additional CPU resources. Enabling the irq for ctrlq
> > all
Currently, control vq handles commands synchronously,
leading to increased delays for dim commands during multi-queue
VM configuration and directly impacting dim performance.
To address this, we are shifting to asynchronous processing of
ctrlq's dim commands.
Signed-off-by: Heng Qi
---
dr
Refactor the command handling logic by splitting
virtnet_send_command_reply into virtnet_add_command_reply
and virtnet_wait_command_response for better clarity and
subsequent use.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 53
1 file changed
Previously, control vq only allowed a single request to be sent,
so using virtnet_info as a global token was fine. To support
concurrent requests, the driver needs to use a command-level token
to distinguish between requests that have been sent.
Signed-off-by: Heng Qi
---
drivers/net
-by: Jason Wang
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b45f58a902e3..ed10084997d3 100644
--- a/drivers/net/virtio_net.c
+++ b/d
In a later patch, the driver may send requests concurrently, in
which case each command will have its own control buffer, so we
refactor virtnet_send_command_reply() to pass the control buffer
explicitly as a parameter.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 22
Add interrupt suppression.
v2->v3:
- Use the completion for dim cmds.
v1->v2:
- Refactor the patch 1 and rephase the commit log.
Heng Qi (5):
virtio_net: passing control_buf explicitly
virtio_net: enable irq for the control vq
virtio_net: change the command token to completion
v
在 2024/6/19 下午11:08, Jakub Kicinski 写道:
On Wed, 19 Jun 2024 10:02:58 +0800 Heng Qi wrote:
Currently we do not allow RXCUSM to be disabled.
You don't have to disable checksuming in the device.
Yes, it is up to the device itself to decide whether to validate checksum.
What I mean is th
On Wed, 19 Jun 2024 10:55:29 +0800, Li RongQing wrote:
> This place is fetching the stats, so u64_stats_fetch_begin
> and u64_stats_fetch_retry should be used
Reviewed-by: Heng Qi
Thanks!
>
> Fixes: 6208799553a8 ("virtio-net: support rx netdim")
> Signed-off-by: Li R
On Tue, 18 Jun 2024 18:15:16 -0700, Jakub Kicinski wrote:
> On Tue, 18 Jun 2024 11:09:02 +0800 Heng Qi wrote:
> > > (Should we manually do checksum if RXCUSM is disabled?)
> > >
> >
> > Currently we do not allow RXCUSM to be disabled.
>
> You don'
On Tue, 18 Jun 2024 09:29:48 +0800, Jason Wang wrote:
> On Mon, Jun 17, 2024 at 4:08 PM Heng Qi wrote:
> >
> > On Mon, 17 Jun 2024 12:05:30 +0800, Jason Wang wrote:
> > > On Thu, Jun 6, 2024 at 2:15 PM Heng Qi wrote:
> > > >
> > > > Curr
On Tue, 18 Jun 2024 11:10:26 +0800, Jason Wang wrote:
> On Mon, Jun 17, 2024 at 9:15 PM Heng Qi wrote:
> >
> > The XDP program can't correctly handle partially checksummed
> > packets, but works fine with fully checksummed packets.
>
> Not sure this is ture, if
On Tue, 18 Jun 2024 11:01:27 +0800, Jason Wang wrote:
> On Mon, Jun 17, 2024 at 9:15 PM Heng Qi wrote:
> >
> > In virtio spec 0.95, VIRTIO_NET_F_GUEST_CSUM was designed to handle
> > partially checksummed packets, and the validation of fully checksummed
> > packets b
t drop all partially checksummed
packets when VIRTIO_NET_F_GUEST_CSUM is not negotiated. This is
not a bug, as the driver has always done this.
Fixes: 436c9453a1ac ("virtio-net: keep vnet header zeroed after processing XDP")
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 20
XDP program had no trouble
with fully checksummed packets.
Heng Qi (2):
virtio_net: checksum offloading handling fix
virtio_net: fixing XDP for fully checksummed packets handling
drivers/net/virtio_net.c | 32 +---
1 file changed, 29 insertions(+), 3 deletions
d in the virtio TC vote.
[1] https://lists.oasis-open.org/archives/virtio-comment/202401/msg00011.html
Fixes: 4f49129be6fa ("virtio-net: Set RXCSUM feature if GUEST_CSUM is
available")
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 12 ++--
1 file changed, 10 insertions
On Mon, 17 Jun 2024 12:05:30 +0800, Jason Wang wrote:
> On Thu, Jun 6, 2024 at 2:15 PM Heng Qi wrote:
> >
> > Currently, control vq handles commands synchronously,
> > leading to increased delays for dim commands during multi-queue
> > VM configuration and directl
Currently, control vq handles commands synchronously,
leading to increased delays for dim commands during multi-queue
VM configuration and directly impacting dim performance.
To address this, we are shifting to asynchronous processing of
ctrlq's dim commands.
Signed-off-by: Heng Qi
---
dr
-by: Jason Wang
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0f872936d6ed..823a9dca51c1 100644
--- a/drivers/net/virtio_net.c
+++ b/d
In a later patch, the driver may send requests concurrently, in
which case each command will have its own control buffer, so we
refactor virtnet_send_command_reply() to pass the control buffer
explicitly as a parameter.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 22
Previously, control vq only allowed a single request to be sent,
so using virtnet_info as a global token was fine. To support
concurrent requests, the driver needs to use a command-level token
to distinguish between requests that have been sent.
Signed-off-by: Heng Qi
---
drivers/net
atch 1 and rephase the commit log.
Heng Qi (4):
virtio_net: passing control_buf explicitly
virtio_net: enable irq for the control vq
virtio_net: change the command token to completion
virtio_net: improve dim command request efficiency
drivers/net/virtio_net.c
On Thu, 6 Jun 2024 08:27:35 +0800, Jason Wang wrote:
> On Wed, Jun 5, 2024 at 10:56 PM Heng Qi wrote:
> >
> > Currently, the control queue (ctrlq) handles commands synchronously,
> > leading to increased delays for dim commands during multi-queue
> > VM configuration
Currently, the control queue (ctrlq) handles commands synchronously,
leading to increased delays for dim commands during multi-queue
VM configuration and directly impacting dim performance.
To address this, we are shifting to asynchronous processing of
ctrlq's dim commands.
Signed-off-by:
Ctrlq in polling mode may cause the virtual machine to hang and
occupy additional CPU resources. Enabling the irq for ctrlq
alleviates this problem and allows commands to be requested
concurrently.
Changelog
=
v1->v2:
- Refactor the patch 1 and rephase the commit log.
Heng Qi
is code is basically from Jason:
https://lore.kernel.org/all/20230413064027.13267-3-jasow...@redhat.com/
Suggested-by: Jason Wang
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/net/virtio_net.c b/d
On Wed, 5 Jun 2024 13:30:51 +0200, Jiri Pirko wrote:
> Mon, May 20, 2024 at 02:48:15PM CEST, j...@resnulli.us wrote:
> >Fri, May 10, 2024 at 09:11:16AM CEST, hen...@linux.alibaba.com wrote:
> >>On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote:
> >>> From: Jiri Pirko
> >>>
> >>> Add support
On Thu, 30 May 2024 10:34:07 +0200, Paolo Abeni wrote:
> On Tue, 2024-05-28 at 21:41 +0800, Heng Qi wrote:
> > When the following snippet is run, lockdep will report a deadlock[1].
> >
> > /* Acquire all queues dim_locks */
> > for (i = 0;
Refactored the handling of control_buf to be within the cvq_lock
critical section, mitigating race conditions between reading device
responses and new command submissions.
Fixes: 6f45ab3e0409 ("virtio_net: Add a lock for the command VQ.")
Signed-off-by: Heng Qi
Reviewed-by: Haripr
On Wed, 29 May 2024 17:10:53 -0700, Jakub Kicinski wrote:
> On Tue, 28 May 2024 15:52:25 +0800 Heng Qi wrote:
> > The integer variable 'ret', denoting the return code, is mismatched with
> > the boolean return type of virtnet_send_command_reply(); hence, it is
> >
On Tue, 28 May 2024 12:45:32 -0400, "Michael S. Tsirkin"
wrote:
> On Wed, May 29, 2024 at 12:01:45AM +0800, Heng Qi wrote:
> > On Tue, 28 May 2024 11:46:28 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Tue, May 28, 2024 at 03:52:26PM +0800, Heng
On Tue, 28 May 2024 11:46:28 -0400, "Michael S. Tsirkin"
wrote:
> On Tue, May 28, 2024 at 03:52:26PM +0800, Heng Qi wrote:
> > Refactored the handling of control_buf to be within the cvq_lock
> > critical section, mitigating race conditions between reading device
>
x8a0
__x64_sys_sendto+0x29/0x30
do_syscall_64+0x78/0x180
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Fixes: 4d4ac2ececd3 ("virtio_net: Add a lock for per queue RX coalesce")
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 36
1 file changed, 16 in
disabled or parameters have not been modified;
3. virtnet_rx_dim_work exits directly;
Then, even if net_dim is invoked again, it cannot work because the
state is not restored to DIM_START_MEASURE.
Fixes: 6208799553a8 ("virtio-net: support rx netdim")
Signed-off-by: Heng Qi
Reviewe
2): rephase the commit log.
Heng Qi (2):
virtio_net: fix possible dim status unrecoverable
virtio_net: fix a spurious deadlock issue
drivers/net/virtio_net.c | 38 +-
1 file changed, 17 insertions(+), 21 deletions(-)
--
2.32.0.3.g01195cf9f
在 2024/5/28 下午6:04, Paolo Abeni 写道:
On Tue, 2024-05-28 at 11:06 +0800, Heng Qi wrote:
On Mon, 27 May 2024 12:42:43 +0200, Paolo Abeni wrote:
On Thu, 2024-05-23 at 15:46 +0800, Heng Qi wrote:
This reverts commit 4d4ac2ececd3c42a08dd32a6e3a4aaf25f7efe44.
When the following snippet is run
The integer variable 'ret', denoting the return code, is mismatched with
the boolean return type of virtnet_send_command_reply(); hence, it is
renamed to 'err'.
The usage of 'ret' is deferred to the next patch.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c |
Patch 1 did a simple rename, leaving 'ret' for patch 2.
Patch 2 fixed a race between reading the device response and the
new command submission.
Heng Qi (2):
virtio_net: rename ret to err
virtio_net: fix missing lock protection on control_buf access
drivers/net/virtio_
Refactored the handling of control_buf to be within the cvq_lock
critical section, mitigating race conditions between reading device
responses and new command submissions.
Fixes: 6f45ab3e0409 ("virtio_net: Add a lock for the command VQ.")
Signed-off-by: Heng Qi
---
drivers/net/virtio
On Mon, 27 May 2024 12:42:43 +0200, Paolo Abeni wrote:
> On Thu, 2024-05-23 at 15:46 +0800, Heng Qi wrote:
> > This reverts commit 4d4ac2ececd3c42a08dd32a6e3a4aaf25f7efe44.
> >
> > When the following snippet is run, lockdep will report a deadlock[1].
> >
> >
gelog
===
v1->v2:
Patch(2/2): rephase the commit log.
Heng Qi (2):
virtio_net: fix possible dim status unrecoverable
Revert "virtio_net: Add a lock for per queue RX coalesce"
drivers/net/virtio_net.c | 55 ++--
1 file changed, 13 insertion
5e/0x160
? do_user_addr_fault+0x3a2/0x8a0
? lock_release+0x72/0x140
? do_user_addr_fault+0x3a7/0x8a0
__x64_sys_sendto+0x29/0x30
do_syscall_64+0x78/0x180
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Fixes: 4d4ac2ececd3 ("virtio_net: Add a lock for per queue RX coalesce")
Signed-off-by: Heng Q
disabled or parameters have not been modified;
3. virtnet_rx_dim_work exits directly;
Then, even if net_dim is invoked again, it cannot work because the
state is not restored to DIM_START_MEASURE.
Fixes: 6208799553a8 ("virtio-net: support rx netdim")
Signed-off-by: Heng Qi
Reviewe
On Wed, 22 May 2024 05:44:43 -0400, "Michael S. Tsirkin"
wrote:
> On Wed, May 22, 2024 at 04:52:19PM +0800, Heng Qi wrote:
> > On Wed, 22 May 2024 10:15:46 +0200, Jiri Pirko wrote:
> > > Wed, May 22, 2024 at 05:45:48AM CEST, hen...@linux.alibaba.com wrote
0
> > genl_family_rcv_msg_doit+0xdc/0x130
> > genl_family_rcv_msg+0x154/0x230
> > ? __pfx_ethnl_default_set_doit+0x10/0x10
> > genl_rcv_msg+0x4b/0xa0
> > ? __pfx_genl_rcv_msg+0x10/0x10
> > netlink_rcv_skb+0x5a/0x110
> > genl_rcv+0x28/0x40
> > netlink_uni
disabled or parameters have not been modified;
3. virtnet_rx_dim_work exits directly;
Then, even if net_dim is invoked again, it cannot work because the
state is not restored to DIM_START_MEASURE.
Fixes: 6208799553a8 ("virtio-net: support rx netdim")
Signed-off-by: Heng Qi
---
d
1fe/0x210
? find_held_lock+0x2b/0x80
? do_user_addr_fault+0x3a2/0x8a0
? __lock_release+0x5e/0x160
? do_user_addr_fault+0x3a2/0x8a0
? lock_release+0x72/0x140
? do_user_addr_fault+0x3a7/0x8a0
__x64_sys_sendto+0x29/0x30
do_syscall_64+0x78/0x180
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Signed-of
Patch 1 describes and fixes an issue where dim cannot return to
normal state in certain scenarios.
Patch 2 attempts to resolve lockdep's complaints that holding many
nested locks and when there is a maximum number of queues may also
be problematic, so try to remove the dim_lock.
Heng
On Thu, 9 May 2024 13:46:15 +0200, Jiri Pirko wrote:
> From: Jiri Pirko
>
> Add support for Byte Queue Limits (BQL).
Historically both Jason and Michael have attempted to support BQL
for virtio-net, for example:
https://lore.kernel.org/netdev/21384cb5-99a6-7431-1039-b356521e1...@redhat.com/
On Wed, 8 May 2024 10:19:06 +0800, Jason Wang wrote:
> On Tue, May 7, 2024 at 2:33 PM Heng Qi wrote:
> >
> > On Tue, 7 May 2024 14:24:16 +0800, Jason Wang wrote:
> > > On Tue, May 7, 2024 at 12:03 PM Heng Qi wrote:
> > > >
> > > > On Tue, 7 May
On Wed, 8 May 2024 10:20:05 +0800, Jason Wang wrote:
> On Tue, May 7, 2024 at 2:56 PM Heng Qi wrote:
> >
> > On Tue, 7 May 2024 14:24:19 +0800, Jason Wang wrote:
> > > On Fri, Apr 26, 2024 at 2:54 PM Heng Qi wrote:
> > > >
> > > > From: Xuan
On Wed, 8 May 2024 10:22:04 +0800, Jason Wang wrote:
> On Tue, May 7, 2024 at 3:01 PM Heng Qi wrote:
> >
> > On Tue, 7 May 2024 14:24:12 +0800, Jason Wang wrote:
> > > On Fri, Apr 26, 2024 at 2:54 PM Heng Qi wrote:
> > > >
> > > > Current
On Tue, 7 May 2024 14:24:12 +0800, Jason Wang wrote:
> On Fri, Apr 26, 2024 at 2:54 PM Heng Qi wrote:
> >
> > Currently, virtio-net lacks a way to obtain the default coalesce
> > values of the device during the probe phase. That is, the device
> > may have default expe
On Tue, 7 May 2024 14:24:19 +0800, Jason Wang wrote:
> On Fri, Apr 26, 2024 at 2:54 PM Heng Qi wrote:
> >
> > From: Xuan Zhuo
> >
> > As the spec
> > https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> >
> > B
On Tue, 7 May 2024 14:24:16 +0800, Jason Wang wrote:
> On Tue, May 7, 2024 at 12:03 PM Heng Qi wrote:
> >
> > On Tue, 7 May 2024 11:15:22 +0800, Jason Wang wrote:
> > > On Thu, Apr 25, 2024 at 8:59 PM Heng Qi wrote:
> > > >
> > > > Con
On Tue, 7 May 2024 11:15:22 +0800, Jason Wang wrote:
> On Thu, Apr 25, 2024 at 8:59 PM Heng Qi wrote:
> >
> > Control vq polling request results consume more CPU.
> > Especially when dim issues more control requests to the device,
> > it's beneficial to the
> addition of dynamic interrupt moderation the control VQ may be used
> frequently during normal operation.
>
> This series removes the RNTL lock dependency by introducing a mutex
> to protect the control buffer and writing SGs to the control VQ.
>
For the series, keep tags:
Revie
On Tue, 23 Apr 2024 06:57:42 +0300, Daniel Jurgens wrote:
> 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 tha
well.
Please taking Paolo's tips into consideration.
For the series:
Reviewed-by: Heng Qi
Tested-by: Heng Qi
Thanks!
v5:
- Changed cvq_lock to a mutex.
- Changed dim_lock to mutex, because it's held taking
the cvq_lock.
- Use spin/mutex_lock/unlock vs g
_VQ_GET to complete the goal.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 68 +++-
1 file changed, 61 insertions(+), 7 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3bc9b1e621db..fe0c15819dd3 100644
--- a/drivers/net/vi
From: Xuan Zhuo
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
Based on the description provided in the above specification, we have
enabled the virtio-net driver to support acquiring some response
information from the device via the CVQ (Co
Patch 1 from Xuan: the virtnet cvq supports to get
result from the device.
Patch 2 reuses the VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET cmd to
get init coalesce value.
Changelog
==
v1->v2:
- Update patch1's commit log.
Heng Qi (1):
virtio_net: get init coalesce value when probe
Xuan
在 2024/4/26 上午10:21, Jakub Kicinski 写道:
On Thu, 25 Apr 2024 20:58:54 +0800 Heng Qi wrote:
When the dim worker is scheduled, if it no longer needs to issue
commands, dim may not be able to return to the working state later.
For example, the following single queue scenario:
1. The dim
mands.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 229 +++
1 file changed, 209 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 8f05bcf1d37d..6cd72c0119e6 100644
--- a/drivers/net/virtio_net.c
+++ b/dr
/ ,
so patchwork may cause warnings.
Heng Qi (3):
virtio_net: enable irq for the control vq
virtio_net: fix possible dim status unrecoverable
virtio_net: improve dim command request efficiency
drivers/net/virtio_net.c | 268 +++
1 file changed, 240
Control vq polling request results consume more CPU.
Especially when dim issues more control requests to the device,
it's beneficial to the guest to enable control vq's irq.
Suggested-by: Jason Wang
Signed-off-by: Heng Qi
---
drivers/net/virtio_
disabled or parameters have not been modified;
3. virtnet_rx_dim_work exits directly;
Then, even if net_dim is invoked again, it cannot work because the
state is not restored to DIM_START_MEASURE.
Fixes: 6208799553a8 ("virtio-net: support rx netdim")
Signed-off-by: Heng Qi
---
d
在 2024/4/23 上午4:55, Michael S. Tsirkin 写道:
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
在 2024/4/23 下午6:17, Jiri Pirko 写道:
Tue, Apr 23, 2024 at 10:42:25AM CEST, hen...@linux.alibaba.com wrote:
From: Xuan Zhuo
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
The virtnet cvq supports to get result from the device.
Is this a
_VQ_GET to complete the goal.
Signed-off-by: Heng Qi
---
drivers/net/virtio_net.c | 68 +++-
1 file changed, 61 insertions(+), 7 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3bc9b1e621db..fe0c15819dd3 100644
--- a/drivers/net/vi
From: Xuan Zhuo
As the spec
https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
The virtnet cvq supports to get result from the device.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 24 +---
1 file changed, 17 insertions(+),
Patch 1 from Xuan: the virtnet cvq supports to get
result from the device.
Patch 2 reuses the VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET cmd to
get init coalesce value.
Heng Qi (1):
virtio_net: get init coalesce value when probe
Xuan Zhuo (1):
virtio_net: virtnet_send_command supports command
在 2024/4/18 下午11:48, Paolo Abeni 写道:
On Thu, 2024-04-18 at 15:38 +, Dan Jurgens wrote:
From: Paolo Abeni
Sent: Thursday, April 18, 2024 5:57 AM
On Thu, 2024-04-18 at 15:36 +0800, Heng Qi wrote:
在 2024/4/18 下午2:42, Jason Wang 写道:
On Wed, Apr 17, 2024 at 3:31 AM Daniel Jurgens
wrote
I didn't see any warnings with GCC or clang. This is used other places in the
kernel as well.
gcc version 13.2.1 20230918 (Red Hat 13.2.1-3) (GCC)
clang version 17.0.6 (Fedora 17.0.6-2.fc39)
I think Paolo is suggesting this[1][2], guard will mess with the sparse
check and cause a warning:
[
在 2024/4/18 下午2:42, Jason Wang 写道:
On Wed, Apr 17, 2024 at 3:31 AM Daniel Jurgens wrote:
The command VQ will no longer be protected by the RTNL lock. Use a
spinlock to protect the control buffer header and the VQ.
Signed-off-by: Daniel Jurgens
Reviewed-by: Jiri Pirko
---
drivers/net/vir
在 2024/4/17 下午2:52, Jason Xing 写道:
On Wed, Apr 17, 2024 at 2:35 PM Heng Qi wrote:
在 2024/4/17 上午10:53, Jason Xing 写道:
Hello Jakub,
On Wed, Apr 17, 2024 at 10:30 AM Jakub Kicinski wrote:
On Wed, 17 Apr 2024 10:22:52 +0800 Heng Qi wrote:
Have you encountered compilation problems in v8
在 2024/4/17 上午10:53, Jason Xing 写道:
Hello Jakub,
On Wed, Apr 17, 2024 at 10:30 AM Jakub Kicinski wrote:
On Wed, 17 Apr 2024 10:22:52 +0800 Heng Qi wrote:
Have you encountered compilation problems in v8?
Yes, please try building allmodconfig:
make allmodconfig
make ..
there's
在 2024/4/17 上午8:38, Jakub Kicinski 写道:
On Tue, 16 Apr 2024 20:29:46 +0800 Heng Qi wrote:
Please review, thank you very much!
Please stop posting code which does not compile.
The mailing list is for reviewing code, not build testing it.
Sorry, three versions v7, RESEND v7, v8 in two days
These will be used in subsequent patches, including
newly declared profile arrays.
Signed-off-by: Heng Qi
---
include/linux/dim.h | 13 +
lib/dim/net_dim.c | 10 ++
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/include/linux/dim.h b/include/linux/dim.h
1 - 100 of 220 matches
Mail list logo