DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] examples/vhost: fix floating point exception when there is no VMDQ
@ 2022-04-11 16:34 Yuan Wang
  2022-05-16 12:57 ` Xia, Chenbo
  2022-05-18 13:36 ` [PATCH v2] examples/vhost: fix floating point exception when no VMDq Yuan Wang
  0 siblings, 2 replies; 6+ messages in thread
From: Yuan Wang @ 2022-04-11 16:34 UTC (permalink / raw)
  To: maxime.coquelin, chenbo.xia; +Cc: dev, jiayu.hu, xingguang.he, yuanx.wang

If the VMDQ limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
 examples/vhost/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index d94fabb060..815ac1cd57 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -400,6 +400,10 @@ port_init(uint16_t port)
 
 		return retval;
 	}
+	if (dev_info.max_vmdq_pools == 0) {
+		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDQ info.\n");
+		return -1;
+	}
 
 	rxconf = &dev_info.default_rxconf;
 	txconf = &dev_info.default_txconf;
-- 
2.25.1


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

* RE: [PATCH] examples/vhost: fix floating point exception when there is no VMDQ
  2022-04-11 16:34 [PATCH] examples/vhost: fix floating point exception when there is no VMDQ Yuan Wang
@ 2022-05-16 12:57 ` Xia, Chenbo
  2022-05-17 10:14   ` Wang, YuanX
  2022-05-18 13:36 ` [PATCH v2] examples/vhost: fix floating point exception when no VMDq Yuan Wang
  1 sibling, 1 reply; 6+ messages in thread
From: Xia, Chenbo @ 2022-05-16 12:57 UTC (permalink / raw)
  To: Wang, YuanX, maxime.coquelin; +Cc: dev, Hu, Jiayu, He, Xingguang

Hi Yuan,

> -----Original Message-----
> From: Wang, YuanX <yuanx.wang@intel.com>
> Sent: Tuesday, April 12, 2022 12:35 AM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; He, Xingguang
> <xingguang.he@intel.com>; Wang, YuanX <yuanx.wang@intel.com>
> Subject: [PATCH] examples/vhost: fix floating point exception when there
> is no VMDQ

Based on the error reported by devtools/check-git-log.sh

Title better be: examples/vhost: fix floating point exception when no VMDq

> 
> If the VMDQ limits is 0, a divide-by-zero error occurs.
> This patch replaces throwing a floating point exception with
> a normal error message.

Pls add fix and cc-stable tag.

Thanks,
Chenbo

> 
> Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> ---
>  examples/vhost/main.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index d94fabb060..815ac1cd57 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -400,6 +400,10 @@ port_init(uint16_t port)
> 
>  		return retval;
>  	}
> +	if (dev_info.max_vmdq_pools == 0) {
> +		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDQ info.\n");
> +		return -1;
> +	}
> 
>  	rxconf = &dev_info.default_rxconf;
>  	txconf = &dev_info.default_txconf;
> --
> 2.25.1


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

* RE: [PATCH] examples/vhost: fix floating point exception when there is no VMDQ
  2022-05-16 12:57 ` Xia, Chenbo
@ 2022-05-17 10:14   ` Wang, YuanX
  0 siblings, 0 replies; 6+ messages in thread
From: Wang, YuanX @ 2022-05-17 10:14 UTC (permalink / raw)
  To: Xia, Chenbo, maxime.coquelin; +Cc: dev, Hu, Jiayu, He, Xingguang

Hi Chenbo,

> -----Original Message-----
> From: Xia, Chenbo <chenbo.xia@intel.com>
> Sent: Monday, May 16, 2022 8:57 PM
> To: Wang, YuanX <yuanx.wang@intel.com>; maxime.coquelin@redhat.com
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; He, Xingguang
> <xingguang.he@intel.com>
> Subject: RE: [PATCH] examples/vhost: fix floating point exception when
> there is no VMDQ
> 
> Hi Yuan,
> 
> > -----Original Message-----
> > From: Wang, YuanX <yuanx.wang@intel.com>
> > Sent: Tuesday, April 12, 2022 12:35 AM
> > To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> > Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; He, Xingguang
> > <xingguang.he@intel.com>; Wang, YuanX <yuanx.wang@intel.com>
> > Subject: [PATCH] examples/vhost: fix floating point exception when
> > there is no VMDQ
> 
> Based on the error reported by devtools/check-git-log.sh
> 
> Title better be: examples/vhost: fix floating point exception when no VMDq
> 
> >
> > If the VMDQ limits is 0, a divide-by-zero error occurs.
> > This patch replaces throwing a floating point exception with a normal
> > error message.
> 
> Pls add fix and cc-stable tag.

Thanks for the comments, will fix it in next version.

Regards,
Yuan

> 
> Thanks,
> Chenbo
> 
> >
> > Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> > ---
> >  examples/vhost/main.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/examples/vhost/main.c b/examples/vhost/main.c index
> > d94fabb060..815ac1cd57 100644
> > --- a/examples/vhost/main.c
> > +++ b/examples/vhost/main.c
> > @@ -400,6 +400,10 @@ port_init(uint16_t port)
> >
> >  		return retval;
> >  	}
> > +	if (dev_info.max_vmdq_pools == 0) {
> > +		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDQ info.\n");
> > +		return -1;
> > +	}
> >
> >  	rxconf = &dev_info.default_rxconf;
> >  	txconf = &dev_info.default_txconf;
> > --
> > 2.25.1


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

* [PATCH v2] examples/vhost: fix floating point exception when no VMDq
  2022-04-11 16:34 [PATCH] examples/vhost: fix floating point exception when there is no VMDQ Yuan Wang
  2022-05-16 12:57 ` Xia, Chenbo
