DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection
@ 2020-09-13 19:05 Michael Baum
  2020-09-13 19:05 ` [dpdk-dev] [PATCH v1 2/2] net/mlx5: fix using hairpin without dest DevX TIR support Michael Baum
  2020-09-15 13:37 ` [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Baum @ 2020-09-13 19:05 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko

There are 2 creators for Rx objects, DevX and Verbs.
There are supported DR versions when a DevX destination TIR flow action
creation cannot be supported, using this versions the TIR object should
be created by Verbs, what forces all the Rx objects to be created by
Verbs.

The selection of the Rx objects creator, wrongly, didn't take into
account the destination TIR action support what caused a failure in the
Rx flows creation.

Select Verbs creator when destination TIR action creation is not
supported by the DR version.

Fixes: 71dee7694a70 ("net/mlx5: separate Rx queue object creations")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 41db75e..0511a55 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1272,7 +1272,7 @@
 			goto error;
 		}
 	}
-	if (config->devx && config->dv_flow_en) {
+	if (config->devx && config->dv_flow_en && config->dest_tir) {
 		priv->obj_ops = devx_obj_ops;
 		priv->obj_ops.drop_action_create =
 						ibv_obj_ops.drop_action_create;
-- 
1.8.3.1


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

* [dpdk-dev] [PATCH v1 2/2] net/mlx5: fix using hairpin without dest DevX TIR support
  2020-09-13 19:05 [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection Michael Baum
@ 2020-09-13 19:05 ` Michael Baum
  2020-09-15 13:37 ` [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Baum @ 2020-09-13 19:05 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable

The PMD supports hairpin only if DevX is supported and DV flow is enable.

When destination DevX TIR is not supported, the PMD tries to create TIR
action, and fails.

Avoid supporting hairpin when destination DevX TIR is not supported.

Fixes: b6b3bf86bd1a ("net/mlx5: get hairpin capabilities")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index cefb450..a7924b1 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -569,12 +569,12 @@ struct mlx5_priv *
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 int
-mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
-			 struct rte_eth_hairpin_cap *cap)
+mlx5_hairpin_cap_get(struct rte_eth_dev *dev, struct rte_eth_hairpin_cap *cap)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_dev_config *config = &priv->config;
 
-	if (priv->sh->devx == 0) {
+	if (!priv->sh->devx || !config->dest_tir || !config->dv_flow_en) {
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection
  2020-09-13 19:05 [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection Michael Baum
  2020-09-13 19:05 ` [dpdk-dev] [PATCH v1 2/2] net/mlx5: fix using hairpin without dest DevX TIR support Michael Baum
@ 2020-09-15 13:37 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2020-09-15 13:37 UTC (permalink / raw)
  To: Michael Baum, dev; +Cc: Matan Azrad, Slava Ovsiienko

Hi,

> -----Original Message-----
> From: Michael Baum <michaelba@nvidia.com>
> Sent: Sunday, September 13, 2020 10:05 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection
> 
> There are 2 creators for Rx objects, DevX and Verbs.
> There are supported DR versions when a DevX destination TIR flow action
> creation cannot be supported, using this versions the TIR object should
> be created by Verbs, what forces all the Rx objects to be created by
> Verbs.
> 
> The selection of the Rx objects creator, wrongly, didn't take into
> account the destination TIR action support what caused a failure in the
> Rx flows creation.
> 
> Select Verbs creator when destination TIR action creation is not
> supported by the DR version.
> 
> Fixes: 71dee7694a70 ("net/mlx5: separate Rx queue object creations")
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/net/mlx5/linux/mlx5_os.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c
> b/drivers/net/mlx5/linux/mlx5_os.c
> index 41db75e..0511a55 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -1272,7 +1272,7 @@
>  			goto error;
>  		}
>  	}
> -	if (config->devx && config->dv_flow_en) {
> +	if (config->devx && config->dv_flow_en && config->dest_tir) {
>  		priv->obj_ops = devx_obj_ops;
>  		priv->obj_ops.drop_action_create =
> 
> 	ibv_obj_ops.drop_action_create;
> --
> 1.8.3.1

Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2020-09-15 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-13 19:05 [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection Michael Baum
2020-09-13 19:05 ` [dpdk-dev] [PATCH v1 2/2] net/mlx5: fix using hairpin without dest DevX TIR support Michael Baum
2020-09-15 13:37 ` [dpdk-dev] [PATCH v1 1/2] net/mlx5: fix Rx objects creator selection Raslan Darawsheh

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git