Reset dynamic ixgbe_rx_queue fields back to defaults */
| 2942 | |
| 2943 | /* Reset dynamic ixgbe_rx_queue fields back to defaults */ |
| 2944 | static void __rte_cold |
| 2945 | ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) |
| 2946 | { |
| 2947 | static const union ixgbe_adv_rx_desc zeroed_desc = {{0}}; |
| 2948 | unsigned i; |
| 2949 | uint16_t len = rxq->nb_rx_desc; |
| 2950 | |
| 2951 | /* |
| 2952 | * By default, the Rx queue setup function allocates enough memory for |
| 2953 | * IXGBE_MAX_RING_DESC. The Rx Burst bulk allocation function requires |
| 2954 | * extra memory at the end of the descriptor ring to be zero'd out. |
| 2955 | */ |
| 2956 | if (adapter->rx_bulk_alloc_allowed) |
| 2957 | /* zero out extra memory */ |
| 2958 | len += RTE_PMD_IXGBE_RX_MAX_BURST; |
| 2959 | |
| 2960 | /* |
| 2961 | * Zero out HW ring memory. Zero out extra memory at the end of |
| 2962 | * the H/W ring so look-ahead logic in Rx Burst bulk alloc function |
| 2963 | * reads extra memory as zeros. |
| 2964 | */ |
| 2965 | for (i = 0; i < len; i++) { |
| 2966 | rxq->rx_ring[i] = zeroed_desc; |
| 2967 | } |
| 2968 | |
| 2969 | /* |
| 2970 | * initialize extra software ring entries. Space for these extra |
| 2971 | * entries is always allocated |
| 2972 | */ |
| 2973 | memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf)); |
| 2974 | for (i = rxq->nb_rx_desc; i < len; ++i) { |
| 2975 | rxq->sw_ring[i].mbuf = &rxq->fake_mbuf; |
| 2976 | } |
| 2977 | |
| 2978 | rxq->rx_nb_avail = 0; |
| 2979 | rxq->rx_next_avail = 0; |
| 2980 | rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1); |
| 2981 | rxq->rx_tail = 0; |
| 2982 | rxq->nb_rx_hold = 0; |
| 2983 | |
| 2984 | rte_pktmbuf_free(rxq->pkt_first_seg); |
| 2985 | |
| 2986 | rxq->pkt_first_seg = NULL; |
| 2987 | rxq->pkt_last_seg = NULL; |
| 2988 | |
| 2989 | #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64) |
| 2990 | rxq->rxrearm_start = 0; |
| 2991 | rxq->rxrearm_nb = 0; |
| 2992 | #endif |
| 2993 | } |
| 2994 | |
| 2995 | static int |
| 2996 | ixgbe_is_vf(struct rte_eth_dev *dev) |
no test coverage detected