| 2016 | } |
| 2017 | |
| 2018 | int |
| 2019 | ionic_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 | } |
no outgoing calls
no test coverage detected