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

Function sfc_set_drv_limits

dpdk/drivers/net/sfc/sfc.c:356–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356static int
357sfc_set_drv_limits(struct sfc_adapter *sa)
358{
359 struct sfc_adapter_shared *sas = sfc_sa2shared(sa);
360 const struct rte_eth_dev_data *data = sa->eth_dev->data;
361 uint32_t rxq_reserved = sfc_nb_reserved_rxq(sas);
362 uint32_t txq_reserved = sfc_nb_txq_reserved(sas);
363 efx_drv_limits_t lim;
364
365 memset(&lim, 0, sizeof(lim));
366
367 /*
368 * Limits are strict since take into account initial estimation.
369 * Resource allocation strategy is described in
370 * sfc_estimate_resource_limits().
371 */
372 lim.edl_min_evq_count = lim.edl_max_evq_count =
373 1 + data->nb_rx_queues + data->nb_tx_queues +
374 rxq_reserved + txq_reserved;
375 lim.edl_min_rxq_count = lim.edl_max_rxq_count =
376 data->nb_rx_queues + rxq_reserved;
377 lim.edl_min_txq_count = lim.edl_max_txq_count =
378 data->nb_tx_queues + txq_reserved;
379
380 return efx_nic_set_drv_limits(sa->nic, &lim);
381}
382
383static int
384sfc_set_fw_subvariant(struct sfc_adapter *sa)

Callers 1

sfc_try_startFunction · 0.85

Calls 5

sfc_sa2sharedFunction · 0.85
sfc_nb_reserved_rxqFunction · 0.85
sfc_nb_txq_reservedFunction · 0.85
memsetFunction · 0.85
efx_nic_set_drv_limitsFunction · 0.85

Tested by

no test coverage detected