Skip to content

Commit e0a8f9d

Browse files
mkalderondavem330
authored andcommitted
qed: Add iWARP enablement support
This patch is the last of the initial iWARP patch series. It adds the possiblity to actually detect iWARP from the device and enable it in the critical locations which basically make iWARP available. It wasn't submitted until now as iWARP hadn't been accepted into the rdma tree. Signed-off-by: Michal Kalderon <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2091c22 commit e0a8f9d

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

drivers/net/ethernet/qlogic/qed/qed_cxt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,6 +2069,12 @@ static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn,
20692069

20702070
num_srqs = min_t(u32, 32 * 1024, p_params->num_srqs);
20712071

2072+
if (p_hwfn->mcp_info->func_info.protocol == QED_PCI_ETH_RDMA) {
2073+
DP_NOTICE(p_hwfn,
2074+
"Current day drivers don't support RoCE & iWARP simultaneously on the same PF. Default to RoCE-only\n");
2075+
p_hwfn->hw_info.personality = QED_PCI_ETH_ROCE;
2076+
}
2077+
20722078
switch (p_hwfn->hw_info.personality) {
20732079
case QED_PCI_ETH_IWARP:
20742080
/* Each QP requires one connection */

drivers/net/ethernet/qlogic/qed/qed_mcp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,12 +1691,12 @@ qed_mcp_get_shmem_proto_mfw(struct qed_hwfn *p_hwfn,
16911691
case FW_MB_PARAM_GET_PF_RDMA_ROCE:
16921692
*p_proto = QED_PCI_ETH_ROCE;
16931693
break;
1694+
case FW_MB_PARAM_GET_PF_RDMA_IWARP:
1695+
*p_proto = QED_PCI_ETH_IWARP;
1696+
break;
16941697
case FW_MB_PARAM_GET_PF_RDMA_BOTH:
1695-
DP_NOTICE(p_hwfn,
1696-
"Current day drivers don't support RoCE & iWARP. Default to RoCE-only\n");
1697-
*p_proto = QED_PCI_ETH_ROCE;
1698+
*p_proto = QED_PCI_ETH_RDMA;
16981699
break;
1699-
case FW_MB_PARAM_GET_PF_RDMA_IWARP:
17001700
default:
17011701
DP_NOTICE(p_hwfn,
17021702
"MFW answers GET_PF_RDMA_PROTOCOL but param is %08x\n",

drivers/net/ethernet/qlogic/qed/qed_rdma.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn,
156156
return rc;
157157

158158
p_hwfn->p_rdma_info = p_rdma_info;
159-
p_rdma_info->proto = PROTOCOLID_ROCE;
159+
if (QED_IS_IWARP_PERSONALITY(p_hwfn))
160+
p_rdma_info->proto = PROTOCOLID_IWARP;
161+
else
162+
p_rdma_info->proto = PROTOCOLID_ROCE;
160163

161164
num_cons = qed_cxt_get_proto_cid_count(p_hwfn, p_rdma_info->proto,
162165
NULL);

drivers/net/ethernet/qlogic/qed/qed_sp_commands.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ int qed_sp_pf_start(struct qed_hwfn *p_hwfn,
377377
p_ramrod->personality = PERSONALITY_ISCSI;
378378
break;
379379
case QED_PCI_ETH_ROCE:
380+
case QED_PCI_ETH_IWARP:
380381
p_ramrod->personality = PERSONALITY_RDMA_AND_ETH;
381382
break;
382383
default:

0 commit comments

Comments
 (0)