From: Ivan Malov Date: Sat, 10 Apr 2021 00:51:43 +0000 (+0300) Subject: common/sfc_efx/base: fix indication of MAE encap support X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8076e40cde3b5230ac488aa44baa4dcf73993aca;p=dpdk.git common/sfc_efx/base: fix indication of MAE encap support The indication fields in the MCDI response are individual bits, but the current code mistakenly compares the larger dword with 1. This breaks encap. type discovery. Fix that. Fixes: 891408c45a63 ("common/sfc_efx/base: indicate MAE support for encapsulation") Cc: stable@dpdk.org Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index e6156102d6..80fe155d0d 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -46,17 +46,20 @@ efx_mae_get_capabilities( maep->em_encap_types_supported = 0; - if (MCDI_OUT_DWORD(req, MAE_GET_CAPS_OUT_ENCAP_TYPE_VXLAN) == 1) { + if (MCDI_OUT_DWORD_FIELD(req, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED, + MAE_GET_CAPS_OUT_ENCAP_TYPE_VXLAN) != 0) { maep->em_encap_types_supported |= (1U << EFX_TUNNEL_PROTOCOL_VXLAN); } - if (MCDI_OUT_DWORD(req, MAE_GET_CAPS_OUT_ENCAP_TYPE_GENEVE) == 1) { + if (MCDI_OUT_DWORD_FIELD(req, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED, + MAE_GET_CAPS_OUT_ENCAP_TYPE_GENEVE) != 0) { maep->em_encap_types_supported |= (1U << EFX_TUNNEL_PROTOCOL_GENEVE); } - if (MCDI_OUT_DWORD(req, MAE_GET_CAPS_OUT_ENCAP_TYPE_NVGRE) == 1) { + if (MCDI_OUT_DWORD_FIELD(req, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED, + MAE_GET_CAPS_OUT_ENCAP_TYPE_NVGRE) != 0) { maep->em_encap_types_supported |= (1U << EFX_TUNNEL_PROTOCOL_NVGRE); }