Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ice/ice_lib.h
/* SPDX-License-Identifier: BSD-3-Clause */ | /* SPDX-License-Identifier: BSD-3-Clause */ | ||||
/* Copyright (c) 2022, Intel Corporation | /* Copyright (c) 2023, Intel Corporation | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions are met: | * modification, are permitted provided that the following conditions are met: | ||||
* | * | ||||
* 1. Redistributions of source code must retain the above copyright notice, | * 1. Redistributions of source code must retain the above copyright notice, | ||||
* this list of conditions and the following disclaimer. | * this list of conditions and the following disclaimer. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | |||||
#define ICE_MAX_DMA_SEG_SIZE ((16*1024) - 1) | #define ICE_MAX_DMA_SEG_SIZE ((16*1024) - 1) | ||||
#define ICE_MAX_RX_SEGS 5 | #define ICE_MAX_RX_SEGS 5 | ||||
#define ICE_MAX_TSO_HDR_SEGS 3 | #define ICE_MAX_TSO_HDR_SEGS 3 | ||||
#define ICE_MSIX_BAR 3 | #define ICE_MSIX_BAR 3 | ||||
#define ICE_MAX_DCB_TCS 8 | |||||
#define ICE_DEFAULT_DESC_COUNT 1024 | #define ICE_DEFAULT_DESC_COUNT 1024 | ||||
#define ICE_MAX_DESC_COUNT 8160 | #define ICE_MAX_DESC_COUNT 8160 | ||||
#define ICE_MIN_DESC_COUNT 64 | #define ICE_MIN_DESC_COUNT 64 | ||||
#define ICE_DESC_COUNT_INCR 32 | #define ICE_DESC_COUNT_INCR 32 | ||||
/* List of hardware offloads we support */ | /* List of hardware offloads we support */ | ||||
#define ICE_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_TCP | CSUM_IP_UDP | CSUM_IP_SCTP | \ | #define ICE_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_TCP | CSUM_IP_UDP | CSUM_IP_SCTP | \ | ||||
CSUM_IP6_TCP| CSUM_IP6_UDP | CSUM_IP6_SCTP | \ | CSUM_IP6_TCP| CSUM_IP6_UDP | CSUM_IP6_SCTP | \ | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | |||||
* larger than the MTU. | * larger than the MTU. | ||||
* | * | ||||
* Avoid this by preventing the MTU from being lowered below this limit. | * Avoid this by preventing the MTU from being lowered below this limit. | ||||
* Alternative solutions require changing the TCP stack to disable offloading | * Alternative solutions require changing the TCP stack to disable offloading | ||||
* the segmentation when the requested segment size goes below 64 bytes. | * the segmentation when the requested segment size goes below 64 bytes. | ||||
*/ | */ | ||||
#define ICE_MIN_MTU 112 | #define ICE_MIN_MTU 112 | ||||
/* | |||||
* The default number of queues reserved for a VF is 4, according to the | |||||
* AVF Base Mode specification. | |||||
*/ | |||||
#define ICE_DEFAULT_VF_QUEUES 4 | #define ICE_DEFAULT_VF_QUEUES 4 | ||||
/* | /* | ||||
* The maximum number of RX queues allowed per TC in a VSI. | * The maximum number of RX queues allowed per TC in a VSI. | ||||
*/ | */ | ||||
#define ICE_MAX_RXQS_PER_TC 256 | #define ICE_MAX_RXQS_PER_TC 256 | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 549 Lines • ▼ Show 20 Lines | int ice_alloc_vsi_qmap(struct ice_vsi *vsi, const int max_tx_queues, | ||||
const int max_rx_queues); | const int max_rx_queues); | ||||
void ice_free_vsi_qmaps(struct ice_vsi *vsi); | void ice_free_vsi_qmaps(struct ice_vsi *vsi); | ||||
int ice_initialize_vsi(struct ice_vsi *vsi); | int ice_initialize_vsi(struct ice_vsi *vsi); | ||||
void ice_deinit_vsi(struct ice_vsi *vsi); | void ice_deinit_vsi(struct ice_vsi *vsi); | ||||
uint64_t ice_aq_speed_to_rate(struct ice_port_info *pi); | uint64_t ice_aq_speed_to_rate(struct ice_port_info *pi); | ||||
int ice_get_phy_type_low(uint64_t phy_type_low); | int ice_get_phy_type_low(uint64_t phy_type_low); | ||||
int ice_get_phy_type_high(uint64_t phy_type_high); | int ice_get_phy_type_high(uint64_t phy_type_high); | ||||
enum ice_status ice_add_media_types(struct ice_softc *sc, struct ifmedia *media); | enum ice_status ice_add_media_types(struct ice_softc *sc, struct ifmedia *media); | ||||
void ice_configure_rxq_interrupts(struct ice_vsi *vsi); | void ice_configure_rxq_interrupt(struct ice_hw *hw, u16 rxqid, u16 vector, u8 itr_idx); | ||||
void ice_configure_txq_interrupts(struct ice_vsi *vsi); | void ice_configure_all_rxq_interrupts(struct ice_vsi *vsi); | ||||
void ice_configure_txq_interrupt(struct ice_hw *hw, u16 txqid, u16 vector, u8 itr_idx); | |||||
void ice_configure_all_txq_interrupts(struct ice_vsi *vsi); | |||||
void ice_flush_rxq_interrupts(struct ice_vsi *vsi); | void ice_flush_rxq_interrupts(struct ice_vsi *vsi); | ||||
void ice_flush_txq_interrupts(struct ice_vsi *vsi); | void ice_flush_txq_interrupts(struct ice_vsi *vsi); | ||||
int ice_cfg_vsi_for_tx(struct ice_vsi *vsi); | int ice_cfg_vsi_for_tx(struct ice_vsi *vsi); | ||||
int ice_cfg_vsi_for_rx(struct ice_vsi *vsi); | int ice_cfg_vsi_for_rx(struct ice_vsi *vsi); | ||||
int ice_control_rx_queues(struct ice_vsi *vsi, bool enable); | int ice_control_rx_queue(struct ice_vsi *vsi, u16 qidx, bool enable); | ||||
int ice_control_all_rx_queues(struct ice_vsi *vsi, bool enable); | |||||
int ice_cfg_pf_default_mac_filters(struct ice_softc *sc); | int ice_cfg_pf_default_mac_filters(struct ice_softc *sc); | ||||
int ice_rm_pf_default_mac_filters(struct ice_softc *sc); | int ice_rm_pf_default_mac_filters(struct ice_softc *sc); | ||||
void ice_print_nvm_version(struct ice_softc *sc); | void ice_print_nvm_version(struct ice_softc *sc); | ||||
void ice_update_vsi_hw_stats(struct ice_vsi *vsi); | void ice_update_vsi_hw_stats(struct ice_vsi *vsi); | ||||
void ice_reset_vsi_stats(struct ice_vsi *vsi); | void ice_reset_vsi_stats(struct ice_vsi *vsi); | ||||
void ice_update_pf_stats(struct ice_softc *sc); | void ice_update_pf_stats(struct ice_softc *sc); | ||||
void ice_reset_pf_stats(struct ice_softc *sc); | void ice_reset_pf_stats(struct ice_softc *sc); | ||||
void ice_add_device_sysctls(struct ice_softc *sc); | void ice_add_device_sysctls(struct ice_softc *sc); | ||||
void ice_log_hmc_error(struct ice_hw *hw, device_t dev); | void ice_log_hmc_error(struct ice_hw *hw, device_t dev); | ||||
void ice_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx, | void ice_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx, | ||||
struct sysctl_oid *parent, | struct sysctl_oid *parent, | ||||
struct ice_eth_stats *stats); | struct ice_eth_stats *stats); | ||||
void ice_add_vsi_sysctls(struct ice_vsi *vsi); | void ice_add_vsi_sysctls(struct ice_vsi *vsi); | ||||
void ice_add_sysctls_mac_stats(struct sysctl_ctx_list *ctx, | void ice_add_sysctls_mac_stats(struct sysctl_ctx_list *ctx, | ||||
struct sysctl_oid *parent, | struct sysctl_oid *parent, | ||||
struct ice_hw_port_stats *stats); | struct ice_hw_port_stats *stats); | ||||
void ice_configure_misc_interrupts(struct ice_softc *sc); | void ice_configure_misc_interrupts(struct ice_softc *sc); | ||||
int ice_sync_multicast_filters(struct ice_softc *sc); | int ice_sync_multicast_filters(struct ice_softc *sc); | ||||
enum ice_status ice_add_vlan_hw_filters(struct ice_vsi *vsi, u16 *vid, | |||||
u16 length); | |||||
enum ice_status ice_add_vlan_hw_filter(struct ice_vsi *vsi, u16 vid); | enum ice_status ice_add_vlan_hw_filter(struct ice_vsi *vsi, u16 vid); | ||||
enum ice_status ice_remove_vlan_hw_filters(struct ice_vsi *vsi, u16 *vid, | |||||
u16 length); | |||||
enum ice_status ice_remove_vlan_hw_filter(struct ice_vsi *vsi, u16 vid); | enum ice_status ice_remove_vlan_hw_filter(struct ice_vsi *vsi, u16 vid); | ||||
void ice_add_vsi_tunables(struct ice_vsi *vsi, struct sysctl_oid *parent); | void ice_add_vsi_tunables(struct ice_vsi *vsi, struct sysctl_oid *parent); | ||||
void ice_del_vsi_sysctl_ctx(struct ice_vsi *vsi); | void ice_del_vsi_sysctl_ctx(struct ice_vsi *vsi); | ||||
void ice_add_device_tunables(struct ice_softc *sc); | void ice_add_device_tunables(struct ice_softc *sc); | ||||
int ice_add_vsi_mac_filter(struct ice_vsi *vsi, const u8 *addr); | int ice_add_vsi_mac_filter(struct ice_vsi *vsi, const u8 *addr); | ||||
int ice_remove_vsi_mac_filter(struct ice_vsi *vsi, const u8 *addr); | int ice_remove_vsi_mac_filter(struct ice_vsi *vsi, const u8 *addr); | ||||
int ice_vsi_disable_tx(struct ice_vsi *vsi); | int ice_vsi_disable_tx(struct ice_vsi *vsi); | ||||
void ice_vsi_add_txqs_ctx(struct ice_vsi *vsi); | void ice_vsi_add_txqs_ctx(struct ice_vsi *vsi); | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |