DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix error devargs parsing
@ 2023-11-13 10:44 Mingjin Ye
  2023-11-15  8:24 ` Zhang, Qi Z
  2023-11-15 10:13 ` [PATCH v2] " Mingjin Ye
  0 siblings, 2 replies; 4+ messages in thread
From: Mingjin Ye @ 2023-11-13 10:44 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, Mingjin Ye, stable, Jingjing Wu, Beilei Xing

This patch fixes an unknown parsing result without
devarg "no-poll-on-link-down".

Fixes: 5b3124a0a6ef ("net/iavf: support no polling when link down")
Cc: stable@dpdk.org

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 0c6ab4ac5a..d1edb0dd5c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2294,7 +2294,6 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
 	struct rte_kvargs *kvlist;
 	int ret;
 	int watchdog_period = -1;
-	uint16_t no_poll_on_link_down;
 
 	if (!devargs)
 		return 0;
@@ -2329,13 +2328,9 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
 		ad->devargs.watchdog_period = watchdog_period;
 
 	ret = rte_kvargs_process(kvlist, IAVF_NO_POLL_ON_LINK_DOWN_ARG,
-				 &parse_u16, &no_poll_on_link_down);
+				 &parse_bool, &ad->devargs.no_poll_on_link_down);
 	if (ret)
 		goto bail;
-	if (no_poll_on_link_down == 0)
-		ad->devargs.no_poll_on_link_down = 0;
-	else
-		ad->devargs.no_poll_on_link_down = 1;
 
 	if (ad->devargs.quanta_size != 0 &&
 	    (ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
-- 
2.25.1


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

* RE: [PATCH] net/iavf: fix error devargs parsing
  2023-11-13 10:44 [PATCH] net/iavf: fix error devargs parsing Mingjin Ye
@ 2023-11-15  8:24 ` Zhang, Qi Z
  2023-11-15 10:13 ` [PATCH v2] " Mingjin Ye
  1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2023-11-15  8:24 UTC (permalink / raw)
  To: Ye, MingjinX, dev
  Cc: Yang, Qiming, Ye, MingjinX, stable, Wu, Jingjing, Xing, Beilei



> -----Original Message-----
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Sent: Monday, November 13, 2023 6:45 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Ye, MingjinX
> <mingjinx.ye@intel.com>; stable@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH] net/iavf: fix error devargs parsing
> 
> This patch fixes an unknown parsing result without devarg "no-poll-on-link-
> down".
> 
> Fixes: 5b3124a0a6ef ("net/iavf: support no polling when link down")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index 0c6ab4ac5a..d1edb0dd5c 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -2294,7 +2294,6 @@ static int iavf_parse_devargs(struct rte_eth_dev
> *dev)
>  	struct rte_kvargs *kvlist;
>  	int ret;
>  	int watchdog_period = -1;
> -	uint16_t no_poll_on_link_down;
> 
>  	if (!devargs)
>  		return 0;
> @@ -2329,13 +2328,9 @@ static int iavf_parse_devargs(struct rte_eth_dev
> *dev)
>  		ad->devargs.watchdog_period = watchdog_period;
> 
>  	ret = rte_kvargs_process(kvlist,
> IAVF_NO_POLL_ON_LINK_DOWN_ARG,
> -				 &parse_u16, &no_poll_on_link_down);
> +				 &parse_bool, &ad-
> >devargs.no_poll_on_link_down);

This will be a problem, the parse_bool accept an argument as size of int , but no_poll_on_link_down is a uint16_t
Please also fix the issue for auto_reset ....  



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

* [PATCH v2] net/iavf: fix error devargs parsing
  2023-11-13 10:44 [PATCH] net/iavf: fix error devargs parsing Mingjin Ye
  2023-11-15  8:24 ` Zhang, Qi Z
@ 2023-11-15 10:13 ` Mingjin Ye
  2023-11-16  2:45   ` Zhang, Qi Z
  1 sibling, 1 reply; 4+ messages in thread
From: Mingjin Ye @ 2023-11-15 10:13 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, Mingjin Ye, stable, Jingjing Wu, Beilei Xing

This patch fixes unknown parsing results in the absence of
devarg "no-poll-on-link-down" and fixes the devarg variable type.

Fixes: 5b3124a0a6ef ("net/iavf: support no polling when link down")
Fixes: 3e6a5d2d310a ("net/iavf: add devargs to enable VF auto-reset")
Cc: stable@dpdk.org

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
v2: fix devarg variable type.
---
 drivers/net/iavf/iavf.h        | 4 ++--
 drivers/net/iavf/iavf_ethdev.c | 7 +------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index c115f3444e..10868f2c30 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -307,8 +307,8 @@ struct iavf_devargs {
 	uint8_t proto_xtr[IAVF_MAX_QUEUE_NUM];
 	uint16_t quanta_size;
 	uint32_t watchdog_period;
-	uint8_t  auto_reset;
-	uint16_t no_poll_on_link_down;
+	int auto_reset;
+	int no_poll_on_link_down;
 };
 
 struct iavf_security_ctx;
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 0c6ab4ac5a..d1edb0dd5c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -2294,7 +2294,6 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
 	struct rte_kvargs *kvlist;
 	int ret;
 	int watchdog_period = -1;
-	uint16_t no_poll_on_link_down;
 
 	if (!devargs)
 		return 0;
@@ -2329,13 +2328,9 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
 		ad->devargs.watchdog_period = watchdog_period;
 
 	ret = rte_kvargs_process(kvlist, IAVF_NO_POLL_ON_LINK_DOWN_ARG,
-				 &parse_u16, &no_poll_on_link_down);
+				 &parse_bool, &ad->devargs.no_poll_on_link_down);
 	if (ret)
 		goto bail;
-	if (no_poll_on_link_down == 0)
-		ad->devargs.no_poll_on_link_down = 0;
-	else
-		ad->devargs.no_poll_on_link_down = 1;
 
 	if (ad->devargs.quanta_size != 0 &&
 	    (ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
-- 
2.25.1


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

* RE: [PATCH v2] net/iavf: fix error devargs parsing
  2023-11-15 10:13 ` [PATCH v2] " Mingjin Ye
@ 2023-11-16  2:45   ` Zhang, Qi Z
  0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2023-11-16  2:45 UTC (permalink / raw)
  To: Ye, MingjinX, dev
  Cc: Yang, Qiming, Ye, MingjinX, stable, Wu, Jingjing, Xing, Beilei



> -----Original Message-----
> From: Mingjin Ye <mingjinx.ye@intel.com>
> Sent: Wednesday, November 15, 2023 6:13 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Ye, MingjinX
> <mingjinx.ye@intel.com>; stable@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH v2] net/iavf: fix error devargs parsing
> 
> This patch fixes unknown parsing results in the absence of devarg "no-poll-
> on-link-down" and fixes the devarg variable type.
> 
> Fixes: 5b3124a0a6ef ("net/iavf: support no polling when link down")
> Fixes: 3e6a5d2d310a ("net/iavf: add devargs to enable VF auto-reset")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


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

end of thread, other threads:[~2023-11-16  2:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13 10:44 [PATCH] net/iavf: fix error devargs parsing Mingjin Ye
2023-11-15  8:24 ` Zhang, Qi Z
2023-11-15 10:13 ` [PATCH v2] " Mingjin Ye
2023-11-16  2:45   ` Zhang, Qi Z

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).