Lines Matching +full:tcs +full:- +full:wait

1 /* SPDX-License-Identifier: GPL-2.0 */
19 #include <linux/dma-mapping.h>
22 #include <linux/wait.h>
82 #define ICE_RES_MISC_VEC_ID (ICE_RES_VALID_BIT - 1)
92 #define ICE_MAX_MTU (ICE_AQ_SET_MAC_FRAME_SIZE_MAX - ICE_ETH_PKT_HDR_PAD)
98 #define ICE_TX_DESC(R, i) (&(((struct ice_tx_desc *)((R)->desc))[i]))
99 #define ICE_RX_DESC(R, i) (&(((union ice_32b_rx_flex_desc *)((R)->desc))[i]))
100 #define ICE_TX_CTX_DESC(R, i) (&(((struct ice_tx_ctx_desc *)((R)->desc))[i]))
101 #define ICE_TX_FDIRDESC(R, i) (&(((struct ice_fltr_desc *)((R)->desc))[i]))
105 for ((i) = 0; (i) < (pf)->num_alloc_vsi; (i)++)
109 for ((i) = 0; (i) < (vsi)->num_txq; (i)++)
112 for ((i) = 0; (i) < (vsi)->num_rxq; (i)++)
116 for ((i) = 0; (i) < (vsi)->alloc_txq; (i)++)
119 for ((i) = 0; (i) < (vsi)->alloc_rxq; (i)++)
122 for ((i) = 0; (i) < (vsi)->num_q_vectors; (i)++)
141 #define ice_pf_to_dev(pf) (&((pf)->pdev->dev))
144 u32 q_teid; /* Tx-scheduler element identifier */
159 u8 numtc; /* Total number of enabled TCs */
171 struct mutex *qs_mutex; /* will be assigned to &pf->avail_q_mutex */
264 u16 idx; /* software index in pf->vsi[] */
266 s16 vf_id; /* VF ID for SR-IOV VSIs */
281 #define ICE_ARFS_LST_MASK (ICE_MAX_ARFS_LIST - 1)
313 u16 *txq_map; /* index in pf->avail_txqs */
314 u16 *rxq_map; /* index in pf->avail_rxqs */
337 u16 v_idx; /* index in the vsi->q_vector array. */
388 /* First MSIX vector used by SR-IOV VFs. Calculated by subtracting the
389 * number of MSIX vectors needed for all SR-IOV VFs from the number of
394 u16 ctrl_vsi_idx; /* control VSI index in pf->vsi array */
398 /* Virtchnl/SR-IOV config info */
419 /* spinlock to protect the AdminQ wait list */
432 u16 next_vsi; /* Next free slot in pf->vsi[] - 0-based! */
464 * ice_irq_dynamic_ena - Enable default interrupt generation settings
473 u32 vector = (vsi && q_vector) ? q_vector->reg_idx : in ice_irq_dynamic_ena()
474 ((struct ice_pf *)hw->back)->oicr_idx; in ice_irq_dynamic_ena()
484 if (test_bit(__ICE_DOWN, vsi->state)) in ice_irq_dynamic_ena()
490 * ice_netdev_to_pf - Retrieve the PF struct associated with a netdev
497 return np->vsi->back; in ice_netdev_to_pf()
502 return !!vsi->xdp_prog; in ice_is_xdp_ena_vsi()
507 ring->flags |= ICE_TX_FLAGS_RING_XDP; in ice_set_ring_xdp()
511 * ice_xsk_pool - get XSK buffer pool bound to a ring
519 struct xsk_buff_pool **pools = ring->vsi->xsk_pools; in ice_xsk_pool()
520 u16 qid = ring->q_index; in ice_xsk_pool()
523 qid -= ring->vsi->num_xdp_txq; in ice_xsk_pool()
525 if (qid >= ring->vsi->num_xsk_pools || !pools || !pools[qid] || in ice_xsk_pool()
526 !ice_is_xdp_ena_vsi(ring->vsi)) in ice_xsk_pool()
533 * ice_get_main_vsi - Get the PF VSI
536 * returns pf->vsi[0], which by definition is the PF VSI
540 if (pf->vsi) in ice_get_main_vsi()
541 return pf->vsi[0]; in ice_get_main_vsi()
547 * ice_get_ctrl_vsi - Get the control VSI
552 /* if pf->ctrl_vsi_idx is ICE_NO_VSI, control VSI was not set up */ in ice_get_ctrl_vsi()
553 if (!pf->vsi || pf->ctrl_vsi_idx == ICE_NO_VSI) in ice_get_ctrl_vsi()
556 return pf->vsi[pf->ctrl_vsi_idx]; in ice_get_ctrl_vsi()