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 8E718A0524 for ; Fri, 5 Feb 2021 12:29:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 887D540682; Fri, 5 Feb 2021 12:29:57 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id A94D740682 for ; Fri, 5 Feb 2021 12:29:56 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id p15so7260273wrq.8 for ; Fri, 05 Feb 2021 03:29:56 -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=5wbXt0kBswJBjKbaEioMq3xMUEDU4zYmBcHv40ojo5k=; b=lJDbzoLqKonJKwwW+fx/dkOong6LRJ1My6MLHiImGb83JYi0OR1n/WtBuUG85Qz5Sk n1dqU7VlVPjozDrS+xoJkMarD0+C6jXbWkBPPWaQaOfqkHcRVl4kXLcwaRYKGiQt5iHi +7Sco9uIosn0LEklj2xcDthUQpagC4Ns+8xq3xQascKDEA/8f38Tp0xDqdNpzokrTuGe /vEeRuGZjUWTGkdPhNTeH9Mh3zzIjl0pyWKBdcvVLZZEF+/mWjt17wxYFGlO3k6dZtpd FLHVkb1X2+uanY8BUHdCz6NPwxIrvk8X0qPxAFC17ZAvovO7mn9tUR4moZxHzkLYhA2P PvPA== 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=5wbXt0kBswJBjKbaEioMq3xMUEDU4zYmBcHv40ojo5k=; b=Pnx87lCmuUvy6BXU0MkQqMxrFaIg4Kk7MWB8TeIoD5wEOUkZFw2bWJT/Qmv/EsaHlt qRCHumD9DRz5rvTnbntvxcAiahyS5mHoAOIsiHfyWk46wv1vn1SlfsTbhgIbj3+HgT54 8c9gDmd5guAqEiiHkXpYmbBcp7EQjLl/MB4cgL2n956zJkgJNPHnmeJeJx0hdiX+KsHA HHOwIWpAZPNsBh4JK318C1wsK+P33vHBzYz63m3DC+DVI9o5kUUW9y4rgyyLDa7oFLtc v48dCoHyzDRee/jsA7P/gyHpKV6ZOF6ESD4Ei/rgOGMCA779HoQEq3CTGLxM+DyRDETE Rj2A== X-Gm-Message-State: AOAM5306kNwN4VhgyBfomvNf85kFEI8te8tocTHpeLwlrMxXFic9peaj BYTxegVDG/P9Mfgi4enKqeOuCKDZyM9KaYns X-Google-Smtp-Source: ABdhPJw0/WkbtBsKGMdruhpi9/f+0UwGqm0vvJjqcRcKBrbI/709Er4yPPsc+twHkowC3fiK9nu7xg== X-Received: by 2002:a5d:4dd0:: with SMTP id f16mr4533295wru.304.1612524596454; Fri, 05 Feb 2021 03:29:56 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id k4sm12715811wrm.53.2021.02.05.03.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:29:55 -0800 (PST) From: luca.boccassi@gmail.com To: Alvin Zhang Cc: Qi Zhang , dpdk stable Date: Fri, 5 Feb 2021 11:16:17 +0000 Message-Id: <20210205111920.1272063-91-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 'net/i40e: fix returned code for RSS hardware failure' 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/b944df6b68c04f6075bfe4eed81246de85dc0d81 Thanks. Luca Boccassi --- >From b944df6b68c04f6075bfe4eed81246de85dc0d81 Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Fri, 8 Jan 2021 13:35:39 +0800 Subject: [PATCH] net/i40e: fix returned code for RSS hardware failure [ upstream commit c222d2a1d00719564526e5a14ca24622bebc0712 ] The API should return the system error status, but it returned the hardware error status, this is confuses the caller. This patch adds check on hardware execution status and returns -EIO in case of hardware execution failure. Fixes: 1d4b2b4966bb ("net/i40e: fix VF overwrite PF RSS LUT for X722") Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") Signed-off-by: Alvin Zhang Acked-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 7f9bba4052..5984e52abd 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4443,7 +4443,6 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) { struct i40e_pf *pf; struct i40e_hw *hw; - int ret; if (!vsi || !lut) return -EINVAL; @@ -4452,12 +4451,16 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) hw = I40E_VSI_TO_HW(vsi); if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { - ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, - vsi->type != I40E_VSI_SRIOV, - lut, lut_size); - if (ret) { - PMD_DRV_LOG(ERR, "Failed to set RSS lookup table"); - return ret; + enum i40e_status_code status; + + status = i40e_aq_set_rss_lut(hw, vsi->vsi_id, + vsi->type != I40E_VSI_SRIOV, + lut, lut_size); + if (status) { + PMD_DRV_LOG(ERR, + "Failed to update RSS lookup table, error status: %d", + status); + return -EIO; } } else { uint32_t *lut_dw = (uint32_t *)lut; @@ -7612,7 +7615,6 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len) uint16_t key_idx = (vsi->type == I40E_VSI_SRIOV) ? I40E_VFQF_HKEY_MAX_INDEX : I40E_PFQF_HKEY_MAX_INDEX; - int ret = 0; if (!key || key_len == 0) { PMD_DRV_LOG(DEBUG, "No key to be configured"); @@ -7625,11 +7627,16 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len) if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { struct i40e_aqc_get_set_rss_key_data *key_dw = - (struct i40e_aqc_get_set_rss_key_data *)key; + (struct i40e_aqc_get_set_rss_key_data *)key; + enum i40e_status_code status = + i40e_aq_set_rss_key(hw, vsi->vsi_id, key_dw); - ret = i40e_aq_set_rss_key(hw, vsi->vsi_id, key_dw); - if (ret) - PMD_INIT_LOG(ERR, "Failed to configure RSS key via AQ"); + if (status) { + PMD_DRV_LOG(ERR, + "Failed to configure RSS key via AQ, error status: %d", + status); + return -EIO; + } } else { uint32_t *hash_key = (uint32_t *)key; uint16_t i; @@ -7649,7 +7656,7 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len) I40E_WRITE_FLUSH(hw); } - return ret; + return 0; } static int -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:33.363257364 +0000 +++ 0091-net-i40e-fix-returned-code-for-RSS-hardware-failure.patch 2021-02-05 11:18:28.942693701 +0000 @@ -1 +1 @@ -From c222d2a1d00719564526e5a14ca24622bebc0712 Mon Sep 17 00:00:00 2001 +From b944df6b68c04f6075bfe4eed81246de85dc0d81 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c222d2a1d00719564526e5a14ca24622bebc0712 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org