From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) by dpdk.org (Postfix) with ESMTP id B11417CB9 for ; Mon, 21 Aug 2017 11:33:13 +0200 (CEST) Received: by mail-pg0-f46.google.com with SMTP id y129so96813949pgy.4 for ; Mon, 21 Aug 2017 02:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=65leD+F2AG9verNpyeZCkYlggL0d0XuK4RItOKOZJUk=; b=1qf6USVnxnNKURxhkBnwjvFsyL1LQ7komOHaoEwPeFR/aEwQAsZeitiONJRIc0LeH9 z1BJ/q3sCnFkuxrsE9aHzJfIStFQvQY8o32C2/p5lMYg/mttYwniBZky48HRodCCkGH5 wzMgFYQ/eLWvvcb2OVzf0kK/yysK7x8KZs1XO2TSUQZCAYVbF4IkIIcKQkJr8awRCL1Q CrwabfRaO2fpCMW/88OeeiyyVOj4GBphMsOq2eEJXzww5GraDFp+IRPNOhdl/9PZr909 tdBCqNrymhQSdebVbV6xN9YCHtQdByRYooE9/PGDujgTSVLUVC3roc6f0PXwxw3vbQYk 2jKA== 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; bh=65leD+F2AG9verNpyeZCkYlggL0d0XuK4RItOKOZJUk=; b=T+gqgpmFuSqo18EOndqH6DtW4ETT09UPb1HgcIUvHmRMzEEf4sXXD8+Vzqu8uPTzQm /WzBlIAQnlD//1PLr7B9yB5iZMTe73MtLmixeJf71fcsTeAeSJKo3yl77ar8wYknbOvl QPhwhZypSKOjhoWKxPbuL8EViI47w2y0yLzgByld0seL3EiL/9ql10gNmJQtDXJ1hGe5 eQnlDy3zWnWGuAJKZoObAbiJc4f61uotr/5NapTXkQPGAmkx8MCCK5bMuEMeDx6Ltg6d kDdYKTjSevjnOtfp4+/xOwSv7RKQKYA44WckfaVCe3TGdyEYzgv+C8SMcUS2Nr5wgmJU iSZA== X-Gm-Message-State: AHYfb5gsHj5d0YFKEnEaV6Xo5OxLMTDrK86TYEW5NJD+ph7FKtlPAIpP 5hVgwbcxwRCWvpW5 X-Received: by 10.84.210.175 with SMTP id a44mr1413581pli.274.1503307992941; Mon, 21 Aug 2017 02:33:12 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 69sm23355087pfh.186.2017.08.21.02.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Aug 2017 02:33:11 -0700 (PDT) From: Yuanhan Liu To: Thomas Monjalon Cc: Matan Azrad , dpdk stable , Yuanhan Liu Date: Mon, 21 Aug 2017 17:30:16 +0800 Message-Id: <1503307878-16728-2-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> References: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'ethdev: fix build with gcc 5.4.0' has been queued to stable release 17.05.2 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: Mon, 21 Aug 2017 09:33:14 -0000 Hi, FYI, your patch has been queued to stable release 17.05.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From bcd11232917ebd5994a2dc1225b57c98bc48b78d Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Thu, 6 Jul 2017 23:45:32 +0200 Subject: [PATCH] ethdev: fix build with gcc 5.4.0 [ upstream commit 722de4c3e7b11d20f7b0c6e68e1b0ecb91fe6c43 ] Seen on Ubuntu 16.04 with GCC 5.4.0: lib/librte_ether/rte_ethdev.c: In function 'get_mac_addr_index': lib/librte_ether/rte_ethdev.c:2369:26: error: 'dev_info.max_mac_addrs' may be used uninitialized in this function Indeed, rte_eth_dev_info_get() do not write into dev_info if the port_id is not valid. So we need to check the port_id and return in case of error. This extra check should not be needed because the port_id is always checked before calling get_mac_addr_index(). However it does not hurt. Reported-by: Matan Azrad Signed-off-by: Thomas Monjalon Tested-by: Matan Azrad --- lib/librte_ether/rte_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 83898a8..2d442a9 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -2351,6 +2351,7 @@ get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr) struct rte_eth_dev *dev = &rte_eth_devices[port_id]; unsigned i; + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); rte_eth_dev_info_get(port_id, &dev_info); for (i = 0; i < dev_info.max_mac_addrs; i++) -- 2.7.4