DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/virtio-user: reset used index counter in dev reset
@ 2024-08-05 10:08 Kommula Shiva Shankar
  2024-09-06 10:14 ` [EXTERNAL] " Shiva Shankar Kommula
  2024-09-19 12:06 ` Maxime Coquelin
  0 siblings, 2 replies; 5+ messages in thread
From: Kommula Shiva Shankar @ 2024-08-05 10:08 UTC (permalink / raw)
  To: dev, maxime.coquelin, chenbox
  Cc: david.marchand, jerinj, ndabilpuram, schalla

When the virtio device is reinitialized during ethdev reconfiguration,
all the virtio rings are recreated and repopulated on the device.
Accordingly, reset the used index counter value back to zero.

Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index ae6593ba0b..d60c7e188c 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,
 	vring->device = (void *)(uintptr_t)used_addr;
 	dev->packed_queues[queue_idx].avail_wrap_counter = true;
 	dev->packed_queues[queue_idx].used_wrap_counter = true;
+	dev->packed_queues[queue_idx].used_idx = 0;
 
 	for (i = 0; i < vring->num; i++)
 		vring->desc[i].flags = 0;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev reset
  2024-08-05 10:08 [PATCH] net/virtio-user: reset used index counter in dev reset Kommula Shiva Shankar
@ 2024-09-06 10:14 ` Shiva Shankar Kommula
  2024-09-19 10:54   ` Maxime Coquelin
  2024-09-19 12:06 ` Maxime Coquelin
  1 sibling, 1 reply; 5+ messages in thread
From: Shiva Shankar Kommula @ 2024-09-06 10:14 UTC (permalink / raw)
  To: Shiva Shankar Kommula, dev, maxime.coquelin, chenbox
  Cc: david.marchand, Jerin Jacob, Nithin Kumar Dabilpuram, Srujana Challa

Hello Maxime, 
could you please review the following change ? 

Thanks

> Subject: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev
> reset
> 
> When the virtio device is reinitialized during ethdev reconfiguration, all the
> virtio rings are recreated and repopulated on the device. Accordingly, reset the
> used index counter value back to zero. Signed-off-by: Kommula Shiva Shankar
> <kshankar@ marvell. com> 
> When the virtio device is reinitialized during ethdev reconfiguration, all the
> virtio rings are recreated and repopulated on the device.
> Accordingly, reset the used index counter value back to zero.
> 
> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
> ---
>  drivers/net/virtio/virtio_user_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio/virtio_user_ethdev.c
> b/drivers/net/virtio/virtio_user_ethdev.c
> index ae6593ba0b..d60c7e188c 100644
> --- a/drivers/net/virtio/virtio_user_ethdev.c
> +++ b/drivers/net/virtio/virtio_user_ethdev.c
> @@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue
> *vq,
>  	vring->device = (void *)(uintptr_t)used_addr;
>  	dev->packed_queues[queue_idx].avail_wrap_counter = true;
>  	dev->packed_queues[queue_idx].used_wrap_counter = true;
> +	dev->packed_queues[queue_idx].used_idx = 0;
> 
>  	for (i = 0; i < vring->num; i++)
>  		vring->desc[i].flags = 0;
> --
> 2.43.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev reset
  2024-09-06 10:14 ` [EXTERNAL] " Shiva Shankar Kommula
@ 2024-09-19 10:54   ` Maxime Coquelin
  2024-09-19 11:17     ` Maxime Coquelin
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Coquelin @ 2024-09-19 10:54 UTC (permalink / raw)
  To: Shiva Shankar Kommula, dev, chenbox
  Cc: david.marchand, Jerin Jacob, Nithin Kumar Dabilpuram, Srujana Challa

Hi,

On 9/6/24 12:14, Shiva Shankar Kommula wrote:
> Hello Maxime,
> could you please review the following change ?
> 
> Thanks
> 
>> Subject: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev
>> reset
>>
>> When the virtio device is reinitialized during ethdev reconfiguration, all the
>> virtio rings are recreated and repopulated on the device. Accordingly, reset the
>> used index counter value back to zero. Signed-off-by: Kommula Shiva Shankar
>> <kshankar@ marvell. com>
>> When the virtio device is reinitialized during ethdev reconfiguration, all the
>> virtio rings are recreated and repopulated on the device.
>> Accordingly, reset the used index counter value back to zero.

I think it needs to be backported to stable releases.
What about this?

Fixes: 48a4464029a7 ("net/virtio-user: support control VQ for packed")
Cc: stable@dpdk.org

