MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sfc_mae_assign_entity_mport

Function sfc_mae_assign_entity_mport

dpdk/drivers/net/sfc/sfc_mae.c:37–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static int
38sfc_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
66static int
67sfc_mae_counter_registry_init(struct sfc_mae_counter_registry *registry,

Callers 1

sfc_mae_attachFunction · 0.85

Calls 3

efx_nic_cfg_getFunction · 0.85
efx_mae_mport_invalidFunction · 0.85

Tested by

no test coverage detected