From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 711A2A0579 for ; Sat, 10 Apr 2021 02:51:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 664AB141125; Sat, 10 Apr 2021 02:51:57 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id B607340688; Sat, 10 Apr 2021 02:51:54 +0200 (CEST) Received: from localhost.localdomain (unknown [188.242.7.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 312697F57C; Sat, 10 Apr 2021 03:51:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 312697F57C DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1618015914; bh=su4oT7RNklG8q9EzT654eeVYukYJQRj9GGsN7Vw+9II=; h=From:To:Cc:Subject:Date; b=SMpg/QpNqS857uiIL34EOgo2ewuuw8c/rOsQatpeWW4jUUkTco7v5wxh4qhb4uJe6 bCFYQ39gFg3isYhcRfOWeViM31eFXq+3LUAEtiCRH+TCBxKipp04LwKtmJcmXz1cv5 Pn/4/fR+iyBh5njAS2i3OvDA8qXcazdDHSu94aiw= From: Ivan Malov To: dev@dpdk.org Cc: stable@dpdk.org, Andrew Rybchenko , Andy Moreton Date: Sat, 10 Apr 2021 03:51:43 +0300 Message-Id: <20210410005143.28686-1-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] common/sfc_efx/base: fix indication of MAE encap. support X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- drivers/common/sfc_efx/base/efx_mae.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index e6156102d..80fe155d0 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); } -- 2.20.1