| 892 | } |
| 893 | |
| 894 | void |
| 895 | sfc_rx_qstop(struct sfc_adapter *sa, sfc_sw_index_t sw_index) |
| 896 | { |
| 897 | struct sfc_adapter_shared *sas = sfc_sa2shared(sa); |
| 898 | sfc_ethdev_qid_t ethdev_qid; |
| 899 | struct sfc_rxq_info *rxq_info; |
| 900 | struct sfc_rxq *rxq; |
| 901 | |
| 902 | SFC_ASSERT(sw_index < sfc_sa2shared(sa)->rxq_count); |
| 903 | ethdev_qid = sfc_ethdev_rx_qid_by_rxq_sw_index(sas, sw_index); |
| 904 | |
| 905 | sfc_log_init(sa, "RxQ %d (internal %u)", ethdev_qid, sw_index); |
| 906 | |
| 907 | rxq_info = &sfc_sa2shared(sa)->rxq_info[sw_index]; |
| 908 | |
| 909 | if (rxq_info->state == SFC_RXQ_INITIALIZED) |
| 910 | return; |
| 911 | SFC_ASSERT(rxq_info->state & SFC_RXQ_STARTED); |
| 912 | |
| 913 | /* It seems to be used by DPDK for debug purposes only ('rte_ether') */ |
| 914 | if (ethdev_qid != SFC_ETHDEV_QID_INVALID) |
| 915 | sa->eth_dev->data->rx_queue_state[ethdev_qid] = |
| 916 | RTE_ETH_QUEUE_STATE_STOPPED; |
| 917 | |
| 918 | rxq = &sa->rxq_ctrl[sw_index]; |
| 919 | sa->priv.dp_rx->qstop(rxq_info->dp, &rxq->evq->read_ptr); |
| 920 | |
| 921 | if (ethdev_qid == 0) |
| 922 | efx_mac_filter_default_rxq_clear(sa->nic); |
| 923 | |
| 924 | sfc_rx_qflush(sa, sw_index); |
| 925 | |
| 926 | rxq_info->state = SFC_RXQ_INITIALIZED; |
| 927 | |
| 928 | efx_rx_qdestroy(rxq->common); |
| 929 | |
| 930 | sfc_ev_qstop(rxq->evq); |
| 931 | } |
| 932 | |
| 933 | static uint64_t |
| 934 | sfc_rx_get_offload_mask(struct sfc_adapter *sa) |
no test coverage detected