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

Function ionic_notifyq_cb

dpdk/drivers/net/ionic/ionic_lif.c:1340–1387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1338}
1339
1340static bool
1341ionic_notifyq_cb(struct ionic_cq *cq, uint16_t cq_desc_index, void *cb_arg)
1342{
1343 union ionic_notifyq_comp *cq_desc_base = cq->base;
1344 union ionic_notifyq_comp *cq_desc = &cq_desc_base[cq_desc_index];
1345 struct ionic_lif *lif = cb_arg;
1346
1347 IONIC_PRINT(DEBUG, "Notifyq callback eid = %jd ecode = %d",
1348 cq_desc->event.eid, cq_desc->event.ecode);
1349
1350 /* Have we run out of new completions to process? */
1351 if (!(cq_desc->event.eid > lif->last_eid))
1352 return false;
1353
1354 lif->last_eid = cq_desc->event.eid;
1355
1356 switch (cq_desc->event.ecode) {
1357 case IONIC_EVENT_LINK_CHANGE:
1358 IONIC_PRINT(DEBUG,
1359 "Notifyq IONIC_EVENT_LINK_CHANGE %s "
1360 "eid=%jd link_status=%d link_speed=%d",
1361 lif->name,
1362 cq_desc->event.eid,
1363 cq_desc->link_change.link_status,
1364 cq_desc->link_change.link_speed);
1365
1366 lif->state |= IONIC_LIF_F_LINK_CHECK_NEEDED;
1367 break;
1368
1369 case IONIC_EVENT_RESET:
1370 IONIC_PRINT(NOTICE,
1371 "Notifyq IONIC_EVENT_RESET %s "
1372 "eid=%jd, reset_code=%d state=%d",
1373 lif->name,
1374 cq_desc->event.eid,
1375 cq_desc->reset.reset_code,
1376 cq_desc->reset.state);
1377 ionic_lif_handle_fw_down(lif);
1378 break;
1379
1380 default:
1381 IONIC_PRINT(WARNING, "Notifyq bad event ecode=%d eid=%jd",
1382 cq_desc->event.ecode, cq_desc->event.eid);
1383 break;
1384 }
1385
1386 return true;
1387}
1388
1389int
1390ionic_notifyq_handler(struct ionic_lif *lif, int budget)

Callers

nothing calls this directly

Calls 1

ionic_lif_handle_fw_downFunction · 0.85

Tested by

no test coverage detected