| 35 | } |
| 36 | |
| 37 | static int |
| 38 | sfc_mae_assign_entity_mport(struct sfc_adapter *sa, |
| 39 | efx_mport_sel_t *mportp) |
| 40 | { |
| 41 | const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic); |
| 42 | int rc = 0; |
| 43 | |
| 44 | if (encp->enc_mae_admin) { |
| 45 | /* |
| 46 | * This ethdev sits on MAE admin PF. The represented |
| 47 | * entity is the network port assigned to that PF. |
| 48 | */ |
| 49 | rc = efx_mae_mport_by_phy_port(encp->enc_assigned_port, mportp); |
| 50 | } else { |
| 51 | /* |
| 52 | * This ethdev sits on unprivileged PF / VF. The entity |
| 53 | * represented by the ethdev can change dynamically |
| 54 | * as MAE admin changes default traffic rules. |
| 55 | * |
| 56 | * For the sake of simplicity, do not fill in the m-port |
| 57 | * and assume that flow rules should not be allowed to |
| 58 | * reference the entity represented by this ethdev. |
| 59 | */ |
| 60 | efx_mae_mport_invalid(mportp); |
| 61 | } |
| 62 | |
| 63 | return rc; |
| 64 | } |
| 65 | |
| 66 | static int |
| 67 | sfc_mae_counter_registry_init(struct sfc_mae_counter_registry *registry, |
no test coverage detected