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 901E22C4F; Fri, 24 Aug 2018 13:16:51 +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 w7OBG3nr048721; Fri, 24 Aug 2018 12:16:03 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id w7OBG3uu048720; Fri, 24 Aug 2018 12:16:03 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: stable@dpdk.org, ferruh.yigit@intel.com Date: Fri, 24 Aug 2018 12:15:58 +0100 Message-Id: <1535109359-48584-3-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535109359-48584-1-git-send-email-alejandro.lucero@netronome.com> References: <1535109359-48584-1-git-send-email-alejandro.lucero@netronome.com> Subject: [dpdk-dev] [PATCH v2 2/3] net/nfp: fix live MAC changes not supported 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: , X-List-Received-Date: Fri, 24 Aug 2018 11:16:51 -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