| 970 | } |
| 971 | |
| 972 | int |
| 973 | sfc_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 | |
| 1004 | fail_mgmt_evq_init: |
| 1005 | |
| 1006 | fail_kvarg_perf_profile: |
| 1007 | sfc_log_init(sa, "failed %d", rc); |
| 1008 | return rc; |
| 1009 | } |
| 1010 | |
| 1011 | void |
| 1012 | sfc_ev_detach(struct sfc_adapter *sa) |
no test coverage detected