From: Alejandro Lucero Date: Wed, 13 Sep 2017 20:55:45 +0000 (+0100) Subject: net/nfp: write PF MAC to config BAR X-Git-Tag: spdx-start~1951 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=edbe47001e02ef57a56550f75038acb5ed087f6f;p=dpdk.git net/nfp: write PF MAC to config BAR 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 --- diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 000d3394c2..fe41e61e47 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2810,10 +2810,12 @@ nfp_net_init(struct rte_eth_dev *eth_dev) 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 */