Re: How to implement message forwarding from one CID to another in vhost driver

2024-05-29 Thread Stefano Garzarella
On Tue, May 28, 2024 at 06:38:24PM GMT, Paolo Bonzini wrote: On Tue, May 28, 2024 at 5:53 PM Stefano Garzarella wrote: On Tue, May 28, 2024 at 05:49:32PM GMT, Paolo Bonzini wrote: >On Tue, May 28, 2024 at 5:41 PM Stefano Garzarella wrote: >> >I think it's either that or implementing virtio-vs

Re: How to implement message forwarding from one CID to another in vhost driver

2024-05-29 Thread Alexander Graf
On 29.05.24 10:04, Stefano Garzarella wrote: On Tue, May 28, 2024 at 06:38:24PM GMT, Paolo Bonzini wrote: On Tue, May 28, 2024 at 5:53 PM Stefano Garzarella wrote: On Tue, May 28, 2024 at 05:49:32PM GMT, Paolo Bonzini wrote: >On Tue, May 28, 2024 at 5:41 PM Stefano Garzarella wrote: >> >

Re: How to implement message forwarding from one CID to another in vhost driver

2024-05-29 Thread Stefano Garzarella
On Wed, May 29, 2024 at 12:43:57PM GMT, Alexander Graf wrote: On 29.05.24 10:04, Stefano Garzarella wrote: On Tue, May 28, 2024 at 06:38:24PM GMT, Paolo Bonzini wrote: On Tue, May 28, 2024 at 5:53 PM Stefano Garzarella wrote: On Tue, May 28, 2024 at 05:49:32PM GMT, Paolo Bonzini wrote: On

Re: [PATCH net 1/2] virtio_net: rename ret to err

2024-05-29 Thread Jakub Kicinski
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 > renamed to 'err'. > > The usage of 'ret' is deferred to the next patch. That seems a bit much. Can

Re: [PATCH net 1/2] virtio_net: rename ret to err

2024-05-29 Thread Heng Qi
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 > > renamed to 'err'. > > > > The us

Re: [PATCH net-next 3/7] virtio_net: add prefix virtnet to all struct inside virtio_net.h

2024-05-29 Thread Jason Wang
On Wed, May 8, 2024 at 4:05 PM Xuan Zhuo wrote: > > 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 Acked-by: Jason Wang Thanks

Re: [PATCH net-next 6/7] virtio_net: separate receive_mergeable

2024-05-29 Thread Jason Wang
On Wed, May 8, 2024 at 4:05 PM Xuan Zhuo wrote: > > This commit separates the function receive_mergeable(), > put the logic of appending frag to the skb as an independent function. > The subsequent commit will reuse it. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks

Re: [PATCH net-next 7/7] virtio_net: separate receive_buf

2024-05-29 Thread Jason Wang
On Wed, May 8, 2024 at 4:05 PM Xuan Zhuo wrote: > > This commit separates the function receive_buf(), then we wrap the logic > of handling the skb to an independent function virtnet_receive_done(). > The subsequent commit will reuse it. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Thanks

[PATCH net v2] virtio_net: fix missing lock protection on control_buf access

2024-05-29 Thread Heng Qi
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: Hariprasad Kelam ---

Re: [PATCH net v2] virtio_net: fix missing lock protection on control_buf access

2024-05-29 Thread Jason Wang
On Thu, May 30, 2024 at 11:41 AM Heng Qi wrote: > > 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.")

Re: [PATCH net v2] virtio_net: fix missing lock protection on control_buf access

2024-05-29 Thread Xuan Zhuo
On Thu, 30 May 2024 11:41:43 +0800, Heng Qi wrote: > 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."