@ 2022-05-18 13:36 ` Yuan Wang
  2022-05-30  2:52   ` Xia, Chenbo
  2022-06-01 10:09   ` Maxime Coquelin
  1 sibling, 2 replies; 6+ messages in thread
From: Yuan Wang @ 2022-05-18 13:36 UTC (permalink / raw)
  To: maxime.coquelin, chenbo.xia
  Cc: dev, jiayu.hu, xingguang.he, yuanx.wang, stable

If the VMDQ limits is 0, a divide-by-zero error occurs.
This patch replaces throwing a floating point exception with
a normal error message.

Fixes: d19533e86f ("examples/vhost: copy old vhost example")
Cc: stable@dpdk.org

Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
 examples/vhost/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index c4d46de1c5..48d9f3802f 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -400,6 +400,10 @@ port_init(uint16_t port)
 
 		return retval;
 	}
+	if (dev_info.max_vmdq_pools == 0) {
+		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDQ info.\n");
+		return -1;
+	}
 
 	rxconf = &dev_info.default_rxconf;
 	txconf = &dev_info.default_txconf;
-- 
2.25.1


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

* RE: [PATCH v2] examples/vhost: fix floating point exception when no VMDq
  2022-05-18 13:36 ` [PATCH v2] examples/vhost: fix floating point exception when no VMDq Yuan Wang
@ 2022-05-30  2:52   ` Xia, Chenbo
  2022-06-01 10:09   ` Maxime Coquelin
  1 sibling, 0 replies; 6+ messages in thread
From: Xia, Chenbo @ 2022-05-30  2:52 UTC (permalink / raw)
  To: Wang, YuanX, maxime.coquelin; +Cc: dev, Hu, Jiayu, He, Xingguang, stable

> -----Original Message-----
> From: Wang, YuanX <yuanx.wang@intel.com>
> Sent: Wednesday, May 18, 2022 9:37 PM
> To: maxime.coquelin@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; Hu, Jiayu <jiayu.hu@intel.com>; He, Xingguang
> <xingguang.he@intel.com>; Wang, YuanX <yuanx.wang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v2] examples/vhost: fix floating point exception when no
> VMDq
> 
> If the VMDQ limits is 0, a divide-by-zero error occurs.
> This patch replaces throwing a floating point exception with
> a normal error message.
> 
> Fixes: d19533e86f ("examples/vhost: copy old vhost example")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> ---
>  examples/vhost/main.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index c4d46de1c5..48d9f3802f 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -400,6 +400,10 @@ port_init(uint16_t port)
> 
>  		return retval;
>  	}
> +	if (dev_info.max_vmdq_pools == 0) {
> +		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDQ info.\n");
> +		return -1;
> +	}
> 
>  	rxconf = &dev_info.default_rxconf;
>  	txconf = &dev_info.default_txconf;
> --
> 2.25.1

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>

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

* Re: [PATCH v2] examples/vhost: fix floating point exception when no VMDq
  2022-05-18 13:36 ` [PATCH v2] examples/vhost: fix floating point exception when no VMDq Yuan Wang
  2022-05-30  2:52   ` Xia, Chenbo
@ 2022-06-01 10:09   ` Maxime Coquelin
  1 sibling, 0 replies; 6+ messages in thread
From: Maxime Coquelin @ 2022-06-01 10:09 UTC (permalink / raw)
  To: Yuan Wang, chenbo.xia; +Cc: dev, jiayu.hu, xingguang.he, stable



On 5/18/22 15:36, Yuan Wang wrote:
> If the VMDQ limits is 0, a divide-by-zero error occurs.
> This patch replaces throwing a floating point exception with
> a normal error message.
> 
> Fixes: d19533e86f ("examples/vhost: copy old vhost example")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> ---
>   examples/vhost/main.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index c4d46de1c5..48d9f3802f 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -400,6 +400,10 @@ port_init(uint16_t port)
>   
>   		return retval;
>   	}
> +	if (dev_info.max_vmdq_pools == 0) {
> +		RTE_LOG(ERR, VHOST_PORT, "Failed to get VMDQ info.\n");
> +		return -1;
> +	}
>   
>   	rxconf = &dev_info.default_rxconf;
>   	txconf = &dev_info.default_txconf;


Applied to dpdk-next-virtio/main.

Thanks,
Maxime


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

end of thread, other threads:[~2022-06-01 10:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 16:34 [PATCH] examples/vhost: fix floating point exception when there is no VMDQ Yuan Wang
2022-05-16 12:57 ` Xia, Chenbo
2022-05-17 10:14   ` Wang, YuanX
2022-05-18 13:36 ` [PATCH v2] examples/vhost: fix floating point exception when no VMDq Yuan Wang
2022-05-30  2:52   ` Xia, Chenbo
2022-06-01 10:09   ` 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).