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

Function sfc_configure

dpdk/drivers/net/sfc/sfc.c:697–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697int
698sfc_configure(struct sfc_adapter *sa)
699{
700 int rc;
701
702 sfc_log_init(sa, "entry");
703
704 SFC_ASSERT(sfc_adapter_is_locked(sa));
705
706 SFC_ASSERT(sa->state == SFC_ETHDEV_INITIALIZED ||
707 sa->state == SFC_ETHDEV_CONFIGURED);
708 sa->state = SFC_ETHDEV_CONFIGURING;
709
710 rc = sfc_check_conf(sa);
711 if (rc != 0)
712 goto fail_check_conf;
713
714 rc = sfc_intr_configure(sa);
715 if (rc != 0)
716 goto fail_intr_configure;
717
718 rc = sfc_port_configure(sa);
719 if (rc != 0)
720 goto fail_port_configure;
721
722 rc = sfc_rx_configure(sa);
723 if (rc != 0)
724 goto fail_rx_configure;
725
726 rc = sfc_tx_configure(sa);
727 if (rc != 0)
728 goto fail_tx_configure;
729
730 rc = sfc_sw_xstats_configure(sa);
731 if (rc != 0)
732 goto fail_sw_xstats_configure;
733
734 sa->state = SFC_ETHDEV_CONFIGURED;
735 sfc_log_init(sa, "done");
736 return 0;
737
738fail_sw_xstats_configure:
739 sfc_tx_close(sa);
740
741fail_tx_configure:
742 sfc_rx_close(sa);
743
744fail_rx_configure:
745 sfc_port_close(sa);
746
747fail_port_configure:
748 sfc_intr_close(sa);
749
750fail_intr_configure:
751fail_check_conf:
752 sa->state = SFC_ETHDEV_INITIALIZED;
753 sfc_log_init(sa, "failed %d", rc);
754 return rc;

Callers 1

sfc_dev_configureFunction · 0.85

Calls 10

sfc_check_confFunction · 0.85
sfc_intr_configureFunction · 0.85
sfc_port_configureFunction · 0.85
sfc_rx_configureFunction · 0.85
sfc_tx_configureFunction · 0.85
sfc_sw_xstats_configureFunction · 0.85
sfc_tx_closeFunction · 0.85
sfc_rx_closeFunction · 0.85
sfc_port_closeFunction · 0.85
sfc_intr_closeFunction · 0.85

Tested by

no test coverage detected