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

Function sfc_nic_dma_attach

dpdk/drivers/net/sfc/sfc_nic_dma.c:224–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224int
225sfc_nic_dma_attach(struct sfc_adapter *sa)
226{
227 const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
228 int rc;
229
230 sfc_log_init(sa, "dma_mapping_type=%u", encp->enc_dma_mapping);
231
232 switch (encp->enc_dma_mapping) {
233 case EFX_NIC_DMA_MAPPING_FLAT:
234 /* No mapping required */
235 rc = 0;
236 break;
237 case EFX_NIC_DMA_MAPPING_REGIONED:
238 rc = sfc_nic_dma_attach_regioned(sa);
239 break;
240 default:
241 rc = ENOTSUP;
242 break;
243 }
244
245 sfc_log_init(sa, "done: %s", rte_strerror(rc));
246 return rc;
247}
248
249void
250sfc_nic_dma_detach(struct sfc_adapter *sa)

Callers 1

sfc_eth_dev_initFunction · 0.85

Calls 3

efx_nic_cfg_getFunction · 0.85
rte_strerrorFunction · 0.85

Tested by

no test coverage detected