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 B44D043345 for ; Thu, 16 Nov 2023 14:24:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC4D240A89; Thu, 16 Nov 2023 14:24:36 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3618E402DD for ; Thu, 16 Nov 2023 14:24:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700141074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cDLNZoGcFjG6pgWl46s7Pmea0joFRn5WTPH67DJaxYg=; b=SJSJU2R+AV0F3+eL27veoKeZbcJqNZfTUfuTheOsTZhwDNVs0yigJGxxb/d8pGsZQaOBMl cmBg/B8AbOjkvKv3LpUj8IDokhXPX4GrVPxw4jeJILYz3lbzuCM8FmxAo+iQOy7XSJ9NSZ tsuuh20TCLQR4nN4z1qu0b3fYSFXRoM= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-V1CtQVLUOCy_-QicwfvXmA-1; Thu, 16 Nov 2023 08:24:31 -0500 X-MC-Unique: V1CtQVLUOCy_-QicwfvXmA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FAD41C03152; Thu, 16 Nov 2023 13:24:30 +0000 (UTC) Received: from rh.Home (unknown [10.39.194.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3DCF2166B27; Thu, 16 Nov 2023 13:24:29 +0000 (UTC) From: Kevin Traynor To: Jie Hai Cc: dpdk stable Subject: patch 'net/hns3: fix some return values' has been queued to stable release 21.11.6 Date: Thu, 16 Nov 2023 13:23:04 +0000 Message-ID: <20231116132348.557257-22-ktraynor@redhat.com> In-Reply-To: <20231116132348.557257-1-ktraynor@redhat.com> References: <20231116132348.557257-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 21.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/23. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6b71d322adea61ff64568e97724f8f141fce9ac1 Thanks. Kevin --- >From 6b71d322adea61ff64568e97724f8f141fce9ac1 Mon Sep 17 00:00:00 2001 From: Jie Hai Date: Tue, 31 Oct 2023 20:23:56 +0800 Subject: [PATCH] net/hns3: fix some return values [ upstream commit 08159599978f7f7eb6c4aaed7c290e33b8bc3d64 ] 1. Fix the return value of hns3_get_imissed_stats_num as 'uint16_t'. 2. Add some error check for return value. Fixes: fcba820d9b9e ("net/hns3: support flow director") Signed-off-by: Jie Hai --- drivers/net/hns3/hns3_ethdev_vf.c | 5 ++++- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_stats.c | 15 ++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index f4a37f433b..2c5f19c50e 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2204,6 +2204,9 @@ hns3vf_reinit_dev(struct hns3_adapter *hns) if (pci_dev->kdrv == RTE_PCI_KDRV_IGB_UIO || pci_dev->kdrv == RTE_PCI_KDRV_UIO_GENERIC) { - if (hns3vf_enable_msix(pci_dev, true)) + ret = hns3vf_enable_msix(pci_dev, true); + if (ret != 0) { hns3_err(hw, "Failed to enable msix"); + return ret; + } } diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index 4432279e6d..a2dd25fb21 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -976,5 +976,5 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns, rule->key_conf.spec.dst_port, ret); else - hns3_remove_fdir_filter(hw, fdir_info, &rule->key_conf); + ret = hns3_remove_fdir_filter(hw, fdir_info, &rule->key_conf); return ret; diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c index 169bad1412..79e4063b00 100644 --- a/drivers/net/hns3/hns3_stats.c +++ b/drivers/net/hns3/hns3_stats.c @@ -772,5 +772,5 @@ hns3_mac_stats_reset(struct hns3_hw *hw) } -static int +static uint16_t hns3_get_imissed_stats_num(struct hns3_adapter *hns) { @@ -994,5 +994,5 @@ hns3_imissed_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, struct hns3_hw *hw = &hns->hw; struct hns3_rx_missed_stats *imissed_stats = &hw->imissed_stats; - int imissed_stats_num; + uint16_t imissed_stats_num; int cnt = *count; char *addr; @@ -1171,5 +1171,5 @@ hns3_imissed_stats_name_get(struct rte_eth_dev *dev, struct hns3_adapter *hns = dev->data->dev_private; uint32_t cnt = *count; - int imissed_stats_num; + uint16_t imissed_stats_num; uint16_t i; @@ -1540,6 +1540,11 @@ hns3_stats_init(struct hns3_hw *hw) } - if (!hns->is_vf) - hns3_mac_stats_reset(hw); + if (!hns->is_vf) { + ret = hns3_mac_stats_reset(hw); + if (ret) { + hns3_err(hw, "reset mac stats failed, ret = %d", ret); + return ret; + } + } return hns3_tqp_stats_init(hw); -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-16 13:21:53.093361590 +0000 +++ 0022-net-hns3-fix-some-return-values.patch 2023-11-16 13:21:52.445946360 +0000 @@ -1 +1 @@ -From 08159599978f7f7eb6c4aaed7c290e33b8bc3d64 Mon Sep 17 00:00:00 2001 +From 6b71d322adea61ff64568e97724f8f141fce9ac1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 08159599978f7f7eb6c4aaed7c290e33b8bc3d64 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 0a227e6e45..156fb905f9 100644 +index f4a37f433b..2c5f19c50e 100644 @@ -23 +24 @@ -@@ -2082,6 +2082,9 @@ hns3vf_reinit_dev(struct hns3_adapter *hns) +@@ -2204,6 +2204,9 @@ hns3vf_reinit_dev(struct hns3_adapter *hns) @@ -35 +36 @@ -index c80fa59e63..d100e58d10 100644 +index 4432279e6d..a2dd25fb21 100644 @@ -38 +39 @@ -@@ -979,5 +979,5 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns, +@@ -976,5 +976,5 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns, @@ -46 +47 @@ -index c2e692a2c5..9a1e8935e5 100644 +index 169bad1412..79e4063b00 100644