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

Function sfc_rx_start

dpdk/drivers/net/sfc/sfc_rx.c:1588–1628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1586}
1587
1588int
1589sfc_rx_start(struct sfc_adapter *sa)
1590{
1591 struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
1592 sfc_sw_index_t sw_index;
1593 int rc;
1594
1595 sfc_log_init(sa, "rxq_count=%u (internal %u)", sas->ethdev_rxq_count,
1596 sas->rxq_count);
1597
1598 rc = efx_rx_init(sa->nic);
1599 if (rc != 0)
1600 goto fail_rx_init;
1601
1602 rc = sfc_rx_rss_config(sa);
1603 if (rc != 0)
1604 goto fail_rss_config;
1605
1606 for (sw_index = 0; sw_index < sas->rxq_count; ++sw_index) {
1607 if (sas->rxq_info[sw_index].state == SFC_RXQ_INITIALIZED &&
1608 (!sas->rxq_info[sw_index].deferred_start ||
1609 sas->rxq_info[sw_index].deferred_started)) {
1610 rc = sfc_rx_qstart(sa, sw_index);
1611 if (rc != 0)
1612 goto fail_rx_qstart;
1613 }
1614 }
1615
1616 return 0;
1617
1618fail_rx_qstart:
1619 while (sw_index-- > 0)
1620 sfc_rx_qstop(sa, sw_index);
1621
1622fail_rss_config:
1623 efx_rx_fini(sa->nic);
1624
1625fail_rx_init:
1626 sfc_log_init(sa, "failed %d", rc);
1627 return rc;
1628}
1629
1630void
1631sfc_rx_stop(struct sfc_adapter *sa)

Callers 1

sfc_try_startFunction · 0.85

Calls 6

sfc_sa2sharedFunction · 0.85
efx_rx_initFunction · 0.85
sfc_rx_rss_configFunction · 0.85
sfc_rx_qstartFunction · 0.85
sfc_rx_qstopFunction · 0.85
efx_rx_finiFunction · 0.85

Tested by

no test coverage detected