| 202 | } |
| 203 | |
| 204 | static int |
| 205 | sfc_dev_configure(struct rte_eth_dev *dev) |
| 206 | { |
| 207 | struct rte_eth_dev_data *dev_data = dev->data; |
| 208 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 209 | int rc; |
| 210 | |
| 211 | sfc_log_init(sa, "entry n_rxq=%u n_txq=%u", |
| 212 | dev_data->nb_rx_queues, dev_data->nb_tx_queues); |
| 213 | |
| 214 | sfc_adapter_lock(sa); |
| 215 | switch (sa->state) { |
| 216 | case SFC_ETHDEV_CONFIGURED: |
| 217 | /* FALLTHROUGH */ |
| 218 | case SFC_ETHDEV_INITIALIZED: |
| 219 | rc = sfc_configure(sa); |
| 220 | break; |
| 221 | default: |
| 222 | sfc_err(sa, "unexpected adapter state %u to configure", |
| 223 | sa->state); |
| 224 | rc = EINVAL; |
| 225 | break; |
| 226 | } |
| 227 | sfc_adapter_unlock(sa); |
| 228 | |
| 229 | sfc_log_init(sa, "done %d", rc); |
| 230 | SFC_ASSERT(rc >= 0); |
| 231 | return -rc; |
| 232 | } |
| 233 | |
| 234 | static int |
| 235 | sfc_dev_start(struct rte_eth_dev *dev) |
nothing calls this directly
no test coverage detected