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 7754EA0524 for ; Fri, 5 Feb 2021 12:32:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C9E2188A03; Fri, 5 Feb 2021 12:32:32 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 7164F40682 for ; Fri, 5 Feb 2021 12:32:30 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id j11so5738361wmi.3 for ; Fri, 05 Feb 2021 03:32:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2GBfL0hX05Pq8iuL/rQnvIStdCN2yPtg1ET8VvStoUY=; b=OHX8YW0Mk32SV/ykrE6dtK7p2tuLbHggFldbEDNE9Jxhb2zMr0BF3rgdgxGm6UD9Mw 8lYeRuG9hs8WqzNlyY+bFIXllb38QpNmQH1D5J+e0GwLBFbddh3lxbFAwyvHKCCsRwgh KneeA4QaNqKKLthxlll0+M+Gp0S/83QDrfQJ4RkHgOFruKyr/lw8Ev/zqIAiYNbKqysn GCgbnzs5Dg3o7pLAF95Dj7wa2gz6ZQy+/tiC6Q/AZK97kHmqiJWKPvDrfmqDT9bmSjFX tr/gSsOgfp2UkhlDWxlHd3otqXB7gJBnBQNfaMOmgtYzfBupiyqrdcNIyTaH2UffWbfh oITw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2GBfL0hX05Pq8iuL/rQnvIStdCN2yPtg1ET8VvStoUY=; b=UKG52EWWcR7iRCZCIaj5zN3nJ5dpwL+i7HUVCdvPOXeeidRTo62KEoXOTs7qGBSvDL EHUL3TXt0aS3SU1TxogjTIBvMMAS3ztz++J4fYj7Q5YftyHk8O5mRGYOO0nfvNekj+Gq I9A9mJjXQnql9vsltOX+hfUcjCGw3xbXRSSk55l+fggJz0KTxx7zk4b0FGuyav6ibHa2 KVk70HeM/J4SF6TCAoXGdCm99Xq0yfpaPaMeVaMDIsoCt/tAe4LKPVrwqUFvAdxIEsSO GvTHI4SW5ArWlNv4XQrjVLAZUw10GnDvJM/xDcoB9tUSdYu8921NVPer4vpvJk2tuE2F 6Klw== X-Gm-Message-State: AOAM532G/29lk2D6ERWMN8IqKjJTV3gV8+EA5DEfrim1ZQwqv+InHcPd Xq0R1mC7GEiWPH7Sox/HJPU= X-Google-Smtp-Source: ABdhPJwswOtOVOwhI8Mz9Eb8XSqfX+/FZUZs8Yqjr2W4mSg1BWVmjcrYXKxJJNkIuX/e9Prd2HVTeg== X-Received: by 2002:a7b:c395:: with SMTP id s21mr3213510wmj.97.1612524750122; Fri, 05 Feb 2021 03:32:30 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s23sm8428583wmc.35.2021.02.05.03.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:32:29 -0800 (PST) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andy Moreton , Andrew Rybchenko , dpdk stable Date: Fri, 5 Feb 2021 11:17:06 +0000 Message-Id: <20210205111920.1272063-140-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/sfc_efx/base: fix MAE match spec validation helper' has been queued to stable release 20.11.1 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" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/df8185a23676498f4da4297c99b0bf2a19691909 Thanks. Luca Boccassi --- >From df8185a23676498f4da4297c99b0bf2a19691909 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Wed, 6 Jan 2021 13:05:59 +0300 Subject: [PATCH] common/sfc_efx/base: fix MAE match spec validation helper [ upstream commit 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 ] A particular FW version is aware of some set of match fields. Depending on FW configuration and match specification type, a known field may not necessarily be allowed to have a non-zero mask. FW communicates such restrictions via field capabilities MCDI. Newer FW may be aware of more fields. For such fields, older FW simply does not report any capabilities. A situation may occur when libefx is aware of a match field which the FW is unaware of (eg., older FW), that is, FW does not report capability status for this field. In this case, libefx must consider such field as unsupported and demand all-zeros mask for it when validating match specifications. Currently, the helper in question simply exits and reports that the specification is valid when it encounters a field with no capability status available. This is clearly wrong. Introduce the missing check to fix the problem. Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API") Reviewed-by: Andy Moreton Reviewed-by: Andrew Rybchenko Signed-off-by: Ivan Malov --- drivers/common/sfc_efx/base/efx_mae.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index 22f29d454c..7fd42218f6 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -897,8 +897,17 @@ efx_mae_match_spec_is_valid( if (m_size == 0) continue; /* Skip array gap */ - if ((unsigned int)field_cap_id >= field_ncaps) - break; + if ((unsigned int)field_cap_id >= field_ncaps) { + /* + * The FW has not reported capability status for + * this field. Make sure that its mask is zeroed. + */ + is_valid = efx_mask_is_all_zeros(m_size, m_buf); + if (is_valid != B_FALSE) + continue; + else + break; + } switch (field_caps[field_cap_id].emfc_support) { case MAE_FIELD_SUPPORTED_MATCH_MASK: -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:35.413711002 +0000 +++ 0140-common-sfc_efx-base-fix-MAE-match-spec-validation-he.patch 2021-02-05 11:18:29.022695225 +0000 @@ -1 +1 @@ -From 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 Mon Sep 17 00:00:00 2001 +From df8185a23676498f4da4297c99b0bf2a19691909 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 40f94ce9fa6217ba33cda0c42fd732b77aaf4791 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org