X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore.h;h=4607a80a9bdc260aafde56e4b9d7d337b9b8fc1c;hb=0b855a345e87460fa5977078c5d8a06ebc567d8e;hp=eaf2604c76fc305899fad886da44a0c2d7aec570;hpb=955770f25437a4ba6168ba6233253502659c66e9;p=dpdk.git diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h index eaf2604c76..4607a80a9b 100644 --- a/drivers/net/qede/base/ecore.h +++ b/drivers/net/qede/base/ecore.h @@ -1,9 +1,7 @@ -/* - * Copyright (c) 2016 QLogic Corporation. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2016 - 2018 Cavium Inc. * All rights reserved. - * www.qlogic.com - * - * See LICENSE.qede_pmd for copyright and licensing details. + * www.cavium.com */ #ifndef __ECORE_H @@ -29,9 +27,9 @@ #include "mcp_public.h" #define ECORE_MAJOR_VERSION 8 -#define ECORE_MINOR_VERSION 18 -#define ECORE_REVISION_VERSION 7 -#define ECORE_ENGINEERING_VERSION 1 +#define ECORE_MINOR_VERSION 37 +#define ECORE_REVISION_VERSION 20 +#define ECORE_ENGINEERING_VERSION 0 #define ECORE_VERSION \ ((ECORE_MAJOR_VERSION << 24) | (ECORE_MINOR_VERSION << 16) | \ @@ -41,6 +39,9 @@ ((FW_MAJOR_VERSION << 24) | (FW_MINOR_VERSION << 16) | \ (FW_REVISION_VERSION << 8) | FW_ENGINEERING_VERSION) +#define IS_ECORE_PACING(p_hwfn) \ + (!!(p_hwfn->b_en_pacing)) + #define MAX_HWFNS_PER_DEVICE 2 #define NAME_SIZE 128 /* @DPDK */ #define ECORE_WFQ_UNIT 100 @@ -432,8 +433,10 @@ struct ecore_hw_info { #define DMAE_MAX_RW_SIZE 0x2000 struct ecore_dmae_info { - /* Mutex for synchronizing access to functions */ - osal_mutex_t mutex; + /* Spinlock for synchronizing access to functions */ + osal_spinlock_t lock; + + bool b_mem_ready; u8 channel; @@ -534,6 +537,12 @@ enum ecore_mf_mode_bit { ECORE_MF_UFP_SPECIFIC, ECORE_MF_DISABLE_ARFS, + + /* Use vlan for steering */ + ECORE_MF_8021Q_TAGGING, + + /* Use stag for steering */ + ECORE_MF_8021AD_TAGGING, }; enum ecore_ufp_mode { @@ -651,6 +660,7 @@ struct ecore_hwfn { #endif struct dbg_tools_data dbg_info; + void *dbg_user_info; struct z_stream_s *stream; @@ -672,6 +682,13 @@ struct ecore_hwfn { /* Mechanism for recovering from doorbell drop */ struct ecore_db_recovery_info db_recovery_info; + /* Enable/disable pacing, if request to enable then + * IOV and mcos configuration will be skipped. + * this actually reflects the value requested in + * struct ecore_hw_prepare_params by ecore client. + */ + bool b_en_pacing; + /* @DPDK */ struct ecore_ptt *p_arfs_ptt; }; @@ -854,6 +871,9 @@ struct ecore_dev { bool b_is_emul_full; #endif + /* Indicates whether this PF serves a storage target */ + bool b_is_target; + #ifdef CONFIG_ECORE_BINARY_FW /* @DPDK */ void *firmware; u64 fw_len; @@ -924,12 +944,16 @@ void ecore_set_fw_mac_addr(__le16 *fw_msb, __le16 *fw_mid, __le16 *fw_lsb, #define PQ_FLAGS_ACK (1 << 4) #define PQ_FLAGS_OFLD (1 << 5) #define PQ_FLAGS_VFS (1 << 6) +#define PQ_FLAGS_LLT (1 << 7) /* physical queue index for cm context intialization */ u16 ecore_get_cm_pq_idx(struct ecore_hwfn *p_hwfn, u32 pq_flags); u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn, u8 tc); u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf); -u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 qpid); +u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u16 rl); + +/* qm vport for rate limit configuration */ +u16 ecore_get_qm_vport_idx_rl(struct ecore_hwfn *p_hwfn, u16 rl); const char *ecore_hw_get_resc_name(enum ecore_resources res_id); @@ -938,6 +962,8 @@ void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn); void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn, enum ecore_db_rec_exec); +bool ecore_edpm_enabled(struct ecore_hwfn *p_hwfn); + /* amount of resources used in qm init */ u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn); u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn);