/* Minimum BW limit is 500 Kbps for any scheduler node */ #define ICE_MIN_BW_LIMIT 500 /* User can specify BW in either Kbit/Mbit/Gbit and OS converts it in bytes. *useittoconvertuserspecifiedBWlimitintoKbps
*/ #define ICE_BW_KBPS_DIVISOR 125
/* Default recipes have priority 4 and below, hence priority values between 5..7 *canbeusedasfilterpriorityforadvancedswitchfilter(advancedswitch *filtersneednewrecipetobecreatedforspecifiedextractionsequence *becausedefaultrecipeextractionsequencedoesnotrepresentcustom *extraction)
*/ #define ICE_SWITCH_FLTR_PRIO_QUEUE 7 /* prio 6 is reserved for future use (e.g. switch filter with L3 fields + *(Optional:IPTOS/TTL)+L4fields+(optionally:TCPfieldssuchas *SYN/FIN/RST))
*/ #define ICE_SWITCH_FLTR_PRIO_RSVD 6 #define ICE_SWITCH_FLTR_PRIO_VSI 5 #define ICE_SWITCH_FLTR_PRIO_QGRP ICE_SWITCH_FLTR_PRIO_VSI
/* Macro for each VSI in a PF */ #define ice_for_each_vsi(pf, i) \ for ((i) = 0; (i) < (pf)->num_alloc_vsi; (i)++)
/* Macros for each Tx/Xdp/Rx ring in a VSI */ #define ice_for_each_txq(vsi, i) \ for ((i) = 0; (i) < (vsi)->num_txq; (i)++)
/* Macros for each allocated Tx/Rx ring whether used or not in a VSI */ #define ice_for_each_alloc_txq(vsi, i) \ for ((i) = 0; (i) < (vsi)->alloc_txq; (i)++)
struct ice_txq_meta {
u32 q_teid; /* Tx-scheduler element identifier */
u16 q_id; /* Entry in VSI's txq_map bitmap */
u16 q_handle; /* Relative index of Tx queue within TC */
u16 vsi_idx; /* VSI index that Tx queue belongs to */
u8 tc; /* TC number that Tx queue belongs to */
};
struct ice_tc_cfg {
u8 numtc; /* Total number of enabled TCs */
u16 ena_tc; /* Tx map */ struct ice_tc_info tc_info[ICE_MAX_TRAFFIC_CLASS];
};
struct ice_qs_cfg { struct mutex *qs_mutex; /* will be assigned to &pf->avail_q_mutex */ unsignedlong *pf_map; unsignedlong pf_map_size; unsignedint q_count; unsignedint scatter_count;
u16 *vsi_map;
u16 vsi_map_offset;
u8 mapping_mode;
};
struct ice_sw { struct ice_pf *pf;
u16 sw_id; /* switch ID for this switch */
u16 bridge_mode; /* VEB/VEPA/Port Virtualizer */
};
enum ice_pf_state {
ICE_TESTING,
ICE_DOWN,
ICE_NEEDS_RESTART,
ICE_PREPARED_FOR_RESET, /* set by driver when prepared */
ICE_RESET_OICR_RECV, /* set by driver after rcv reset OICR */
ICE_PFR_REQ, /* set by driver */
ICE_CORER_REQ, /* set by driver */
ICE_GLOBR_REQ, /* set by driver */
ICE_CORER_RECV, /* set by OICR handler */
ICE_GLOBR_RECV, /* set by OICR handler */
ICE_EMPR_RECV, /* set by OICR handler */
ICE_SUSPENDED, /* set on module remove path */
ICE_RESET_FAILED, /* set by reset/rebuild */ /* When checking for the PF to be in a nominal operating state, the *bitsthataregroupedatthebeginningofthelistneedtobe *checked.BitsoccurringbeforeICE_STATE_NOMINAL_CHECK_BITSwill *bechecked.Ifyouneedtoaddabitintoconsiderationfornominal *operatingstate,itmustbeaddedbefore *ICE_STATE_NOMINAL_CHECK_BITS.Donotmovethisentry'sposition *withoutappropriateconsideration.
*/
ICE_STATE_NOMINAL_CHECK_BITS,
ICE_ADMINQ_EVENT_PENDING,
ICE_MAILBOXQ_EVENT_PENDING,
ICE_SIDEBANDQ_EVENT_PENDING,
ICE_MDD_EVENT_PENDING,
ICE_VFLR_EVENT_PENDING,
ICE_FLTR_OVERFLOW_PROMISC,
ICE_VF_DIS,
ICE_CFG_BUSY,
ICE_SERVICE_SCHED,
ICE_SERVICE_DIS,
ICE_FD_FLUSH_REQ,
ICE_OICR_INTR_DIS, /* Global OICR interrupt disabled */
ICE_MDD_VF_PRINT_PENDING, /* set when MDD event handle */
ICE_VF_RESETS_DISABLED, /* disable resets during ice_remove */
ICE_LINK_DEFAULT_OVERRIDE_PENDING,
ICE_PHY_INIT_COMPLETE,
ICE_FD_VF_FLUSH_CTX, /* set at FD Rx IRQ or timeout */
ICE_AUX_ERR_PENDING,
ICE_STATE_NBITS /* must be last */
};
enum ice_vsi_state {
ICE_VSI_DOWN,
ICE_VSI_NEEDS_RESTART,
ICE_VSI_NETDEV_ALLOCD,
ICE_VSI_NETDEV_REGISTERED,
ICE_VSI_UMAC_FLTR_CHANGED,
ICE_VSI_MMAC_FLTR_CHANGED,
ICE_VSI_PROMISC_CHANGED,
ICE_VSI_REBUILD_PENDING,
ICE_VSI_STATE_NBITS /* must be last */
};
/* struct that defines a VSI, associated with a dev */ struct ice_vsi { struct net_device *netdev; struct ice_sw *vsw; /* switch this VSI is on */ struct ice_pf *back; /* back pointer to PF */ struct ice_rx_ring **rx_rings; /* Rx ring array */ struct ice_tx_ring **tx_rings; /* Tx ring array */ struct ice_q_vector **q_vectors; /* q_vector array */
irqreturn_t (*irq_handler)(int irq, void *data);
u64 tx_linearize;
DECLARE_BITMAP(state, ICE_VSI_STATE_NBITS); unsignedint current_netdev_flags;
u32 tx_restart;
u32 tx_busy;
u32 rx_buf_failed;
u32 rx_page_failed;
u16 num_q_vectors; /* tell if only dynamic irq allocation is allowed */ bool irq_dyn_alloc;
u16 vsi_num; /* HW (absolute) index of this VSI */
u16 idx; /* software index in pf->vsi[] */
u16 num_gfltr;
u16 num_bfltr;
/* RSS config */
u16 rss_table_size; /* HW RSS table size */
u16 rss_size; /* Allocated RSS queues */
u8 rss_hfunc; /* User configured hash type */
u8 *rss_hkey_user; /* User configured hash keys */
u8 *rss_lut_user; /* User configured lookup table entries */
u8 rss_lut_type; /* used to configure Get/Set RSS LUT AQ call */
/* aRFS members only allocated for the PF VSI */ #define ICE_MAX_ARFS_LIST 1024 #define ICE_ARFS_LST_MASK (ICE_MAX_ARFS_LIST - 1) struct hlist_head *arfs_fltr_list; struct ice_arfs_active_fltr_cntrs *arfs_fltr_cntrs;
spinlock_t arfs_lock; /* protects aRFS hash table and filter state */
atomic_t *arfs_last_fltr_id;
struct ice_aqc_vsi_props info; /* VSI properties */ struct ice_vsi_vlan_info vlan_info; /* vlan config to be restored */
/* Channel Specific Fields */ struct ice_vsi *tc_map_vsi[ICE_CHNL_MAX_TC];
u16 cnt_q_avail;
u16 next_base_q; /* next queue to be used for channel setup */ struct list_head ch_list;
u16 num_chnl_rxq;
u16 num_chnl_txq;
u16 ch_rss_size;
u16 num_chnl_fltr; /* store away rss size info before configuring ADQ channels so that, *itcanbeusedaftertc-qdiscdelete,togetbackRSSsettingas *theywerebefore
*/
u16 orig_rss_size; /* this keeps tracks of all enabled TC with and without DCB *andinclusiveofADQ,vsi->mqprio_optkeepstrackofqueue *information
*/
u8 all_numtc;
u16 all_enatc;
/* store away TC info, to be used for rebuild logic */
u8 old_numtc;
u16 old_ena_tc;
/* setup back reference, to which aggregator node this VSI *correspondsto
*/ struct ice_agg_node *agg_node;
struct_group_tagged(ice_vsi_cfg_params, params, struct ice_port_info *port_info; /* back pointer to port_info */ struct ice_channel *ch; /* VSI's channel structure, may be NULL */ union { /* VF associated with this VSI, may be NULL */ struct ice_vf *vf; /* SF associated with this VSI, may be NULL */ struct ice_dynamic_port *sf;
};
u32 flags; /* VSI flags used for rebuild and configuration */ enum ice_vsi_type type; /* the type of the VSI */
);
} ____cacheline_internodealigned_in_smp;
/* struct that defines an interrupt vector */ struct ice_q_vector { struct ice_vsi *vsi;
u16 v_idx; /* index in the vsi->q_vector array. */
u16 reg_idx; /* PF relative register index */
u8 num_ring_rx; /* total number of Rx rings in vector */
u8 num_ring_tx; /* total number of Tx rings in vector */
u8 wb_on_itr:1; /* if true, WB on ITR is enabled */ /* in usecs, need to use ice_intrl_to_usecs_reg() before writing this *valuetothedevice
*/
u8 intrl;
/* clear the PBA here, as this function is meant to clean out all *previousinterruptsandenabletheinterrupt
*/
val = GLINT_DYN_CTL_INTENA_M | GLINT_DYN_CTL_CLEARPBA_M |
(itr << GLINT_DYN_CTL_ITR_INDX_S); if (vsi) if (test_bit(ICE_VSI_DOWN, vsi->state)) return;
wr32(hw, GLINT_DYN_CTL(vector), val);
}
/** *ice_get_netdev_priv_vsi-returnVSIassociatedwithnetdevpriv. *@np:privatenetdevstructure
*/ staticinlinestruct ice_vsi *ice_get_netdev_priv_vsi(struct ice_netdev_priv *np)
{ /* In case of port representor return source port VSI. */ if (np->repr) return np->repr->src_vsi; else return np->vsi;
}
/** *ice_get_ctrl_vsi-GetthecontrolVSI *@pf:PFinstance
*/ staticinlinestruct ice_vsi *ice_get_ctrl_vsi(struct ice_pf *pf)
{ /* if pf->ctrl_vsi_idx is ICE_NO_VSI, control VSI was not set up */ if (!pf->vsi || pf->ctrl_vsi_idx == ICE_NO_VSI) return NULL;
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.22Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-03)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.