From patchwork Wed Sep 13 20:55:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Lucero X-Patchwork-Id: 28697 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6547F1B162; Wed, 13 Sep 2017 22:55:51 +0200 (CEST) Received: from netronome.com (host-79-78-33-110.static.as9105.net [79.78.33.110]) by dpdk.org (Postfix) with ESMTP id 2536E1B159 for ; Wed, 13 Sep 2017 22:55:50 +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 v8DKtkbj041312 for ; Wed, 13 Sep 2017 21:55:46 +0100 Received: (from alucero@localhost) by netronome.com (8.14.4/8.14.4/Submit) id v8DKtjc8041311 for dev@dpdk.org; Wed, 13 Sep 2017 21:55:45 +0100 From: Alejandro Lucero To: dev@dpdk.org Date: Wed, 13 Sep 2017 21:55:45 +0100 Message-Id: <1505336145-41273-1-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] net/nfp: write PF MAC to config BAR 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" VFs rely on config BAR for getting the MAC address, although a random one is created a valid address is not found. A PF port has a fixed MAC which is currently acquired using the NSPU interface. Some NFP firmwares require the MAC being writing back to the config BAR for doing proper MAC filtering. Signed-off-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 000d339..fe41e61 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2810,10 +2810,12 @@ uint32_t nfp_net_txq_full(struct nfp_net_txq *txq) return -ENOMEM; } - if (hw->is_pf) + if (hw->is_pf) { nfp_net_pf_read_mac(hwport0, port); - else + nfp_net_write_mac(hw, (uint8_t *)&hw->mac_addr); + } else { nfp_net_vf_read_mac(hw); + } if (!is_valid_assigned_ether_addr((struct ether_addr *)&hw->mac_addr)) { /* Using random mac addresses for VFs */