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 517845F2B; Mon, 9 Jul 2018 19:15:08 +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 w69HExb0001939; Mon, 9 Jul 2018 18:14:59 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id w69HExjo001938; Mon, 9 Jul 2018 18:14:59 +0100 From: Alejandro Lucero To: dev@dpdk.org Cc: stable@dpdk.org Date: Mon, 9 Jul 2018 18:14:56 +0100 Message-Id: <1531156496-1702-3-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1531156496-1702-1-git-send-email-alejandro.lucero@netronome.com> References: <1531156496-1702-1-git-send-email-alejandro.lucero@netronome.com> Subject: [dpdk-dev] [PATCH 2/2] 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: Mon, 09 Jul 2018 17:15:08 -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. Fixes: af75078fece3 ("first public release") 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 3658696..fbe74fc 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2883,6 +2883,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