From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A38B7A051C for ; Tue, 11 Feb 2020 12:24:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9B0111BF87; Tue, 11 Feb 2020 12:24:56 +0100 (CET) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 166A01BFA4 for ; Tue, 11 Feb 2020 12:24:55 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id t23so3032745wmi.1 for ; Tue, 11 Feb 2020 03:24:55 -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=XAHnq63O8LIVeeLz3lCDkO+3mLJjCo21EeIovaJ0D8c=; b=PxgSkDgqJhsuWohkr+v5ty2Cr1+RxW0SpsEYsDJbOmJdCthBObECqhX2HVNgnpxDzv zPkmzYNcxyTEoXCSMnvZz0JPhSOpr+PT07u0eGjSvAhqbOMSvfVChIQfEomQLvMCj5k+ wHFIB2Thw4n8VUTz065YeRSpePHbPFIvsoR9qapWDuMFFx9o6Mub/kqi1/2Dsa3erdzc Mv4h86S41GHGniXRgFDSD3bTOmlnXERRLH4jLGdmQR0M14VwZhYVk5BoZ+NLdNvALNrz V5KVcDpjvclkofUbWWwzuS/5QJt5D8LdU3AKIhqLtYoJ0UPUZU6PXawen481s+SoT8pV QCiQ== 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=XAHnq63O8LIVeeLz3lCDkO+3mLJjCo21EeIovaJ0D8c=; b=RGiAVxFkCHMKxfUdc7C9F2Go86Q5eqCkqVWf/IgapGpAyAGlFcBAJwiRSQNE2WkQx5 A5PApaBM+nyJAS3YYcEbprSIZX8JuEfSc56hepAxcKd5WpRYm7OEbaX7R5VkjesRkV7j LnEz3mIPRjXsdjyekEF2zs4xkNJRDYvIcvOeQYVan12eH5f/M5OaR4YrH1edpzig+0EW nXBLWVSqSC+DxAnMFQv/R4s4Id6LN8TuEW5WK6MUoL7OBgOHpOOGbbGqEHZoMJYpIO63 Ev74zDBEpa8UkjZKBEXnCOolkAWEVnGWxI+YQ5pSE69RCbqDm/aHgPTD698x94XCTg2c nljA== X-Gm-Message-State: APjAAAUc4J3mO+FVoRnF0TTEcEapCVrtJf1JWnVpu59WjHfYq1q1Dgic zaUfCo1REXjKo4szcHCNHrE= X-Google-Smtp-Source: APXvYqzcMyf8A+OZtJ6/Cu2iiu2Tv9i9jCW0EAxEFVWN1J3vNtppxYjVrl2i9wP0/FxYHlQ0UTFO3w== X-Received: by 2002:a7b:c774:: with SMTP id x20mr5035132wmk.67.1581420294712; Tue, 11 Feb 2020 03:24:54 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id j14sm4811458wrn.32.2020.02.11.03.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:24:54 -0800 (PST) From: luca.boccassi@gmail.com To: Tonghao Zhang Cc: Ori Kam , dpdk stable Date: Tue, 11 Feb 2020 11:19:43 +0000 Message-Id: <20200211112216.3929-37-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix crash when setting hairpin queues' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 19.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/13/20. 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. Thanks. Luca Boccassi --- >From 2f8346b61c7fcf0020d10679ca665a338c670f01 Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Wed, 27 Nov 2019 22:18:41 +0800 Subject: [PATCH] net/mlx5: fix crash when setting hairpin queues [ upstream commit bf864e820558a8b001d5de6be437456e82ac3c81 ] If configuring the number of tx/rx queue with rte_eth_dev_configure to nr_queues + hairpin_nr_queues, and setting tx/rx queues to nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the hairpin queues via rte_eth_tx/rx_hairpin_queue_setup. When starting the netdev, there is a crash because of NULL accessing. Fixes: cf5516696d77 ("ethdev: add hairpin queue") Signed-off-by: Tonghao Zhang Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_ethdev.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index d80ae458bc..3b4c5dbe7a 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -476,7 +476,7 @@ mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev) rxq_data = (*priv->rxqs)[i]; rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq); - if (rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD) + if (rxq_ctrl && rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD) rss_queue_arr[j++] = i; } rss_queue_n = j; diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index cafab25c67..ab6937ab10 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -106,9 +106,12 @@ mlx5_rxq_start(struct rte_eth_dev *dev) unsigned int i; int ret = 0; enum mlx5_rxq_obj_type obj_type = MLX5_RXQ_OBJ_TYPE_IBV; + struct mlx5_rxq_data *rxq = NULL; for (i = 0; i < priv->rxqs_n; ++i) { - if ((*priv->rxqs)[i]->lro) { + rxq = (*priv->rxqs)[i]; + + if (rxq && rxq->lro) { obj_type = MLX5_RXQ_OBJ_TYPE_DEVX_RQ; break; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:40.426093125 +0000 +++ 0037-net-mlx5-fix-crash-when-setting-hairpin-queues.patch 2020-02-11 11:17:38.372000824 +0000 @@ -1,8 +1,10 @@ -From bf864e820558a8b001d5de6be437456e82ac3c81 Mon Sep 17 00:00:00 2001 +From 2f8346b61c7fcf0020d10679ca665a338c670f01 Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Wed, 27 Nov 2019 22:18:41 +0800 Subject: [PATCH] net/mlx5: fix crash when setting hairpin queues +[ upstream commit bf864e820558a8b001d5de6be437456e82ac3c81 ] + If configuring the number of tx/rx queue with rte_eth_dev_configure to nr_queues + hairpin_nr_queues, and setting tx/rx queues to nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the @@ -11,7 +13,6 @@ When starting the netdev, there is a crash because of NULL accessing. Fixes: cf5516696d77 ("ethdev: add hairpin queue") -Cc: stable@dpdk.org Signed-off-by: Tonghao Zhang Acked-by: Ori Kam