* Re: [dpdk-dev] [PATCH] vhost-blk: delete the unused return value
2019-11-26 15:37 [dpdk-dev] [PATCH] vhost-blk: delete the unused return value Jin Yu
@ 2019-11-26 14:58 ` Maxime Coquelin
2019-11-27 12:16 ` [dpdk-dev] [PATCH v2] vhost-blk: fix " Jin Yu
1 sibling, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2019-11-26 14:58 UTC (permalink / raw)
To: Jin Yu, Tiwei Bie, Zhihong Wang; +Cc: dev, stable
On 11/26/19 4:37 PM, Jin Yu wrote:
> Coverity issue: 350592
> Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jin Yu <jin.yu@intel.com>
> ---
> examples/vhost_blk/vhost_blk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
> index 3182a488b..ff2f138b3 100644
> --- a/examples/vhost_blk/vhost_blk.c
> +++ b/examples/vhost_blk/vhost_blk.c
> @@ -852,7 +852,7 @@ new_device(int vid)
>
> if (ctrlr->packed_ring) {
> /* for the reconnection */
> - ret = rte_vhost_get_vring_base_from_inflight(
> + rte_vhost_get_vring_base_from_inflight(
> ctrlr->bdev->vid, i,
> &blk_vq->last_avail_idx,
> &blk_vq->last_used_idx);
>
It may be safer to handle the error, isn't it?
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] vhost-blk: delete the unused return value
@ 2019-11-26 15:37 Jin Yu
2019-11-26 14:58 ` Maxime Coquelin
2019-11-27 12:16 ` [dpdk-dev] [PATCH v2] vhost-blk: fix " Jin Yu
0 siblings, 2 replies; 5+ messages in thread
From: Jin Yu @ 2019-11-26 15:37 UTC (permalink / raw)
To: Maxime Coquelin, Tiwei Bie, Zhihong Wang; +Cc: dev, Jin Yu, stable
Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
---
examples/vhost_blk/vhost_blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 3182a488b..ff2f138b3 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -852,7 +852,7 @@ new_device(int vid)
if (ctrlr->packed_ring) {
/* for the reconnection */
- ret = rte_vhost_get_vring_base_from_inflight(
+ rte_vhost_get_vring_base_from_inflight(
ctrlr->bdev->vid, i,
&blk_vq->last_avail_idx,
&blk_vq->last_used_idx);
--
2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] vhost-blk: fix the unused return value
2019-11-26 15:37 [dpdk-dev] [PATCH] vhost-blk: delete the unused return value Jin Yu
2019-11-26 14:58 ` Maxime Coquelin
@ 2019-11-27 12:16 ` Jin Yu
2019-11-27 12:57 ` Maxime Coquelin
1 sibling, 1 reply; 5+ messages in thread
From: Jin Yu @ 2019-11-27 12:16 UTC (permalink / raw)
To: Maxime Coquelin, Tiwei Bie, Zhihong Wang; +Cc: dev, Jin Yu, stable
add the assert to handle error.
Coverity issue: 350592
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Jin Yu <jin.yu@intel.com>
---
v2 - add the error hander
---
examples/vhost_blk/vhost_blk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 3182a488b..e1036bf3a 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -856,6 +856,7 @@ new_device(int vid)
ctrlr->bdev->vid, i,
&blk_vq->last_avail_idx,
&blk_vq->last_used_idx);
+ assert(ret == 0);
blk_vq->avail_wrap_counter = blk_vq->last_avail_idx &
(1 << 15);
--
2.17.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] vhost-blk: fix the unused return value
2019-11-27 12:16 ` [dpdk-dev] [PATCH v2] vhost-blk: fix " Jin Yu
@ 2019-11-27 12:57 ` Maxime Coquelin
2020-01-09 15:51 ` Maxime Coquelin
0 siblings, 1 reply; 5+ messages in thread
From: Maxime Coquelin @ 2019-11-27 12:57 UTC (permalink / raw)
To: Jin Yu, Tiwei Bie, Zhihong Wang; +Cc: dev, stable
On 11/27/19 1:16 PM, Jin Yu wrote:
> add the assert to handle error.
>
> Coverity issue: 350592
> Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jin Yu <jin.yu@intel.com>
> ---
> v2 - add the error hander
> ---
> examples/vhost_blk/vhost_blk.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
> index 3182a488b..e1036bf3a 100644
> --- a/examples/vhost_blk/vhost_blk.c
> +++ b/examples/vhost_blk/vhost_blk.c
> @@ -856,6 +856,7 @@ new_device(int vid)
> ctrlr->bdev->vid, i,
> &blk_vq->last_avail_idx,
> &blk_vq->last_used_idx);
> + assert(ret == 0);
>
> blk_vq->avail_wrap_counter = blk_vq->last_avail_idx &
> (1 << 15);
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] vhost-blk: fix the unused return value
2019-11-27 12:57 ` Maxime Coquelin
@ 2020-01-09 15:51 ` Maxime Coquelin
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2020-01-09 15:51 UTC (permalink / raw)
To: Jin Yu, Tiwei Bie, Zhihong Wang; +Cc: dev, stable
On 11/27/19 1:57 PM, Maxime Coquelin wrote:
>
>
> On 11/27/19 1:16 PM, Jin Yu wrote:
>> add the assert to handle error.
>>
>> Coverity issue: 350592
>> Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Jin Yu <jin.yu@intel.com>
>> ---
>> v2 - add the error hander
>> ---
>> examples/vhost_blk/vhost_blk.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
>> index 3182a488b..e1036bf3a 100644
>> --- a/examples/vhost_blk/vhost_blk.c
>> +++ b/examples/vhost_blk/vhost_blk.c
>> @@ -856,6 +856,7 @@ new_device(int vid)
>> ctrlr->bdev->vid, i,
>> &blk_vq->last_avail_idx,
>> &blk_vq->last_used_idx);
>> + assert(ret == 0);
>>
>> blk_vq->avail_wrap_counter = blk_vq->last_avail_idx &
>> (1 << 15);
>>
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Thanks,
> Maxime
>
Applied to dpdk-next-virtio/master.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-09 15:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 15:37 [dpdk-dev] [PATCH] vhost-blk: delete the unused return value Jin Yu
2019-11-26 14:58 ` Maxime Coquelin
2019-11-27 12:16 ` [dpdk-dev] [PATCH v2] vhost-blk: fix " Jin Yu
2019-11-27 12:57 ` Maxime Coquelin
2020-01-09 15:51 ` 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).