common/mlx5: fix Netlink port name padding in probing
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Sat, 19 Jun 2021 13:56:28 +0000 (16:56 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 24 Jun 2021 11:19:54 +0000 (13:19 +0200)
commit568d97c09ca00e52fd7805ef0cab522250dac18b
tree88c509d69cec0ccab57835f3b7d921eddaa77dbc
parentb57e414b48c0da58e445e3d2e92a05758632147d
common/mlx5: fix Netlink port name padding in probing

On some kernels the string attributes within Netlink
reply messages might be not padded with zeroes (in cases
when string length is aligned with 4-byte boundary).
While device probing, the physical port name was wrongly recognized,
causing a probing failure.

Fixes: 30a86157f6d5 ("net/mlx5: support PF representor")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/linux/mlx5_nl.c