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

Function bnxt_setup_int

dpdk/drivers/net/bnxt/bnxt_irq.c:146–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146int bnxt_setup_int(struct bnxt *bp)
147{
148 uint16_t total_vecs;
149 const int len = sizeof(bp->irq_tbl[0].name);
150 int i;
151
152 /* DPDK host only supports 1 MSI-X vector */
153 total_vecs = 1;
154 bp->irq_tbl = rte_calloc("bnxt_irq_tbl", total_vecs,
155 sizeof(struct bnxt_irq), 0);
156 if (bp->irq_tbl) {
157 for (i = 0; i < total_vecs; i++) {
158 bp->irq_tbl[i].vector_idx = i;
159 snprintf(bp->irq_tbl[i].name, len,
160 "%s-%d", bp->eth_dev->device->name, i);
161 bp->irq_tbl[i].handler = bnxt_int_handler;
162 }
163 } else {
164 PMD_DRV_LOG(ERR, "bnxt_irq_tbl setup failed\n");
165 return -ENOMEM;
166 }
167
168 return 0;
169}
170
171int bnxt_request_int(struct bnxt *bp)
172{

Callers 1

bnxt_init_resourcesFunction · 0.85

Calls 2

rte_callocFunction · 0.85
snprintfFunction · 0.85

Tested by

no test coverage detected