From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id A7D724F9B; Fri, 24 Aug 2018 16:26:27 +0200 (CEST) Received: from netronome.com (localhost [127.0.0.1]) by netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id w7OEPduD000921; Fri, 24 Aug 2018 15:25:39 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id w7OEPd62000920; Fri, 24 Aug 2018 15:25:39 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: stable@dpdk.org, ferruh.yigit@intel.com Date: Fri, 24 Aug 2018 15:25:36 +0100 Message-Id: <1535120736-785-3-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535120736-785-1-git-send-email-alejandro.lucero@netronome.com> References: <1535120736-785-1-git-send-email-alejandro.lucero@netronome.com> Subject: [dpdk-stable] [PATCH v3 2/2] net/nfp: fix live MAC changes not supported 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: Fri, 24 Aug 2018 14:26:27 -0000 Some NFP firmwares support live changes to the MAC address, but this is not always true and the firmware advertises it accordingly. This patch checks if firmware does not support live changes and sets RTE_ETH_DEV_NOLIVE_MAC_ADDR in that case. Cc: stable@dpdk.org Signed-off-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 6e5e305..ee743e9 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2886,6 +2886,9 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq) ether_addr_copy((struct ether_addr *)hw->mac_addr, ð_dev->data->mac_addrs[0]); + if (!(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR)) + eth_dev->data->dev_flags |= RTE_ETH_DEV_NOLIVE_MAC_ADDR; + PMD_INIT_LOG(INFO, "port %d VendorID=0x%x DeviceID=0x%x " "mac=%02x:%02x:%02x:%02x:%02x:%02x", eth_dev->data->port_id, pci_dev->id.vendor_id, -- 1.9.1