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

Function sfc_tbls_attach

dpdk/drivers/net/sfc/sfc_tbls.c:15–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#define SFC_TBLS_U32_BITS (sizeof(uint32_t) * CHAR_BIT)
14
15int
16sfc_tbls_attach(struct sfc_adapter *sa)
17{
18 struct sfc_tbls *tables = &sa->hw_tables;
19 const struct sfc_mae *mae = &sa->mae;
20 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
21 int rc;
22
23 sfc_log_init(sa, "entry");
24
25 if (mae->status != SFC_MAE_STATUS_ADMIN ||
26 !encp->enc_table_api_supported) {
27 tables->status = SFC_TBLS_STATUS_UNSUPPORTED;
28 return 0;
29 }
30
31 tables->status = SFC_TBLS_STATUS_SUPPORTED;
32
33 rc = sfc_tbl_meta_init(sa);
34 if (rc != 0)
35 return rc;
36
37 sfc_log_init(sa, "done");
38
39 return 0;
40}
41
42void
43sfc_tbls_detach(struct sfc_adapter *sa)

Callers 2

sfc_tbls_startFunction · 0.85
sfc_attachFunction · 0.85

Calls 2

efx_nic_cfg_getFunction · 0.85
sfc_tbl_meta_initFunction · 0.85

Tested by

no test coverage detected