common/mlx5: query preserve capability via DevX
authorJiawei Wang <jiaweiw@nvidia.com>
Tue, 12 Jan 2021 10:29:15 +0000 (12:29 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:07 +0000 (18:16 +0100)
commitefa6a7e2003f34dd9f79018e348966e559b2bfcc
tree1071db8f8c91c59cf059b7d92ea190c98e367fed
parent6ad938f326d1b29fa92ee8ca07a766b6384844d9
common/mlx5: query preserve capability via DevX

Update function mlx5_devx_cmd_query_hca_attr() to add the
reg_c_preserve bit query.

The stored metadata in register C may be lost in NIC Tx and
FDB egress while doing one of the following operations:
 - packet encapsulation.
 - packet mirroring (multiple processing paths).
 - packet sampling (using Flow Sampler).

If the reg_c_preserve bit is set to 1, then the above
limitation is obsolete, the all metadata registers Cx
preserve their values even through the operations mentioned
above.

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h
drivers/common/mlx5/mlx5_prm.h