patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 3/4] net/mlx5: fix description of function return value
       [not found] <cover.1556534247.git.dekelp@mellanox.com>
@ 2019-04-29 11:00 ` Dekel Peled
       [not found] ` <cover.1556809050.git.dekelp@mellanox.com>
  1 sibling, 0 replies; 9+ messages in thread
From: Dekel Peled @ 2019-04-29 11:00 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Return value of function mlx5_rxq_releasable() was not described
correctly in function description.

This patch updates the description to correctly describe the optional
return values.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index d4b94b5..ffca777 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1531,8 +1531,9 @@ struct mlx5_rxq_ctrl *
  *   RX queue index.
  *
  * @return
- *   1 if the queue can be released, negative errno otherwise and rte_errno is
- *   set.
+ *   1 if the queue can be released
+ *   0 if the queue can not be released, there are references to it.
+ *   Negative errno and rte_errno is set if queue doesn't exist.
  */
 int
 mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer
       [not found] ` <cover.1556809050.git.dekelp@mellanox.com>
@ 2019-05-02 15:01   ` Dekel Peled
  2019-05-02 18:12     ` Yongseok Koh
  2019-05-02 15:01   ` [dpdk-stable] [PATCH v2 3/4] net/mlx5: fix description of function return value Dekel Peled
       [not found]   ` <cover.1557061532.git.dekelp@mellanox.com>
  2 siblings, 1 reply; 9+ messages in thread
From: Dekel Peled @ 2019-05-02 15:01 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Function mlx5_rxq_ibv_release() is called in several places.
Before each call except one, the input parameter is validated to make
sure it is not null.

This patch adds the missing validation where it is missing.

Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index db8c340..c9c2a14 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -617,7 +617,8 @@
 		 */
 		rxq_data = (*priv->rxqs)[i];
 		rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
-		mlx5_rxq_ibv_release(rxq_ctrl->ibv);
+		if (rxq_ctrl->ibv)
+			mlx5_rxq_ibv_release(rxq_ctrl->ibv);
 	}
 free:
 	rte_intr_free_epoll_fd(intr_handle);
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 3/4] net/mlx5: fix description of function return value
       [not found] ` <cover.1556809050.git.dekelp@mellanox.com>
  2019-05-02 15:01   ` [dpdk-stable] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
@ 2019-05-02 15:01   ` Dekel Peled
  2019-05-02 18:13     ` Yongseok Koh
       [not found]   ` <cover.1557061532.git.dekelp@mellanox.com>
  2 siblings, 1 reply; 9+ messages in thread
From: Dekel Peled @ 2019-05-02 15:01 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Return value of function mlx5_rxq_releasable() was not described
correctly in function description.

This patch updates the description to correctly describe the optional
return values.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index c9c2a14..a547f2a 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1546,8 +1546,9 @@ struct mlx5_rxq_ctrl *
  *   RX queue index.
  *
  * @return
- *   1 if the queue can be released, negative errno otherwise and rte_errno is
- *   set.
+ *   1 if the queue can be released
+ *   0 if the queue can not be released, there are references to it.
+ *   Negative errno and rte_errno is set if queue doesn't exist.
  */
 int
 mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer
  2019-05-02 15:01   ` [dpdk-stable] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
@ 2019-05-02 18:12     ` Yongseok Koh
  0 siblings, 0 replies; 9+ messages in thread
From: Yongseok Koh @ 2019-05-02 18:12 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Shahaf Shuler, dev, stable


> On May 2, 2019, at 8:01 AM, Dekel Peled <dekelp@mellanox.com> wrote:
> 
> Function mlx5_rxq_ibv_release() is called in several places.
> Before each call except one, the input parameter is validated to make
> sure it is not null.
> 
> This patch adds the missing validation where it is missing.
> 
> Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_rxq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index db8c340..c9c2a14 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -617,7 +617,8 @@
> 		 */
> 		rxq_data = (*priv->rxqs)[i];
> 		rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
> -		mlx5_rxq_ibv_release(rxq_ctrl->ibv);
> +		if (rxq_ctrl->ibv)
> +			mlx5_rxq_ibv_release(rxq_ctrl->ibv);

