diff options
| author | Alejandro Lucero <alejandro.lucero-palau@amd.com> | 2023-02-15 09:08:27 +0000 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-16 12:03:13 +0100 |
| commit | fa78b01718d2f1cc95ce052fad3aa49c46d024eb (patch) | |
| tree | cfecb0d2fb653b269a250ebb4f088fc708bc9064 /drivers/net/ethernet/sfc/ef100_rep.c | |
| parent | 7e056e2360d9267a20509aa2cdb8905485499e95 (diff) | |
sfc: add support for devlink port_function_hw_addr_get in ef100
Using the builtin client handle id infrastructure, add support for
obtaining the mac address linked to mports in ef100. This implies
to execute an MCDI command for getting the data from the firmware
for each devlink port.
Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef100_rep.c')
| -rw-r--r-- | drivers/net/ethernet/sfc/ef100_rep.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_rep.c b/drivers/net/ethernet/sfc/ef100_rep.c index 6b5bc5d6955d..0b3083ef0ead 100644 --- a/drivers/net/ethernet/sfc/ef100_rep.c +++ b/drivers/net/ethernet/sfc/ef100_rep.c @@ -361,6 +361,14 @@ bool ef100_mport_on_local_intf(struct efx_nic *efx, mport_desc->interface_idx == nic_data->local_mae_intf; } +bool ef100_mport_is_vf(struct mae_mport_desc *mport_desc) +{ + bool pcie_func; + + pcie_func = ef100_mport_is_pcie_vnic(mport_desc); + return pcie_func && (mport_desc->vf_idx != MAE_MPORT_DESC_VF_IDX_NULL); +} + void efx_ef100_init_reps(struct efx_nic *efx) { struct ef100_nic_data *nic_data = efx->nic_data; |
