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

Function sfc_rss_attach

dpdk/drivers/net/sfc/sfc.c:819–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817};
818
819static int
820sfc_rss_attach(struct sfc_adapter *sa)
821{
822 struct sfc_rss *rss = &sfc_sa2shared(sa)->rss;
823 int rc;
824
825 rc = efx_intr_init(sa->nic, sa->intr.type, NULL);
826 if (rc != 0)
827 goto fail_intr_init;
828
829 rc = efx_ev_init(sa->nic);
830 if (rc != 0)
831 goto fail_ev_init;
832
833 rc = efx_rx_init(sa->nic);
834 if (rc != 0)
835 goto fail_rx_init;
836
837 rc = efx_rx_scale_default_support_get(sa->nic, &rss->context_type);
838 if (rc != 0)
839 goto fail_scale_support_get;
840
841 rc = efx_rx_hash_default_support_get(sa->nic, &rss->hash_support);
842 if (rc != 0)
843 goto fail_hash_support_get;
844
845 rc = sfc_rx_hash_init(sa);
846 if (rc != 0)
847 goto fail_rx_hash_init;
848
849 efx_rx_fini(sa->nic);
850 efx_ev_fini(sa->nic);
851 efx_intr_fini(sa->nic);
852
853 rte_memcpy(rss->key, default_rss_key, sizeof(rss->key));
854 memset(&rss->dummy_ctx, 0, sizeof(rss->dummy_ctx));
855 rss->dummy_ctx.conf.qid_span = 1;
856 rss->dummy_ctx.dummy = true;
857
858 return 0;
859
860fail_rx_hash_init:
861fail_hash_support_get:
862fail_scale_support_get:
863 efx_rx_fini(sa->nic);
864
865fail_rx_init:
866 efx_ev_fini(sa->nic);
867
868fail_ev_init:
869 efx_intr_fini(sa->nic);
870
871fail_intr_init:
872 return rc;
873}
874
875static void
876sfc_rss_detach(struct sfc_adapter *sa)

Callers 1

sfc_attachFunction · 0.85

Calls 12

sfc_sa2sharedFunction · 0.85
efx_intr_initFunction · 0.85
efx_ev_initFunction · 0.85
efx_rx_initFunction · 0.85
sfc_rx_hash_initFunction · 0.85
efx_rx_finiFunction · 0.85
efx_ev_finiFunction · 0.85
efx_intr_finiFunction · 0.85
memsetFunction · 0.85
rte_memcpyFunction · 0.50

Tested by

no test coverage detected