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 61F4945AAF; Fri, 4 Oct 2024 18:25:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 606C642E0B; Fri, 4 Oct 2024 18:24:35 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 4EF6C42D97 for ; Fri, 4 Oct 2024 18:24:31 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-71df04d3cd1so133405b3a.2 for ; Fri, 04 Oct 2024 09:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728059070; x=1728663870; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jZfDzRGPMpF9L52qhXIVcRytQS2eU1j35o45NWmI6R0=; b=i/BcPRwG1P5hr+GIKD1g+kwZcQMFf5mhfNr/Hk7TQUlB5IbwD4/WFv98aQvZ81qI/O uxmH8PWKQJWBozR6oEGqG6HRPJOSAbciPSyjRgHEmw6sq4khYB51uvj5ZoOdIwIxmuPx FjiBgIowro8f04dlLdv5wB2OYEhhQ16wWMfVn5fejv4n4OynUpriGH2y+tvBp/iAyMW7 80cuYKO55d8Y+uY2T9orD/ObYNAWzYac0RRz5akuXPWw7yP6aTAm4iNyhQYI8PfdkDZG 6GBpQeEDtS23EqXBU2i5wBwsXHWj3jpvFBKLZ1sEXPj7x0Io1E52lHpdC+RW9H1esF9u /T0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728059070; x=1728663870; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jZfDzRGPMpF9L52qhXIVcRytQS2eU1j35o45NWmI6R0=; b=bPP0g2Q7ppLW/Z7fbcPd+Nzq3VPhKwYkcFj5EkXJTxpFxxgKHJjxnEUNGeLYvKWmv1 5y6OMrP2OQUuQ9ZUlQVmP88404tO5pawZmaR5EOgKuuCPeLJLIU90EOvecxNXP4fKaC4 z9OpNiJ0re9iNmAHcQbxVBSMimD1T/Tfe4bVDhA4Vb6Eax839AfUTAt8MPL5T8AFmOMe OS4ibpG6U2IgU9yC2wmpUKVnf7l+CJpqIwDNpcB4lEqjGFf58BMWcqKuTx5I82RAd/m8 nw0xmYBU+gIqHL1oQlpspF35+E9cQlcug7b9YMjcZcEHSt1f1jedY3IEvO9gkG/xAjyi r53w== X-Gm-Message-State: AOJu0Yx8UocisaLFBzEPyPkL4qPsERWhca1jWG7imC0oMXNFzZmsEFnw sUglW9JUXYK7tVBynS4lufYUS7OE3UoWLgTvPoI4YmA2zVqUOuh+pP1KQVP/pCHFPT9Y+/i8QUX GSNpeOQ== X-Google-Smtp-Source: AGHT+IEolcIuC4uJ3PjgNJztHLg2nMw9mBnN/O6fFO4lS3A/acGvnrtOa3ia3GHGPhCmd3FvlPlLxA== X-Received: by 2002:a05:6a00:3c8b:b0:718:532f:5a3 with SMTP id d2e1a72fcca58-71de23c770emr4980302b3a.7.1728059070354; Fri, 04 Oct 2024 09:24:30 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e9f680d7a1sm139231a12.19.2024.10.04.09.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 09:24:30 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jakub Grajciar Subject: [PATCH 02/10] net/memif: check return value from rte_eth_dev_info_get Date: Fri, 4 Oct 2024 09:21:49 -0700 Message-ID: <20241004162418.52940-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004162418.52940-1-stephen@networkplumber.org> References: <20241004162418.52940-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Handle errors from rte_eth_dev_info_get in the same manner as other places in this file. Signed-off-by: Stephen Hemminger --- drivers/net/memif/rte_eth_memif.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index e220ffaf92..227025dd20 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -520,7 +520,10 @@ eth_memif_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) return 0; if (unlikely(ring == NULL)) { /* Secondary process will attempt to request regions. */ - rte_eth_link_get(mq->in_port, &link); + ret = rte_eth_link_get(mq->in_port, &link); + if (ret < 0) + MIF_LOG(ERR, "Failed to get port %u link info: %s", + mq->in_port, rte_strerror(-ret)); return 0; } @@ -864,8 +867,13 @@ eth_memif_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely((pmd->flags & ETH_MEMIF_FLAG_CONNECTED) == 0)) return 0; if (unlikely(ring == NULL)) { + int ret; + /* Secondary process will attempt to request regions. */ - rte_eth_link_get(mq->in_port, &link); + ret = rte_eth_link_get(mq->in_port, &link); + if (ret < 0) + MIF_LOG(ERR, "Failed to get port %u link info: %s", + mq->in_port, rte_strerror(-ret)); return 0; } -- 2.45.2