| 817 | }; |
| 818 | |
| 819 | static int |
| 820 | sfc_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 | |
| 860 | fail_rx_hash_init: |
| 861 | fail_hash_support_get: |
| 862 | fail_scale_support_get: |
| 863 | efx_rx_fini(sa->nic); |
| 864 | |
| 865 | fail_rx_init: |
| 866 | efx_ev_fini(sa->nic); |
| 867 | |
| 868 | fail_ev_init: |
| 869 | efx_intr_fini(sa->nic); |
| 870 | |
| 871 | fail_intr_init: |
| 872 | return rc; |
| 873 | } |
| 874 | |
| 875 | static void |
| 876 | sfc_rss_detach(struct sfc_adapter *sa) |
no test coverage detected