]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qed: Add iWARP protocol support in context allocation
authorKalderon, Michal <Michal.Kalderon@cavium.com>
Sun, 2 Jul 2017 07:29:31 +0000 (10:29 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 19 Sep 2017 05:32:41 +0000 (22:32 -0700)
Orabug: 26783820

When computing how much memory is required for the different hw clients
iWARP protocol should be taken into account

Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ Upstream commit 5d7dc9620d35ce1f503e2062aa324447e557e3f2 ]
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_cxt.c

index ddfbc478d11a07db1d81865ac2aed1340993257d..6becdbf561a41b812b989ea3640927d841e42c81 100644 (file)
@@ -246,14 +246,16 @@ struct qed_cxt_mngr {
 static bool src_proto(enum protocol_type type)
 {
        return type == PROTOCOLID_ISCSI ||
-              type == PROTOCOLID_FCOE;
+              type == PROTOCOLID_FCOE ||
+              type == PROTOCOLID_IWARP;
 }
 
 static bool tm_cid_proto(enum protocol_type type)
 {
        return type == PROTOCOLID_ISCSI ||
               type == PROTOCOLID_FCOE ||
-              type == PROTOCOLID_ROCE;
+              type == PROTOCOLID_ROCE ||
+              type == PROTOCOLID_IWARP;
 }
 
 static bool tm_tid_proto(enum protocol_type type)
@@ -2014,6 +2016,12 @@ static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn,
        num_srqs = min_t(u32, 32 * 1024, p_params->num_srqs);
 
        switch (p_hwfn->hw_info.personality) {
+       case QED_PCI_ETH_RDMA:
+       case QED_PCI_ETH_IWARP:
+               /* Each QP requires one connection */
+               num_cons = min_t(u32, IWARP_MAX_QPS, p_params->num_qps);
+               proto = PROTOCOLID_IWARP;
+               break;
        case QED_PCI_ETH_ROCE:
                num_qps = min_t(u32, ROCE_MAX_QPS, p_params->num_qps);
                num_cons = num_qps * 2; /* each QP requires two connections */