Lines Matching refs:eqo
2136 static int be_get_new_eqd(struct be_eq_obj *eqo) in be_get_new_eqd() argument
2138 struct be_adapter *adapter = eqo->adapter; in be_get_new_eqd()
2148 aic = &adapter->aic_obj[eqo->idx]; in be_get_new_eqd()
2156 for_all_rx_queues_on_eq(adapter, eqo, rxo, i) { in be_get_new_eqd()
2163 for_all_tx_queues_on_eq(adapter, eqo, txo, i) { in be_get_new_eqd()
2198 static u32 be_get_eq_delay_mult_enc(struct be_eq_obj *eqo) in be_get_eq_delay_mult_enc() argument
2200 struct be_adapter *adapter = eqo->adapter; in be_get_eq_delay_mult_enc()
2201 struct be_aic_obj *aic = &adapter->aic_obj[eqo->idx]; in be_get_eq_delay_mult_enc()
2212 eqd = be_get_new_eqd(eqo); in be_get_eq_delay_mult_enc()
2232 struct be_eq_obj *eqo; in be_eqd_update() local
2235 for_all_evt_queues(adapter, eqo, i) { in be_eqd_update()
2236 aic = &adapter->aic_obj[eqo->idx]; in be_eqd_update()
2237 eqd = be_get_new_eqd(eqo); in be_eqd_update()
2240 set_eqd[num].eq_id = eqo->q.id; in be_eqd_update()
2785 static inline int events_get(struct be_eq_obj *eqo) in events_get() argument
2791 eqe = queue_tail_node(&eqo->q); in events_get()
2798 queue_tail_inc(&eqo->q); in events_get()
2805 static void be_eq_clean(struct be_eq_obj *eqo) in be_eq_clean() argument
2807 int num = events_get(eqo); in be_eq_clean()
2809 be_eq_notify(eqo->adapter, eqo->q.id, false, true, num, 0); in be_eq_clean()
2937 struct be_eq_obj *eqo; in be_evt_queues_destroy() local
2940 for_all_evt_queues(adapter, eqo, i) { in be_evt_queues_destroy()
2941 if (eqo->q.created) { in be_evt_queues_destroy()
2942 be_eq_clean(eqo); in be_evt_queues_destroy()
2943 be_cmd_q_destroy(adapter, &eqo->q, QTYPE_EQ); in be_evt_queues_destroy()
2944 netif_napi_del(&eqo->napi); in be_evt_queues_destroy()
2945 free_cpumask_var(eqo->affinity_mask); in be_evt_queues_destroy()
2947 be_queue_free(adapter, &eqo->q); in be_evt_queues_destroy()
2954 struct be_eq_obj *eqo; in be_evt_queues_create() local
2965 for_all_evt_queues(adapter, eqo, i) { in be_evt_queues_create()
2969 eqo->adapter = adapter; in be_evt_queues_create()
2970 eqo->idx = i; in be_evt_queues_create()
2973 eq = &eqo->q; in be_evt_queues_create()
2979 rc = be_cmd_eq_create(adapter, eqo); in be_evt_queues_create()
2983 if (!zalloc_cpumask_var(&eqo->affinity_mask, GFP_KERNEL)) in be_evt_queues_create()
2986 eqo->affinity_mask); in be_evt_queues_create()
2987 netif_napi_add(adapter->netdev, &eqo->napi, be_poll); in be_evt_queues_create()
3063 struct be_eq_obj *eqo; in be_tx_qs_create() local
3081 eqo = &adapter->eq_obj[i % adapter->num_evt_qs]; in be_tx_qs_create()
3082 status = be_cmd_cq_create(adapter, cq, &eqo->q, false, 3); in be_tx_qs_create()
3095 netif_set_xps_queue(adapter->netdev, eqo->affinity_mask, in be_tx_qs_create()
3096 eqo->idx); in be_tx_qs_create()
3162 struct be_eq_obj *eqo = dev; in be_intx() local
3163 struct be_adapter *adapter = eqo->adapter; in be_intx()
3174 if (napi_schedule_prep(&eqo->napi)) { in be_intx()
3175 num_evts = events_get(eqo); in be_intx()
3176 __napi_schedule(&eqo->napi); in be_intx()
3178 eqo->spurious_intr = 0; in be_intx()
3180 be_eq_notify(adapter, eqo->q.id, false, true, num_evts, 0); in be_intx()
3186 if (num_evts || eqo->spurious_intr++ == 0) in be_intx()
3194 struct be_eq_obj *eqo = dev; in be_msix() local
3196 be_eq_notify(eqo->adapter, eqo->q.id, false, true, 0, 0); in be_msix()
3197 napi_schedule(&eqo->napi); in be_msix()
3296 struct be_eq_obj *eqo = container_of(napi, struct be_eq_obj, napi); in be_poll() local
3297 struct be_adapter *adapter = eqo->adapter; in be_poll()
3303 num_evts = events_get(eqo); in be_poll()
3305 for_all_tx_queues_on_eq(adapter, eqo, txo, i) in be_poll()
3312 for_all_rx_queues_on_eq(adapter, eqo, rxo, i) { in be_poll()
3317 if (is_mcc_eqo(eqo)) in be_poll()
3327 mult_enc = be_get_eq_delay_mult_enc(eqo); in be_poll()
3329 be_eq_notify(adapter, eqo->q.id, true, false, num_evts, in be_poll()
3333 be_eq_notify(adapter, eqo->q.id, false, false, num_evts, 0); in be_poll()
3477 struct be_eq_obj *eqo) in be_msix_vec_get() argument
3479 return adapter->msix_entries[eqo->msix_idx].vector; in be_msix_vec_get()
3485 struct be_eq_obj *eqo; in be_msix_register() local
3488 for_all_evt_queues(adapter, eqo, i) { in be_msix_register()
3489 sprintf(eqo->desc, "%s-q%d", netdev->name, i); in be_msix_register()
3490 vec = be_msix_vec_get(adapter, eqo); in be_msix_register()
3491 status = request_irq(vec, be_msix, 0, eqo->desc, eqo); in be_msix_register()
3495 irq_update_affinity_hint(vec, eqo->affinity_mask); in be_msix_register()
3501 eqo = &adapter->eq_obj[i]; in be_msix_register()
3502 free_irq(be_msix_vec_get(adapter, eqo), eqo); in be_msix_register()
3541 struct be_eq_obj *eqo; in be_irq_unregister() local
3554 for_all_evt_queues(adapter, eqo, i) { in be_irq_unregister()
3555 vec = be_msix_vec_get(adapter, eqo); in be_irq_unregister()
3557 free_irq(vec, eqo); in be_irq_unregister()
3636 struct be_eq_obj *eqo; in be_close() local
3653 for_all_evt_queues(adapter, eqo, i) { in be_close()
3654 napi_disable(&eqo->napi); in be_close()
3669 for_all_evt_queues(adapter, eqo, i) { in be_close()
3671 synchronize_irq(be_msix_vec_get(adapter, eqo)); in be_close()
3674 be_eq_clean(eqo); in be_close()
3796 struct be_eq_obj *eqo; in be_open() local
3822 for_all_evt_queues(adapter, eqo, i) { in be_open()
3823 napi_enable(&eqo->napi); in be_open()
3824 be_eq_notify(adapter, eqo->q.id, true, true, 0, 0); in be_open()
4929 struct be_eq_obj *eqo; in be_netpoll() local
4932 for_all_evt_queues(adapter, eqo, i) { in be_netpoll()
4933 be_eq_notify(eqo->adapter, eqo->q.id, false, true, 0, 0); in be_netpoll()
4934 napi_schedule(&eqo->napi); in be_netpoll()