Please take care of two more things.

1) In mlx5_rx_intr_disable(), 
mlx5_rxq_ibv_get() isn't paired with mlx5_rxq_ibv_release()
This would need a separate patch.

2) In mlx5_rx_intr_vec_disable()
Please fix the comment having the old name - priv_rx_intr_vec_enable().
This should be mlx5_rx_intr_vec_enable()
No need to have a separate patch. You can fix it in this patch.

With the change,
Acked-by: Yongseok Koh <yskoh@mellanox.com>


> 	}
> free:
> 	rte_intr_free_epoll_fd(intr_handle);
> -- 
> 1.8.3.1
> 


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

* Re: [dpdk-stable] [PATCH v2 3/4] net/mlx5: fix description of function return value
  2019-05-02 15:01   ` [dpdk-stable] [PATCH v2 3/4] net/mlx5: fix description of function return value Dekel Peled
@ 2019-05-02 18:13     ` Yongseok Koh
  0 siblings, 0 replies; 9+ messages in thread
From: Yongseok Koh @ 2019-05-02 18:13 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Shahaf Shuler, dev, stable


> On May 2, 2019, at 8:01 AM, Dekel Peled <dekelp@mellanox.com> wrote:
> 
> Return value of function mlx5_rxq_releasable() was not described
> correctly in function description.
> 
> This patch updates the description to correctly describe the optional
> return values.
> 
> Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
> cc: stable@dpdk.org
> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>

> drivers/net/mlx5/mlx5_rxq.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index c9c2a14..a547f2a 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -1546,8 +1546,9 @@ struct mlx5_rxq_ctrl *
>  *   RX queue index.
>  *
>  * @return
> - *   1 if the queue can be released, negative errno otherwise and rte_errno is
> - *   set.
> + *   1 if the queue can be released
> + *   0 if the queue can not be released, there are references to it.
> + *   Negative errno and rte_errno is set if queue doesn't exist.
>  */
> int
> mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
> -- 
> 1.8.3.1
> 


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

* [dpdk-stable] [PATCH v3 2/4] net/mlx5: fix missing validation of null pointer
       [not found]   ` <cover.1557061532.git.dekelp@mellanox.com>
@ 2019-05-05 13:09     ` Dekel Peled
  2019-05-05 13:09     ` [dpdk-stable] [PATCH v3 3/4] net/mlx5: fix description of function return value Dekel Peled
       [not found]     ` <cover.1557303531.git.dekelp@mellanox.com>
  2 siblings, 0 replies; 9+ messages in thread
From: Dekel Peled @ 2019-05-05 13:09 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Function mlx5_rxq_ibv_release() is called in several places.
Before each call except one, the input parameter is validated to make
sure it is not null.

This patch adds the validation where it is missing.
It also changes a priv_ prefix, left in a comment, to mlx5_ prefix.

Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 222fe95..0054096 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -593,11 +593,12 @@
 			continue;
 		/**
 		 * Need to access directly the queue to release the reference
-		 * kept in priv_rx_intr_vec_enable().
+		 * kept in mlx5_rx_intr_vec_enable().
 		 */
 		rxq_data = (*priv->rxqs)[i];
 		rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
