From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by dpdk.org (Postfix) with ESMTP id 944211DA4 for ; Tue, 24 Jul 2018 18:08:56 +0200 (CEST) Received: by mail-wr1-f48.google.com with SMTP id h10-v6so4705093wre.6 for ; Tue, 24 Jul 2018 09:08:56 -0700 (PDT) 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=w81W2JGq8hGQjnfMAGbijhCFeEHikkzbS59YN9SCcUw=; b=tW/AUeZH8x0sOBlhf4PcYOLbDW5G73vcZvbtiaVvSImJ3yYdbE14vhvegM7B10Q3d5 ywKfeHWPuOgbEw8k8BF0hhHNFggcXIZXikctnm2OoGes6/mQWfrd5rCuahk6/tBu6ShF 6FVxqJTYMrL8P3UOoq8OE7Y0pUKiMSVbW6SGtsKKjQN1aaCov7yQMKEWuks+jVCqVtT0 JDfc5lPPIvcoX9ijuMw61e1AMfdp0xijlUOicfp9g21CqpqGqNcorrTVydmyKRfo+leY xLTPJ6rX/d2w48OVHTniHadj8X97bkGxeSESv6XA3JFXldHuB62f2RH9TaDvqpt/qbpy NW3g== 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=w81W2JGq8hGQjnfMAGbijhCFeEHikkzbS59YN9SCcUw=; b=h2b0zYFhE+QpUvi26/RS1Td3ZAVqA+2x0xxc+Ai2w9x20P+pCrUb8c1zAsxq3GyvF/ r6p0UF2itC10LazVUaQFME89RNzTLR+8cPf1FFM1S7fNQkyhkecc/c8srnpoOJ/pRh2D mbtHD4IPYqEbdgehClkEuezlTlpHDAAS9jyORZh/7QhscUWP4iGxPB/xbztP127NbSxr UVe65uPeJuqFOR1mH8Rib8LpNMCoDcyIslyXTlPMXGGMYOTldsRcIUsOYor/UI/KIReR n7ZEYGfFLJ1IXwtR+pKUqBDapkvU7/HlGf77vFDQNYTuBVcsAsIjDgC4Ghbi7yxdLmVm wXiQ== X-Gm-Message-State: AOUpUlHbh2iT55qyDnFS480qPtDE4ROdxWLY0XkL+4ctas+CjiQRq1Uh jTyKSX56YA1BvK5dq2TU73Q= X-Google-Smtp-Source: AAOMgpd870uAfuXpn5hrfX0QcFKkPvF7Knj3MY2SAs2xKF8Z8D5iBJe9wzKfj+JlirK8vZat1Hn0Mw== X-Received: by 2002:adf:9996:: with SMTP id y22-v6mr12804678wrb.69.1532448536368; Tue, 24 Jul 2018 09:08:56 -0700 (PDT) Received: from localhost ([2a00:23c5:be94:4600:7b12:f8a0:fd52:f87d]) by smtp.gmail.com with ESMTPSA id b2-v6sm1425129wmh.20.2018.07.24.09.08.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 09:08:55 -0700 (PDT) From: luca.boccassi@gmail.com To: Ferruh Yigit Cc: Richard Walsh , Jerin Jacob , dpdk stable Date: Tue, 24 Jul 2018 17:07:36 +0100 Message-Id: <20180724160752.20287-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724160752.20287-1-luca.boccassi@gmail.com> References: <20180724160752.20287-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' has been queued to LTS release 16.11.8 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: , X-List-Received-Date: Tue, 24 Jul 2018 16:08:56 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 751700cb71459d5b2a70a2b3d1cdd0dce429f287 Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Thu, 21 Jun 2018 19:14:50 +0100 Subject: [PATCH] net/thunderx: fix build with gcc optimization on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit d90141961b9acead2a3cfacc7547ac1a256979eb ] build error gcc version 6.3.1 20161221 (Red Hat 6.3.1-1), with EXTRA_CFLAGS="-O3": .../drivers/net/thunderx/nicvf_ethdev.c:907:9: error: ‘txq’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (txq->pool_free == nicvf_single_pool_free_xmited_buffers) ~~~^~~~~~~~~~~ .../drivers/net/thunderx/nicvf_ethdev.c:886:20: note: ‘txq’ was declared here struct nicvf_txq *txq; ^~~ Same error on function 'nicvf_eth_dev_init' and 'nicvf_dev_start', it seems 'nicvf_set_tx_function' inlined when optimization enabled. Initialize the txq and add NULL check before using it to fix. Fixes: 7413feee662d ("net/thunderx: add device start/stop and close") Reported-by: Richard Walsh Signed-off-by: Ferruh Yigit Acked-by: Jerin Jacob --- drivers/net/thunderx/nicvf_ethdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index d0f0d52dd..82106a78b 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -879,7 +879,7 @@ nicvf_dev_tx_queue_release(void *sq) static void nicvf_set_tx_function(struct rte_eth_dev *dev) { - struct nicvf_txq *txq; + struct nicvf_txq *txq = NULL; size_t i; bool multiseg = false; @@ -900,6 +900,9 @@ nicvf_set_tx_function(struct rte_eth_dev *dev) dev->tx_pkt_burst = nicvf_xmit_pkts; } + if (!txq) + return; + if (txq->pool_free == nicvf_single_pool_free_xmited_buffers) PMD_DRV_LOG(DEBUG, "Using single-mempool tx free method"); else -- 2.18.0