>>
>> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
>> ---
>>   drivers/net/virtio/virtio_user_ethdev.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/virtio/virtio_user_ethdev.c
>> b/drivers/net/virtio/virtio_user_ethdev.c
>> index ae6593ba0b..d60c7e188c 100644
>> --- a/drivers/net/virtio/virtio_user_ethdev.c
>> +++ b/drivers/net/virtio/virtio_user_ethdev.c
>> @@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue
>> *vq,
>>   	vring->device = (void *)(uintptr_t)used_addr;
>>   	dev->packed_queues[queue_idx].avail_wrap_counter = true;
>>   	dev->packed_queues[queue_idx].used_wrap_counter = true;
>> +	dev->packed_queues[queue_idx].used_idx = 0;
>>
>>   	for (i = 0; i < vring->num; i++)
>>   		vring->desc[i].flags = 0;
>> --
>> 2.43.0
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter in dev reset
  2024-09-19 10:54   ` Maxime Coquelin
@ 2024-09-19 11:17     ` Maxime Coquelin
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2024-09-19 11:17 UTC (permalink / raw)
  To: Shiva Shankar Kommula, dev, chenbox
  Cc: david.marchand, Jerin Jacob, Nithin Kumar Dabilpuram, Srujana Challa



On 9/19/24 12:54, Maxime Coquelin wrote:
> Hi,
> 
> On 9/6/24 12:14, Shiva Shankar Kommula wrote:
>> Hello Maxime,
>> could you please review the following change ?
>>
>> Thanks
>>
>>> Subject: [EXTERNAL] [PATCH] net/virtio-user: reset used index counter 
>>> in dev
>>> reset
>>>
>>> When the virtio device is reinitialized during ethdev 
>>> reconfiguration, all the
>>> virtio rings are recreated and repopulated on the device. 
>>> Accordingly, reset the
>>> used index counter value back to zero. Signed-off-by: Kommula Shiva 
>>> Shankar
>>> <kshankar@ marvell. com>
>>> When the virtio device is reinitialized during ethdev 
>>> reconfiguration, all the
>>> virtio rings are recreated and repopulated on the device.
>>> Accordingly, reset the used index counter value back to zero.
> 
> I think it needs to be backported to stable releases.
> What about this?
> 
> Fixes: 48a4464029a7 ("net/virtio-user: support control VQ for packed")
> Cc: stable@dpdk.org
> 
>>>
>>> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
>>> ---
>>>   drivers/net/virtio/virtio_user_ethdev.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/net/virtio/virtio_user_ethdev.c
>>> b/drivers/net/virtio/virtio_user_ethdev.c
>>> index ae6593ba0b..d60c7e188c 100644
>>> --- a/drivers/net/virtio/virtio_user_ethdev.c
>>> +++ b/drivers/net/virtio/virtio_user_ethdev.c
>>> @@ -204,6 +204,7 @@ virtio_user_setup_queue_packed(struct virtqueue
>>> *vq,
>>>       vring->device = (void *)(uintptr_t)used_addr;
>>>       dev->packed_queues[queue_idx].avail_wrap_counter = true;
>>>       dev->packed_queues[queue_idx].used_wrap_counter = true;
>>> +    dev->packed_queues[queue_idx].used_idx = 0;
>>>
>>>       for (i = 0; i < vring->num; i++)
>>>           vring->desc[i].flags = 0;
>>> -- 
>>> 2.43.0
>>

With added Fixes tag:
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net/virtio-user: reset used index counter in dev reset
  2024-08-05 10:08 [PATCH] net/virtio-user: reset used index counter in dev reset Kommula Shiva Shankar
  2024-09-06 10:14 ` [EXTERNAL] " Shiva Shankar Kommula
@ 2024-09-19 12:06 ` Maxime Coquelin
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2024-09-19 12:06 UTC (permalink / raw)
  To: Kommula Shiva Shankar, dev, chenbox
  Cc: david.marchand, jerinj, ndabilpuram, schalla



On 8/5/24 12:08, Kommula Shiva Shankar wrote:
> When the virtio device is reinitialized during ethdev reconfiguration,
> all the virtio rings are recreated and repopulated on the device.
> Accordingly, reset the used index counter value back to zero.
> 
> Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
> ---
>   drivers/net/virtio/virtio_user_ethdev.c | 1 +
>   1 file changed, 1 insertion(+)
> 

Applied to next-virtio/for-next-net with suggested change.

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-19 12:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-05 10:08 [PATCH] net/virtio-user: reset used index counter in dev reset Kommula Shiva Shankar
2024-09-06 10:14 ` [EXTERNAL] " Shiva Shankar Kommula
2024-09-19 10:54   ` Maxime Coquelin
2024-09-19 11:17     ` Maxime Coquelin
2024-09-19 12:06 ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).