common/mlx5: refactor HCA attributes query
common/mlx5: refactor HCA attributes query

There is the common part of code querying the HCA attributes
from the device, and this part can be commoditized as
dedicated routine.

Signed-off-by: Gregory Etelson <3a519118dcb518b0e040298252dc92c436a7335f@nvidia.com>
Signed-off-by: Viacheslav Ovsiienko <5b8db9bb93a9a9aefc8828f79604d1fe963a53dd@nvidia.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk