net/virtio: allocate vrings on device NUMA node
[dpdk.git] / drivers / net / qede / base / ecore_init_fw_funcs.h
index a258bd1..3503a90 100644 (file)
@@ -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 _INIT_FW_FUNCS_H
@@ -27,10 +25,10 @@ struct init_qm_pq_params;
  * @return The required host memory size in 4KB units.
  */
 u32 ecore_qm_pf_mem_size(u32 num_pf_cids,
-                        u32 num_vf_cids,
-                        u32 num_tids,
-                        u16 num_pf_pqs,
-                        u16 num_vf_pqs);
+                                                u32 num_vf_cids,
+                                                u32 num_tids,
+                                                u16 num_pf_pqs,
+                                                u16 num_vf_pqs);
 
 /**
  * @brief ecore_qm_common_rt_init - Prepare QM runtime init values for engine
@@ -61,9 +59,10 @@ int ecore_qm_common_rt_init(struct ecore_hwfn *p_hwfn,
  *
  * @param p_hwfn
  * @param p_ptt                        - ptt window used for writing the registers
- * @param port_id              - port ID
  * @param pf_id                        - PF ID
  * @param max_phys_tcs_per_port        - max number of physical TCs per port in HW
+ * @param is_pf_loading -        indicates if the PF is currently loading,
+ *                               i.e. it has no allocated QM resources.
  * @param num_pf_cids          - number of connections used by this PF
  * @param num_vf_cids          - number of connections used by VFs of this PF
  * @param num_tids             - number of tasks used by this PF
@@ -77,6 +76,7 @@ int ecore_qm_common_rt_init(struct ecore_hwfn *p_hwfn,
  *                be 0. otherwise, the weight must be non-zero.
  * @param pf_rl - rate limit in Mb/sec units. a value of 0 means don't
  *                configure. ignored if PF RL is globally disabled.
+ * @param link_speed -           link speed in Mbps.
  * @param pq_params - array of size (num_pf_pqs+num_vf_pqs) with parameters for
  *                    each Tx PQ associated with the specified PF.
  * @param vport_params - array of size num_vports with parameters for each
@@ -86,9 +86,9 @@ int ecore_qm_common_rt_init(struct ecore_hwfn *p_hwfn,
  */
 int ecore_qm_pf_rt_init(struct ecore_hwfn *p_hwfn,
                        struct ecore_ptt *p_ptt,
-                       u8 port_id,
                        u8 pf_id,
                        u8 max_phys_tcs_per_port,
+                       bool is_pf_loading,
                        u32 num_pf_cids,
                        u32 num_vf_cids,
                        u32 num_tids,
@@ -99,6 +99,7 @@ int ecore_qm_pf_rt_init(struct ecore_hwfn *p_hwfn,
                        u8 num_vports,
                        u16 pf_wfq,
                        u32 pf_rl,
+                       u32 link_speed,
                        struct init_qm_pq_params *pq_params,
                        struct init_qm_vport_params *vport_params);
 
@@ -153,17 +154,19 @@ int ecore_init_vport_wfq(struct ecore_hwfn *p_hwfn,
  * @brief ecore_init_vport_rl - Initializes the rate limit of the specified
  * VPORT.
  *
- * @param p_hwfn       - HW device data
- * @param p_ptt                - ptt window used for writing the registers
- * @param vport_id     - VPORT ID
- * @param vport_rl     - rate limit in Mb/sec units
+ * @param p_hwfn -            HW device data
+ * @param p_ptt -             ptt window used for writing the registers
+ * @param vport_id -   VPORT ID
+ * @param vport_rl -   rate limit in Mb/sec units
+ * @param link_speed - link speed in Mbps.
  *
  * @return 0 on success, -1 on error.
  */
 int ecore_init_vport_rl(struct ecore_hwfn *p_hwfn,
                                                struct ecore_ptt *p_ptt,
                                                u8 vport_id,
-                                               u32 vport_rl);
+                                               u32 vport_rl,
+                                               u32 link_speed);
 
 /**
  * @brief ecore_send_qm_stop_cmd  Sends a stop command to the QM
@@ -255,6 +258,16 @@ void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn,
                                                struct init_brb_ram_req *req);
 #endif /* UNUSED_HSI_FUNC */
 
+/**
+ * @brief ecore_set_vxlan_no_l2_enable - enable or disable VXLAN no L2 parsing
+ *
+ * @param p_ptt             - ptt window used for writing the registers.
+ * @param enable            - VXLAN no L2 enable flag.
+ */
+void ecore_set_vxlan_no_l2_enable(struct ecore_hwfn *p_hwfn,
+                                 struct ecore_ptt *p_ptt,
+                                 bool enable);
+
 #ifndef UNUSED_HSI_FUNC
 /**
  * @brief ecore_set_port_mf_ovlan_eth_type - initializes DORQ ethType Regs to
@@ -264,7 +277,8 @@ void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn,
  * @param p_hwfn -         HW device data
  * @param ethType - etherType to configure
  */
-void ecore_set_port_mf_ovlan_eth_type(struct ecore_hwfn *p_hwfn, u32 ethType);
+void ecore_set_port_mf_ovlan_eth_type(struct ecore_hwfn *p_hwfn,
+                                     u32 ethType);
 #endif /* UNUSED_HSI_FUNC */
 
 /**
@@ -333,33 +347,35 @@ void ecore_set_gft_event_id_cm_hdr(struct ecore_hwfn *p_hwfn,
                                   struct ecore_ptt *p_ptt);
 
 /**
- * @brief ecore_set_rfs_mode_disable - Disable and configure HW for RFS
+ * @brief ecore_gft_disable - Disable and GFT
  *
  * @param p_hwfn -   HW device data
  * @param p_ptt -   ptt window used for writing the registers.
- * @param pf_id - pf on which to disable RFS.
+ * @param pf_id - pf on which to disable GFT.
  */
-void ecore_set_rfs_mode_disable(struct ecore_hwfn *p_hwfn,
-                               struct ecore_ptt *p_ptt,
-                               u16 pf_id);
+void ecore_gft_disable(struct ecore_hwfn *p_hwfn,
+                                               struct ecore_ptt *p_ptt,
+                                               u16 pf_id);
 
 /**
-* @brief ecore_set_rfs_mode_enable - enable and configure HW for RFS
+ * @brief ecore_gft_config - Enable and configure HW for GFT
 *
 * @param p_ptt - ptt window used for writing the registers.
-* @param pf_id - pf on which to enable RFS.
+ * @param pf_id - pf on which to enable GFT.
 * @param tcp   - set profile tcp packets.
 * @param udp   - set profile udp  packet.
 * @param ipv4  - set profile ipv4 packet.
 * @param ipv6  - set profile ipv6 packet.
+ * @param profile_type -  define packet same fields. Use enum gft_profile_type.
 */
-void ecore_set_rfs_mode_enable(struct ecore_hwfn *p_hwfn,
+void ecore_gft_config(struct ecore_hwfn *p_hwfn,
        struct ecore_ptt *p_ptt,
        u16 pf_id,
        bool tcp,
        bool udp,
        bool ipv4,
-       bool ipv6);
+       bool ipv6,
+       enum gft_profile_type profile_type);
 #endif /* UNUSED_HSI_FUNC */
 
 /**
@@ -413,8 +429,10 @@ void ecore_enable_context_validation(struct ecore_hwfn *p_hwfn,
  * @param ctx_type -   context type.
  * @param cid -                context cid.
  */
-void ecore_calc_session_ctx_validation(void *p_ctx_mem, u16 ctx_size,
-                                      u8 ctx_type, u32 cid);
+void ecore_calc_session_ctx_validation(void *p_ctx_mem,
+                                      u16 ctx_size,
+                                      u8 ctx_type,
+                                      u32 cid);
 
 /**
  * @brief ecore_calc_task_ctx_validation - Calcualte validation byte for task
@@ -425,8 +443,11 @@ void ecore_calc_session_ctx_validation(void *p_ctx_mem, u16 ctx_size,
  * @param ctx_type -   context type.
  * @param tid -                    context tid.
  */
-void ecore_calc_task_ctx_validation(void *p_ctx_mem, u16 ctx_size, u8 ctx_type,
+void ecore_calc_task_ctx_validation(void *p_ctx_mem,
+                                   u16 ctx_size,
+                                   u8 ctx_type,
                                    u32 tid);
+
 /**
  * @brief ecore_memset_session_ctx - Memset session context to 0 while
  * preserving validation bytes.
@@ -450,4 +471,36 @@ void ecore_memset_session_ctx(void *p_ctx_mem,
 void ecore_memset_task_ctx(void *p_ctx_mem,
                           u32 ctx_size,
                           u8 ctx_type);
+
+
+/*******************************************************************************
+ * File name : rdma_init.h
+ * Author    : Michael Shteinbok
+ *******************************************************************************
+ *******************************************************************************
+ * Description:
+ * RDMA HSI functions header
+ *
+ *******************************************************************************
+ * Notes: This is the input to the auto generated file drv_init_fw_funcs.h
+ *
+ *******************************************************************************
+ */
+#define NUM_STORMS 6
+
+
+
+/**
+ * @brief ecore_set_rdma_error_level - Sets the RDMA assert level.
+ *                                     If the severity of the error will be
+ *                                    above the level, the FW will assert.
+ * @param p_hwfn -                HW device data
+ * @param p_ptt -                 ptt window used for writing the registers
+ * @param assert_level - An array of assert levels for each storm.
+ */
+void ecore_set_rdma_error_level(struct ecore_hwfn *p_hwfn,
+                               struct ecore_ptt *p_ptt,
+                               u8 assert_level[NUM_STORMS]);
+
+
 #endif