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 ED7814554D; Tue, 2 Jul 2024 16:48:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4245840ED6; Tue, 2 Jul 2024 16:47:01 +0200 (CEST) Received: from smtp-fw-52003.amazon.com (smtp-fw-52003.amazon.com [52.119.213.152]) by mails.dpdk.org (Postfix) with ESMTP id 3FD3740E15; Tue, 2 Jul 2024 16:46:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1719931618; x=1751467618; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=jJ9KK0BQh+fyhZwh4JNg8SiZBeDAQOpQ1ST6Ow1HVfw=; b=njpgzRYPAFDdVgc7+P0izXinzpvfbqSJPhS3mbNiEwNc/fgYjoe+6i2V wcsj2QoUnkXsKU5ibBOMOuE9RBhjdH8/7bU5HeFhma1WyqaDHNh4RuJ7B 4PMR6EGUODWT9Svv2Xw3GoVEYWAuGLyhfmrjtAftTQbHuyH8cMOK8nF5+ E=; X-IronPort-AV: E=Sophos;i="6.09,178,1716249600"; d="scan'208";a="8904978" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev) ([10.43.8.6]) by smtp-border-fw-52003.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2024 14:46:57 +0000 Received: from EX19MTAEUC002.ant.amazon.com [10.0.10.100:13284] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.1.13:2525] with esmtp (Farcaster) id 53eb0366-5b75-45d1-9a88-a0b6543c8be4; Tue, 2 Jul 2024 14:46:57 +0000 (UTC) X-Farcaster-Flow-ID: 53eb0366-5b75-45d1-9a88-a0b6543c8be4 Received: from EX19D007EUA004.ant.amazon.com (10.252.50.76) by EX19MTAEUC002.ant.amazon.com (10.252.51.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Tue, 2 Jul 2024 14:46:56 +0000 Received: from EX19MTAUWB001.ant.amazon.com (10.250.64.248) by EX19D007EUA004.ant.amazon.com (10.252.50.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Tue, 2 Jul 2024 14:46:56 +0000 Received: from HFA15-CG15235BS.amazon.com (10.85.143.173) by mail-relay.amazon.com (10.250.64.254) with Microsoft SMTP Server id 15.2.1258.34 via Frontend Transport; Tue, 2 Jul 2024 14:46:54 +0000 From: To: CC: , Shai Brandes , Subject: [PATCH 12/15] net/ena: fix invalid return value check Date: Tue, 2 Jul 2024 17:46:23 +0300 Message-ID: <20240702144626.14545-13-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240702144626.14545-1-shaibran@amazon.com> References: <20240702144626.14545-1-shaibran@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Shai Brandes Removed the sign inversion for when checking if ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED. ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign inversion is wrong. Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version") Cc: stable@dpdk.org Signed-off-by: Shai Brandes --- doc/guides/rel_notes/release_24_07.rst | 1 + drivers/net/ena/ena_ethdev.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst index f000dec54b..24bb91ad46 100644 --- a/doc/guides/rel_notes/release_24_07.rst +++ b/doc/guides/rel_notes/release_24_07.rst @@ -79,6 +79,7 @@ New Features * Reworked the device uninitialization flow to ensure complete resource cleanup and lay the groundwork for hot-unplug support. * Removed an obsolete workaround for a false L4 bad Rx checksum indication. + * Fixed an invalid return value check. * **Update Tap PMD driver.** diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index b43b913903..67a1d86f9a 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -812,7 +812,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev) rc = ena_com_set_host_attributes(ena_dev); if (rc) { - if (rc == -ENA_COM_UNSUPPORTED) + if (rc == ENA_COM_UNSUPPORTED) PMD_DRV_LOG(WARNING, "Cannot set host attributes\n"); else PMD_DRV_LOG(ERR, "Cannot set host attributes\n"); @@ -856,7 +856,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter) rc = ena_com_set_host_attributes(&adapter->ena_dev); if (rc) { - if (rc == -ENA_COM_UNSUPPORTED) + if (rc == ENA_COM_UNSUPPORTED) PMD_DRV_LOG(WARNING, "Cannot set host attributes\n"); else PMD_DRV_LOG(ERR, "Cannot set host attributes\n"); -- 2.17.1