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

Function sfc_ev_attach

dpdk/drivers/net/sfc/sfc_ev.c:972–1009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

970}
971
972int
973sfc_ev_attach(struct sfc_adapter *sa)
974{
975 int rc;
976
977 sfc_log_init(sa, "entry");
978
979 sa->evq_flags = EFX_EVQ_FLAGS_TYPE_THROUGHPUT;
980 rc = sfc_kvargs_process(sa, SFC_KVARG_PERF_PROFILE,
981 sfc_kvarg_perf_profile_handler,
982 &sa->evq_flags);
983 if (rc != 0) {
984 sfc_err(sa, "invalid %s parameter value",
985 SFC_KVARG_PERF_PROFILE);
986 goto fail_kvarg_perf_profile;
987 }
988
989 sa->mgmt_evq_index = sfc_mgmt_evq_sw_index(sfc_sa2shared(sa));
990 rte_spinlock_init(&sa->mgmt_evq_lock);
991
992 rc = sfc_ev_qinit(sa, SFC_EVQ_TYPE_MGMT, 0, sa->evq_min_entries,
993 sa->socket_id, &sa->mgmt_evq);
994 if (rc != 0)
995 goto fail_mgmt_evq_init;
996
997 /*
998 * Rx/Tx event queues are created/destroyed when corresponding
999 * Rx/Tx queue is created/destroyed.
1000 */
1001
1002 return 0;
1003
1004fail_mgmt_evq_init:
1005
1006fail_kvarg_perf_profile:
1007 sfc_log_init(sa, "failed %d", rc);
1008 return rc;
1009}
1010
1011void
1012sfc_ev_detach(struct sfc_adapter *sa)

Callers 1

sfc_attachFunction · 0.85

Calls 5

sfc_kvargs_processFunction · 0.85
sfc_mgmt_evq_sw_indexFunction · 0.85
sfc_sa2sharedFunction · 0.85
rte_spinlock_initFunction · 0.85
sfc_ev_qinitFunction · 0.85

Tested by

no test coverage detected