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 A637EA2EEB for ; Tue, 10 Sep 2019 10:27:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DB1B11EDB4; Tue, 10 Sep 2019 10:26:35 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 489031EB02 for ; Tue, 10 Sep 2019 10:26:21 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 25D4A1C0068; Tue, 10 Sep 2019 08:26:20 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Sep 2019 01:26:17 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 10 Sep 2019 01:26:16 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x8A8QFUA002226; Tue, 10 Sep 2019 09:26:15 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id A224F1613D2; Tue, 10 Sep 2019 09:26:15 +0100 (BST) From: Andrew Rybchenko To: Jakub Grajciar CC: Date: Tue, 10 Sep 2019 09:25:46 +0100 Message-ID: <1568103959-25572-7-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1568103959-25572-1-git-send-email-arybchenko@solarflare.com> References: <1568103959-25572-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24898.005 X-TM-AS-Result: No-2.614500-4.000000-10 X-TMASE-MatchedRID: m3UrM73BECPDOgXZFRFV83CO70QAsBdC3V4UShoTXad+SLLtNOiBhhnq ZOIRSjISfMtvnnFP0XhTvVffeIwvQyHhSBQfglfsA9lly13c/gFKgIbix5+XxEFungmhsSsCEG3 UzQEO6wqPBX+OQ5pJCm7LD6wi4cwC1aorlXfSzHmeAiCmPx4NwBnUJ0Ek6yhjxEHRux+uk8hxKp vEGAbTDkcJbjdBythVYAL6X/NdAGqyJvpQRd8E0JCRa/husYgGGLQYciovTMRTo0JZGTZDx4bWF wnRX1x9GFPRNHvUQnd3jtuaHNW7a5N1JFeUKeMEiOOUXfTkScBZSbxIRLLN380Goa3UM++8 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--2.614500-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24898.005 X-MDID: 1568103980-eXsLqIrloTSQ Subject: [dpdk-dev] [PATCH 06/18] net/memif: check status of getting link info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The return value of rte_eth_link_get() was changed from void to int. Update the usage of the function according to the new return type. Just log error if something goes wrong. Signed-off-by: Andrew Rybchenko --- 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 af260f7a8..a347e27bd 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -266,7 +266,10 @@ eth_memif_rx(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; } @@ -392,8 +395,13 @@ eth_memif_tx(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.17.1