diff options
author | Edward Cree <ecree.xilinx@gmail.com> | 2022-07-28 21:57:46 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-07-30 07:22:06 +0300 |
commit | 6f6838aabff5ea99af1c78ab02838b8d471f218d (patch) | |
tree | 01583ad3eddf2d1a4bb48431d1da9f4c85919ed8 /drivers/net/ethernet/sfc/mae.c | |
parent | 9fe00c800ecd667acb7748cab7fcd3068c58498a (diff) | |
download | linux-6f6838aabff5ea99af1c78ab02838b8d471f218d.tar.xz |
sfc: determine wire m-port at EF100 PF probe time
Traffic delivered to the (MAE admin) PF could be from either the wire
or a VF. The INGRESS_MPORT field of the RX prefix distinguishes these;
base_mport is the value this field will have for traffic from the wire
(which should be delivered to the PF's netdevice, not a representor).
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/sfc/mae.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mae.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mae.c b/drivers/net/ethernet/sfc/mae.c index 011ebd46ada5..0cbcadde6677 100644 --- a/drivers/net/ethernet/sfc/mae.c +++ b/drivers/net/ethernet/sfc/mae.c @@ -13,6 +13,16 @@ #include "mcdi.h" #include "mcdi_pcol.h" +void efx_mae_mport_wire(struct efx_nic *efx, u32 *out) +{ + efx_dword_t mport; + + EFX_POPULATE_DWORD_2(mport, + MAE_MPORT_SELECTOR_TYPE, MAE_MPORT_SELECTOR_TYPE_PPORT, + MAE_MPORT_SELECTOR_PPORT_ID, efx->port_num); + *out = EFX_DWORD_VAL(mport); +} + void efx_mae_mport_vf(struct efx_nic *efx __always_unused, u32 vf_id, u32 *out) { efx_dword_t mport; |