Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Jason Wang
On Fri, Apr 19, 2024 at 12:12 AM Heng Qi wrote: > > > > 在 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 下午

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Heng Qi
在 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:

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Heng Qi
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: [

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Jakub Kicinski
On Thu, 18 Apr 2024 17:48:57 +0200 Paolo Abeni wrote: > > > Side note: the compiler apparently does not like guard() construct, > > > leading to > > > new warning, here and in later patches. I'm unsure if the code > > > simplification > > > is worthy. > > > > I didn't see any warnings with GCC

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread 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: > > > > >

RE: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Dan Jurgens
> 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: > > > > The command VQ will no longer be protected by the RTNL lock. Use a > >

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Paolo Abeni
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: > > > The command VQ will no longer be protected by the RTNL lock. Use a > > > spinlock to protect the control buffer header and the VQ. > > > > > >

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-18 Thread Heng Qi
在 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

Re: [PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-17 Thread 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/virtio_net.c | 6 +- > 1 f

[PATCH net-next v4 3/6] virtio_net: Add a lock for the command VQ.

2024-04-16 Thread Daniel Jurgens
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/virtio_net.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/vi