net/mlx5: add eCPRI flex parser capacity check
authorBing Zhao <bingz@mellanox.com>
Fri, 17 Jul 2020 07:11:50 +0000 (15:11 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Jul 2020 13:44:36 +0000 (15:44 +0200)
commitd7c49561d3abd974f059282ccbb3b604900e6299
tree5b476ccb6e4ef628bdecca48a8f3355e71d71067
parent1c5064044fbe5bfa0bc1f33041b52414964bbd89
net/mlx5: add eCPRI flex parser capacity check

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>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5.c