-		mlx5_rxq_ibv_release(rxq_ctrl->ibv);
+		if (rxq_ctrl->ibv)
+			mlx5_rxq_ibv_release(rxq_ctrl->ibv);
 	}
 free:
 	rte_intr_free_epoll_fd(intr_handle);
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v3 3/4] net/mlx5: fix description of function return value
       [not found]   ` <cover.1557061532.git.dekelp@mellanox.com>
  2019-05-05 13:09     ` [dpdk-stable] [PATCH v3 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
@ 2019-05-05 13:09     ` Dekel Peled
       [not found]     ` <cover.1557303531.git.dekelp@mellanox.com>
  2 siblings, 0 replies; 9+ messages in thread
From: Dekel Peled @ 2019-05-05 13:09 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Return value of function mlx5_rxq_releasable() was not described
correctly in function description.

This patch updates the description to correctly describe the optional
return values.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 0054096..a22ed91 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1526,8 +1526,9 @@ struct mlx5_rxq_ctrl *
  *   RX queue index.
  *
  * @return
- *   1 if the queue can be released, negative errno otherwise and rte_errno is
- *   set.
+ *   1 if the queue can be released
+ *   0 if the queue can not be released, there are references to it.
+ *   Negative errno and rte_errno is set if queue doesn't exist.
  */
 int
 mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v4 2/4] net/mlx5: fix missing validation of null pointer
       [not found]     ` <cover.1557303531.git.dekelp@mellanox.com>
@ 2019-05-08  8:29       ` Dekel Peled
  2019-05-08  8:29       ` [dpdk-stable] [PATCH v4 3/4] net/mlx5: fix description of function return value Dekel Peled
  1 sibling, 0 replies; 9+ messages in thread
From: Dekel Peled @ 2019-05-08  8:29 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Function mlx5_rxq_ibv_release() is called in several places.
Before each call except one, the input parameter is validated to make
sure it is not null.

This patch adds the validation where it is missing.
It also changes a priv_ prefix, left in a comment, to mlx5_ prefix.

Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 83ba525..f595e7a 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -593,11 +593,12 @@
 			continue;
 		/**
 		 * Need to access directly the queue to release the reference
-		 * kept in priv_rx_intr_vec_enable().
+		 * kept in mlx5_rx_intr_vec_enable().
 		 */
 		rxq_data = (*priv->rxqs)[i];
 		rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
-		mlx5_rxq_ibv_release(rxq_ctrl->ibv);
+		if (rxq_ctrl->ibv)
+			mlx5_rxq_ibv_release(rxq_ctrl->ibv);
 	}
 free:
 	rte_intr_free_epoll_fd(intr_handle);
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v4 3/4] net/mlx5: fix description of function return value
       [not found]     ` <cover.1557303531.git.dekelp@mellanox.com>
  2019-05-08  8:29       ` [dpdk-stable] [PATCH v4 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
@ 2019-05-08  8:29       ` Dekel Peled
  1 sibling, 0 replies; 9+ messages in thread
From: Dekel Peled @ 2019-05-08  8:29 UTC (permalink / raw)
  To: yskoh, shahafs; +Cc: dev, stable

Return value of function mlx5_rxq_releasable() was not described
correctly in function description.

This patch updates the description to correctly describe the optional
return values.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index f595e7a..f10e896 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1527,8 +1527,9 @@ struct mlx5_rxq_ctrl *
  *   RX queue index.
  *
  * @return
- *   1 if the queue can be released, negative errno otherwise and rte_errno is
- *   set.
+ *   1 if the queue can be released
+ *   0 if the queue can not be released, there are references to it.
+ *   Negative errno and rte_errno is set if queue doesn't exist.
  */
 int
 mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
-- 
1.8.3.1


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

end of thread, other threads:[~2019-05-08  8:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1556534247.git.dekelp@mellanox.com>
2019-04-29 11:00 ` [dpdk-stable] [PATCH 3/4] net/mlx5: fix description of function return value Dekel Peled
     [not found] ` <cover.1556809050.git.dekelp@mellanox.com>
2019-05-02 15:01   ` [dpdk-stable] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-02 18:12     ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-stable] [PATCH v2 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-02 18:13     ` Yongseok Koh
     [not found]   ` <cover.1557061532.git.dekelp@mellanox.com>
2019-05-05 13:09     ` [dpdk-stable] [PATCH v3 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-05 13:09     ` [dpdk-stable] [PATCH v3 3/4] net/mlx5: fix description of function return value Dekel Peled
     [not found]     ` <cover.1557303531.git.dekelp@mellanox.com>
2019-05-08  8:29       ` [dpdk-stable] [PATCH v4 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-08  8:29       ` [dpdk-stable] [PATCH v4 3/4] net/mlx5: fix description of function return value Dekel Peled

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