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

Function ionic_lifs_size

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

Source from the content-addressed store, hash-verified

2016}
2017
2018int
2019ionic_lifs_size(struct ionic_adapter *adapter)
2020{
2021 struct ionic_identity *ident = &adapter->ident;
2022 union ionic_lif_config *cfg = &ident->lif.eth.config;
2023 uint32_t nintrs, dev_nintrs = rte_le_to_cpu_32(ident->dev.nintrs);
2024
2025 adapter->max_ntxqs_per_lif =
2026 rte_le_to_cpu_32(cfg->queue_count[IONIC_QTYPE_TXQ]);
2027 adapter->max_nrxqs_per_lif =
2028 rte_le_to_cpu_32(cfg->queue_count[IONIC_QTYPE_RXQ]);
2029
2030 nintrs = 1 /* notifyq */;
2031
2032 if (nintrs > dev_nintrs) {
2033 IONIC_PRINT(ERR,
2034 "At most %d intr supported, minimum req'd is %u",
2035 dev_nintrs, nintrs);
2036 return -ENOSPC;
2037 }
2038
2039 adapter->nintrs = nintrs;
2040
2041 return 0;
2042}

Callers 1

eth_ionic_dev_probeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected