* [PATCH] vdpa: update used->flags in used ring relay
@ 2024-07-17 3:24 BillXiang
2024-09-19 10:37 ` Maxime Coquelin
0 siblings, 1 reply; 3+ messages in thread
From: BillXiang @ 2024-07-17 3:24 UTC (permalink / raw)
To: Maxime Coquelin, Chenbo Xia; +Cc: dev, BillXiang
From: BillXiang <xiangwencheng@dayudpu.com>
The vDPA device will work incorrectly if flags such as
VRING_USED_F_NO_NOTIFY are not updated correctly.
Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>
---
lib/vhost/vdpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
index a1dd5a753b..8abb073675 100644
--- a/lib/vhost/vdpa.c
+++ b/lib/vhost/vdpa.c
@@ -174,6 +174,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
idx = vq->used->idx;
idx_m = s_vring->used->idx;
ret = (uint16_t)(idx_m - idx);
+ vq->used->flags = s_vring->used->flags;
while (idx != idx_m) {
/* copy used entry, used ring logging is not covered here */
--
2.30.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdpa: update used->flags in used ring relay
2024-07-17 3:24 [PATCH] vdpa: update used->flags in used ring relay BillXiang
@ 2024-09-19 10:37 ` Maxime Coquelin
2024-09-19 10:41 ` Maxime Coquelin
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Coquelin @ 2024-09-19 10:37 UTC (permalink / raw)
To: BillXiang, Chenbo Xia; +Cc: dev
On 7/17/24 05:24, BillXiang wrote:
> From: BillXiang <xiangwencheng@dayudpu.com>
>
> The vDPA device will work incorrectly if flags such as
> VRING_USED_F_NO_NOTIFY are not updated correctly.
>
> Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>
> ---
> lib/vhost/vdpa.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
> index a1dd5a753b..8abb073675 100644
> --- a/lib/vhost/vdpa.c
> +++ b/lib/vhost/vdpa.c
> @@ -174,6 +174,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
> idx = vq->used->idx;
> idx_m = s_vring->used->idx;
> ret = (uint16_t)(idx_m - idx);
> + vq->used->flags = s_vring->used->flags;
>
> while (idx != idx_m) {
> /* copy used entry, used ring logging is not covered here */
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdpa: update used->flags in used ring relay
2024-09-19 10:37 ` Maxime Coquelin
@ 2024-09-19 10:41 ` Maxime Coquelin
0 siblings, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2024-09-19 10:41 UTC (permalink / raw)
To: BillXiang, Chenbo Xia; +Cc: dev
On 9/19/24 12:37, Maxime Coquelin wrote:
>
>
> On 7/17/24 05:24, BillXiang wrote:
>> From: BillXiang <xiangwencheng@dayudpu.com>
>>
>> The vDPA device will work incorrectly if flags such as
>> VRING_USED_F_NO_NOTIFY are not updated correctly.
>>
>> Signed-off-by: BillXiang <xiangwencheng@dayudpu.com>
>> ---
>> lib/vhost/vdpa.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/lib/vhost/vdpa.c b/lib/vhost/vdpa.c
>> index a1dd5a753b..8abb073675 100644
>> --- a/lib/vhost/vdpa.c
>> +++ b/lib/vhost/vdpa.c
>> @@ -174,6 +174,7 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid,
>> void *vring_m)
>> idx = vq->used->idx;
>> idx_m = s_vring->used->idx;
>> ret = (uint16_t)(idx_m - idx);
>> + vq->used->flags = s_vring->used->flags;
>> while (idx != idx_m) {
>> /* copy used entry, used ring logging is not covered here */
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
I fix the title from used->flags to used flags.
And also add Fixes tag and Cc stable so that it is backported.
> Thanks,
> Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-19 10:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-17 3:24 [PATCH] vdpa: update used->flags in used ring relay BillXiang
2024-09-19 10:37 ` Maxime Coquelin
2024-09-19 10:41 ` 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).