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

Function sfc_try_start

dpdk/drivers/net/sfc/sfc.c:436–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436static int
437sfc_try_start(struct sfc_adapter *sa)
438{
439 const efx_nic_cfg_t *encp;
440 int rc;
441
442 sfc_log_init(sa, "entry");
443
444 SFC_ASSERT(sfc_adapter_is_locked(sa));
445 SFC_ASSERT(sa->state == SFC_ETHDEV_STARTING);
446
447 sfc_log_init(sa, "set FW subvariant");
448 rc = sfc_set_fw_subvariant(sa);
449 if (rc != 0)
450 goto fail_set_fw_subvariant;
451
452 sfc_log_init(sa, "set resource limits");
453 rc = sfc_set_drv_limits(sa);
454 if (rc != 0)
455 goto fail_set_drv_limits;
456
457 sfc_log_init(sa, "init nic");
458 rc = efx_nic_init(sa->nic);
459 if (rc != 0)
460 goto fail_nic_init;
461
462 sfc_log_init(sa, "reconfigure NIC DMA");
463 rc = efx_nic_dma_reconfigure(sa->nic);
464 if (rc != 0) {
465 sfc_err(sa, "cannot reconfigure NIC DMA: %s", rte_strerror(rc));
466 goto fail_nic_dma_reconfigure;
467 }
468
469 encp = efx_nic_cfg_get(sa->nic);
470
471 /*
472 * Refresh (since it may change on NIC reset/restart) a copy of
473 * supported tunnel encapsulations in shared memory to be used
474 * on supported Rx packet type classes get.
475 */
476 sa->priv.shared->tunnel_encaps =
477 encp->enc_tunnel_encapsulations_supported;
478
479 if (encp->enc_tunnel_encapsulations_supported != 0) {
480 sfc_log_init(sa, "apply tunnel config");
481 rc = efx_tunnel_reconfigure(sa->nic);
482 if (rc != 0)
483 goto fail_tunnel_reconfigure;
484 }
485
486 rc = sfc_intr_start(sa);
487 if (rc != 0)
488 goto fail_intr_start;
489
490 rc = sfc_ev_start(sa);
491 if (rc != 0)
492 goto fail_ev_start;
493

Callers 1

sfc_startFunction · 0.85

Calls 15

sfc_set_fw_subvariantFunction · 0.85
sfc_set_drv_limitsFunction · 0.85
efx_nic_initFunction · 0.85
efx_nic_dma_reconfigureFunction · 0.85
rte_strerrorFunction · 0.85
efx_nic_cfg_getFunction · 0.85
efx_tunnel_reconfigureFunction · 0.85
sfc_intr_startFunction · 0.85
sfc_ev_startFunction · 0.85
sfc_tbls_startFunction · 0.85
sfc_port_startFunction · 0.85
sfc_rx_startFunction · 0.85

Tested by

no test coverage detected