summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qed/qed_cxt.h
diff options
context:
space:
mode:
authorRam Amrani <Ram.Amrani@cavium.com>2017-04-03 12:21:13 +0300
committerDavid S. Miller <davem@davemloft.net>2017-04-04 05:16:37 +0300
commitf9dc4d1f0d6f75c102ee13c0a939d9ae880a3c1e (patch)
tree145c16efd429fda35b7646c89df8ed2edd290ae2 /drivers/net/ethernet/qlogic/qed/qed_cxt.h
parent5f8cb033f4c814760c9f7f2345278111d06afe47 (diff)
downloadlinux-f9dc4d1f0d6f75c102ee13c0a939d9ae880a3c1e.tar.xz
qed: Manage with less memory regions for RoCE
It's possible some configurations would prevent driver from utilizing all the Memory Regions due to a lack of ILT lines. In such a case, calculate how many memory regions would have to be dropped due to limit, and manage without those. Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_cxt.h')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_cxt.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.h b/drivers/net/ethernet/qlogic/qed/qed_cxt.h
index 8b010324268a..f34b2889f4bb 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.h
@@ -105,19 +105,28 @@ u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
* @brief qed_cxt_set_pf_params - Set the PF params for cxt init
*
* @param p_hwfn
- *
+ * @param rdma_tasks - requested maximum
* @return int
*/
-int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn);
+int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks);
/**
* @brief qed_cxt_cfg_ilt_compute - compute ILT init parameters
*
* @param p_hwfn
+ * @param last_line
*
* @return int
*/
-int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn);
+int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn, u32 *last_line);
+
+/**
+ * @brief qed_cxt_cfg_ilt_compute_excess - how many lines can be decreased
+ *
+ * @param p_hwfn
+ * @param used_lines
+ */
+u32 qed_cxt_cfg_ilt_compute_excess(struct qed_hwfn *p_hwfn, u32 used_lines);
/**
* @brief qed_cxt_mngr_alloc - Allocate and init the context manager struct