DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable
@ 2020-10-27  8:50 Patrick Fu
  2020-10-28 11:19 ` Maxime Coquelin
  2020-10-29  8:28 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Fu @ 2020-10-27  8:50 UTC (permalink / raw)
  To: dev, maxime.coquelin, chenbo.xia; +Cc: patrick.fu

This patch initializes a local parameter in async data path to avoid
compiler warnings.

Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")

Signed-off-by: Patrick Fu <patrick.fu@intel.com>
---
 lib/librte_vhost/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 030795645..10dec5e54 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1491,7 +1491,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
 	struct iovec *dst_iovec = vec_pool + (VHOST_MAX_ASYNC_VEC >> 1);
 	struct rte_vhost_iov_iter *src_it = it_pool;
 	struct rte_vhost_iov_iter *dst_it = it_pool + 1;
-	uint16_t n_free_slot, slot_idx;
+	uint16_t n_free_slot, slot_idx = 0;
 	uint16_t pkt_err = 0;
 	uint16_t segs_await = 0;
 	struct async_inflight_info *pkts_info = vq->async_pkts_info;
-- 
2.18.4


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

* Re: [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable
  2020-10-27  8:50 [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable Patrick Fu
@ 2020-10-28 11:19 ` Maxime Coquelin
  2020-10-29  8:28 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-10-28 11:19 UTC (permalink / raw)
  To: Patrick Fu, dev, chenbo.xia



On 10/27/20 9:50 AM, Patrick Fu wrote:
> This patch initializes a local parameter in async data path to avoid
> compiler warnings.
> 
> Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")
> 
> Signed-off-by: Patrick Fu <patrick.fu@intel.com>
> ---
>  lib/librte_vhost/virtio_net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
> index 030795645..10dec5e54 100644
> --- a/lib/librte_vhost/virtio_net.c
> +++ b/lib/librte_vhost/virtio_net.c
> @@ -1491,7 +1491,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
>  	struct iovec *dst_iovec = vec_pool + (VHOST_MAX_ASYNC_VEC >> 1);
>  	struct rte_vhost_iov_iter *src_it = it_pool;
>  	struct rte_vhost_iov_iter *dst_it = it_pool + 1;
> -	uint16_t n_free_slot, slot_idx;
> +	uint16_t n_free_slot, slot_idx = 0;
>  	uint16_t pkt_err = 0;
>  	uint16_t segs_await = 0;
>  	struct async_inflight_info *pkts_info = vq->async_pkts_info;
> 


Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


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

* Re: [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable
  2020-10-27  8:50 [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable Patrick Fu
  2020-10-28 11:19 ` Maxime Coquelin
@ 2020-10-29  8:28 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-10-29  8:28 UTC (permalink / raw)
  To: Patrick Fu, dev, chenbo.xia



On 10/27/20 9:50 AM, Patrick Fu wrote:
> This patch initializes a local parameter in async data path to avoid
> compiler warnings.
> 
> Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")
> 
> Signed-off-by: Patrick Fu <patrick.fu@intel.com>
> ---
>  lib/librte_vhost/virtio_net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to dpdk-next-virtio/main.

Thanks!
Maxime


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

end of thread, other threads:[~2020-10-29  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27  8:50 [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable Patrick Fu
2020-10-28 11:19 ` Maxime Coquelin
2020-10-29  8:28 ` 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).