DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bing Zhao <bingz@mellanox.com>
To: orika@mellanox.com, viacheslavo@mellanox.com
Cc: rasland@mellanox.com, matan@mellanox.com, dev@dpdk.org,
	netanelg@mellanox.com
Subject: [dpdk-dev] [PATCH v2 6/7] net/mlx5: add eCPRI flex parser capacity check
Date: Thu, 16 Jul 2020 21:49:58 +0800	[thread overview]
Message-ID: <1594907399-63329-7-git-send-email-bingz@mellanox.com> (raw)
In-Reply-To: <1594907399-63329-1-git-send-email-bingz@mellanox.com>

If the NIC or the FW does not support the dynamic flex parser,
it will return error when trying to create the parser for eCRPI.
Then it is hard to know the detail error reason of the failure.
Before creating the parser node and the following usage of the
parser, the capacity bit saved in the HCA_CAP could be used to
confirm if the dynamic flex parser is supported.
If no, an error will be returned directly with ENOTSUP to prevent
the following steps to be executed.

Signed-off-by: Bing Zhao <bingz@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index aec0173..eaa2d3e 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -636,6 +636,11 @@ mlx5_flex_parser_ecpri_alloc(struct rte_eth_dev *dev)
 	uint32_t ids[8];
 	int ret;
 
+	if (!priv->caps.parse_graph_flex_node) {
+		DRV_LOG(ERR, "Dynamic flex parser is not supported "
+			"for device %s.", priv->dev_data->name);
+		return -ENOTSUP;
+	}
 	node.header_length_mode = MLX5_GRAPH_NODE_LEN_FIXED;
 	/* 8 bytes now: 4B common header + 4B message body header. */
 	node.header_length_base_value = 0x8;
-- 
2.5.5


  parent reply	other threads:[~2020-07-16 13:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 14:43 [dpdk-dev] [PATCH 0/5] add eCPRI support in mlx5 driver Bing Zhao
2020-07-08 14:43 ` [dpdk-dev] [PATCH 1/5] net/mlx5: add flow validation of eCPRI header Bing Zhao
2020-07-08 14:43 ` [dpdk-dev] [PATCH 2/5] net/mlx5: add flow translation " Bing Zhao
2020-07-09 12:22   ` Thomas Monjalon
2020-07-09 14:47     ` Bing Zhao
2020-07-08 14:43 ` [dpdk-dev] [PATCH 3/5] net/mlx5: add flex parser devx structures Bing Zhao
2020-07-08 14:43 ` [dpdk-dev] [PATCH 4/5] net/mlx5: adding Devx command for flex parsers Bing Zhao
2020-07-08 14:43 ` [dpdk-dev] [PATCH 5/5] net/mlx5: create and destroy eCPRI flex parser Bing Zhao
2020-07-16 13:49 ` [dpdk-dev] [PATCH v2 0/7] add eCPRI support in mlx5 driver Bing Zhao
2020-07-16 13:49   ` [dpdk-dev] [PATCH v2 1/7] net/mlx5: add flow validation of eCPRI header Bing Zhao
2020-07-16 13:49   ` [dpdk-dev] [PATCH v2 2/7] net/mlx5: add flow translation " Bing Zhao
2020-07-16 13:49   ` [dpdk-dev] [PATCH v2 3/7] common/mlx5: add flex parser DevX structures Bing Zhao
2020-07-16 13:49   ` [dpdk-dev] [PATCH v2 4/7] common/mlx5: adding DevX command for flex parsers Bing Zhao
2020-07-16 13:49   ` [dpdk-dev] [PATCH v2 5/7] net/mlx5: create and destroy eCPRI flex parser Bing Zhao
2020-07-16 13:49   ` Bing Zhao [this message]
2020-07-16 13:49   ` [dpdk-dev] [PATCH v2 7/7] doc: update release notes and guides for eCPRI Bing Zhao
2020-07-16 14:23   ` [dpdk-dev] [PATCH v3 0/7] add eCPRI support in mlx5 driver Bing Zhao
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 1/7] net/mlx5: add flow validation of eCPRI header Bing Zhao
2020-07-16 15:04       ` Slava Ovsiienko
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 2/7] net/mlx5: add flow translation " Bing Zhao
2020-07-16 15:04       ` Slava Ovsiienko
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 3/7] common/mlx5: add flex parser DevX structures Bing Zhao
2020-07-16 15:04       ` Slava Ovsiienko
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 4/7] common/mlx5: adding DevX command for flex parsers Bing Zhao
2020-07-16 15:05       ` Slava Ovsiienko
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 5/7] net/mlx5: create and destroy eCPRI flex parser Bing Zhao
2020-07-16 15:05       ` Slava Ovsiienko
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 6/7] net/mlx5: add eCPRI flex parser capacity check Bing Zhao
2020-07-16 15:05       ` Slava Ovsiienko
2020-07-16 14:23     ` [dpdk-dev] [PATCH v3 7/7] doc: update release notes and guides for eCPRI Bing Zhao
2020-07-16 15:05       ` Slava Ovsiienko
2020-07-17  7:11     ` [dpdk-dev] [PATCH v4 0/7] add eCPRI support in mlx5 driver Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 1/7] net/mlx5: add flow validation of eCPRI header Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 2/7] net/mlx5: add flow translation " Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 3/7] common/mlx5: add flex parser DevX structures Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 4/7] common/mlx5: adding DevX command for flex parsers Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 5/7] net/mlx5: create and destroy eCPRI flex parser Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 6/7] net/mlx5: add eCPRI flex parser capacity check Bing Zhao
2020-07-17  7:11       ` [dpdk-dev] [PATCH v4 7/7] doc: update release notes and guides for eCPRI Bing Zhao
2020-07-17 12:55       ` [dpdk-dev] [PATCH v4 0/7] add eCPRI support in mlx5 driver Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1594907399-63329-7-git-send-email-bingz@mellanox.com \
    --to=bingz@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=netanelg@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=viacheslavo@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).