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

Function enicpmd_dev_setup_intr

dpdk/drivers/net/enic/enic_ethdev.c:103–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103static int enicpmd_dev_setup_intr(struct enic *enic)
104{
105 int ret;
106 unsigned int index;
107
108 ENICPMD_FUNC_TRACE();
109
110 /* Are we done with the init of all the queues? */
111 for (index = 0; index < enic->cq_count; index++) {
112 if (!enic->cq[index].ctrl)
113 break;
114 }
115 if (enic->cq_count != index)
116 return 0;
117 for (index = 0; index < enic->wq_count; index++) {
118 if (!enic->wq[index].ctrl)
119 break;
120 }
121 if (enic->wq_count != index)
122 return 0;
123 /* check start of packet (SOP) RQs only in case scatter is disabled. */
124 for (index = 0; index < enic->rq_count; index++) {
125 if (!enic->rq[enic_rte_rq_idx_to_sop_idx(index)].ctrl)
126 break;
127 }
128 if (enic->rq_count != index)
129 return 0;
130
131 ret = enic_alloc_intr_resources(enic);
132 if (ret) {
133 dev_err(enic, "alloc intr failed\n");
134 return ret;
135 }
136 enic_init_vnic_resources(enic);
137
138 ret = enic_setup_finish(enic);
139 if (ret)
140 dev_err(enic, "setup could not be finished\n");
141
142 return ret;
143}
144
145static int enicpmd_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
146 uint16_t queue_idx,

Callers 2

Calls 4

enic_init_vnic_resourcesFunction · 0.85
enic_setup_finishFunction · 0.85

Tested by

no test coverage detected