lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20230406065706.59664-15-gautam.dawar@amd.com> Date: Thu, 6 Apr 2023 12:26:59 +0530 From: Gautam Dawar <gautam.dawar@....com> To: <linux-net-drivers@....com>, <jasowang@...hat.com>, Edward Cree <ecree.xilinx@...il.com>, Martin Habets <habetsm.xilinx@...il.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Richard Cochran <richardcochran@...il.com>, <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org> CC: <eperezma@...hat.com>, <harpreet.anand@....com>, <tanuj.kamde@....com>, <koushik.dutta@....com>, Gautam Dawar <gautam.dawar@....com> Subject: [PATCH net-next v3 13/14] sfc: update vdpa device MAC address As the VF MAC address can now be updated using `devlink port function set` interface, fetch the vdpa device MAC address from the underlying VF during vdpa device creation. Signed-off-by: Gautam Dawar <gautam.dawar@....com> --- drivers/net/ethernet/sfc/ef100_vdpa.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/sfc/ef100_vdpa.c b/drivers/net/ethernet/sfc/ef100_vdpa.c index 15c00e898f64..a04bcae89b7b 100644 --- a/drivers/net/ethernet/sfc/ef100_vdpa.c +++ b/drivers/net/ethernet/sfc/ef100_vdpa.c @@ -277,6 +277,18 @@ static int get_net_config(struct ef100_vdpa_nic *vdpa_nic) vdpa_nic->net_config.max_virtqueue_pairs = cpu_to_efx_vdpa16(vdpa_nic, vdpa_nic->max_queue_pairs); + rc = ef100_get_mac_address(efx, vdpa_nic->mac_address, + efx->client_id, true); + if (rc) { + dev_err(&vdpa_nic->vdpa_dev.dev, + "%s: Get MAC for vf:%u failed:%d\n", __func__, + vdpa_nic->vf_index, rc); + return rc; + } + + if (is_valid_ether_addr(vdpa_nic->mac_address)) + vdpa_nic->mac_configured = true; + rc = efx_vdpa_get_mtu(efx, &mtu); if (rc) { dev_err(&vdpa_nic->vdpa_dev.dev, -- 2.30.1
Powered by blists - more mailing lists