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 9B775A0524 for ; Fri, 5 Feb 2021 12:22:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EE681606C3; Fri, 5 Feb 2021 12:22:52 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 1B33D1606D2 for ; Fri, 5 Feb 2021 12:22:51 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id g10so7310057wrx.1 for ; Fri, 05 Feb 2021 03:22:51 -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=ycSBfdXYUZDCX61mxpl81mSoSch6furqIeQCLAXNVaY=; b=VhzOqhcJgXGbl/qkl9qc8LlQli5L1vVtmFR2RiXouBWLOsQkdcEoj8K4WqvASSUjJR NRi8NO7g/1HSFKsQ2FegIcpO6jSl4B3NzkGoGn4MBLDaD62xWZ/bNZAU1qZnqvIgJ6vg TJ5hA/aaSuqtQGX4zVBT8dAwW0hA1Lb88PppPg/CJm19gCdkIrtI3FKFZA+ydZwRyU7A fm5FjkAtuW7z3hWqkbLyxCSs3tORDx7EssVbVDHMFDxdjwSvoOGCZ6ljpebKAfpHfCCa Z4OE5vh5ZH+8uW22hMS4NkEPNPjqMSgkK4cpF9TTrGNDqYkDZ4+fGOeBtiZe79UUol9S HupA== 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=ycSBfdXYUZDCX61mxpl81mSoSch6furqIeQCLAXNVaY=; b=TU7oDZBFtbUb/ReZuE4nqL1c3wtD0yZhIX/H3PN0126WrSlFYG51uT1U/RabE9OP2V bzeGq9AbpDRPWKNMD8CqYSZAl0ekZYGqnnlxyydvP8cgCXRL5e7gZFbL/rT83w7/OmMM kgYM0vPATPm99upItjLVm1ErWJKzSrMb/TzUrik8IDik9+bgjxvwTsO2fK5T7s3nFvNk p8MR/WjgFtwKWzimFuA+xg9btYt/hQpJ7VR/QteWqsFJw0E03vpAzgQn3mHqP1fo/xbX qlxV6NOi1+0G0X2xOiDoSxWz1YnG/FW5JwAXpR9t1iBaR/40dv5CqhjHgTA9L3Y04eZr EXNQ== X-Gm-Message-State: AOAM533jJR+e1XC8BZy99xzyilT6KA0Z0tOwtXhHXiZl4bc90NRk3L4t ux31lmutrV5spTzfSehUvoY= X-Google-Smtp-Source: ABdhPJz1Xo8r7n1UpVWcUzKJGYtTk4mS0fTZGI1RtWtfhAk7NyslWg94uzRU+RXNXVfaQZ9lM3L+mA== X-Received: by 2002:adf:b749:: with SMTP id n9mr4399101wre.267.1612524170885; Fri, 05 Feb 2021 03:22:50 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o9sm12341494wrw.81.2021.02.05.03.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:22:50 -0800 (PST) From: luca.boccassi@gmail.com To: Dapeng Yu Cc: Qi Zhang , dpdk stable Date: Fri, 5 Feb 2021 11:15:49 +0000 Message-Id: <20210205111920.1272063-63-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/ice: check Rx queue number on RSS init' 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/b2b5767a2e2f64494d54838bcbdd036ee119ec3c Thanks. Luca Boccassi --- >From b2b5767a2e2f64494d54838bcbdd036ee119ec3c Mon Sep 17 00:00:00 2001 From: Dapeng Yu Date: Wed, 23 Dec 2020 13:30:18 +0800 Subject: [PATCH] net/ice: check Rx queue number on RSS init [ upstream commit bfa4f648728a742f0b38edb628e2978fa5721b01 ] When RSS is initialized, rx queues number is used as denominator to set default value into the RSS lookup table. If it is zero, there will be error of being divided by 0. So add value check to avoid the error. Fixes: 50370662b727 ("net/ice: support device and queue ops") Signed-off-by: Dapeng Yu Acked-by: Qi Zhang --- drivers/net/ice/ice_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 9a5d6a559f..bbb8c14606 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3182,6 +3182,12 @@ static int ice_init_rss(struct ice_pf *pf) vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE; vsi->rss_lut_size = pf->hash_lut_size; + if (nb_q == 0) { + PMD_DRV_LOG(WARNING, + "RSS is not supported as rx queues number is zero\n"); + return 0; + } + if (is_safe_mode) { PMD_DRV_LOG(WARNING, "RSS is not supported in safe mode\n"); return 0; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:32.100727739 +0000 +++ 0063-net-ice-check-Rx-queue-number-on-RSS-init.patch 2021-02-05 11:18:28.810691188 +0000 @@ -1 +1 @@ -From bfa4f648728a742f0b38edb628e2978fa5721b01 Mon Sep 17 00:00:00 2001 +From b2b5767a2e2f64494d54838bcbdd036ee119ec3c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bfa4f648728a742f0b38edb628e2978fa5721b01 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org