Commit 1bd4f571 authored by Omkar Kulkarni's avatar Omkar Kulkarni Committed by David S. Miller

qed: Add TCP_ULP FW resource layout

Add TCP_ULP as a storage common TCP offload FW resource layout.
This will be used by the core driver (QED) for both the NVMeTCP and iSCSI.
Acked-by: default avatarIgor Russkikh <irusskikh@marvell.com>
Signed-off-by: default avatarPrabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: default avatarOmkar Kulkarni <okulkarni@marvell.com>
Signed-off-by: default avatarMichal Kalderon <mkalderon@marvell.com>
Signed-off-by: default avatarAriel Elior <aelior@marvell.com>
Signed-off-by: default avatarShai Malin <smalin@marvell.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c95e6c7
...@@ -94,14 +94,14 @@ struct src_ent { ...@@ -94,14 +94,14 @@ struct src_ent {
static bool src_proto(enum protocol_type type) static bool src_proto(enum protocol_type type)
{ {
return type == PROTOCOLID_ISCSI || return type == PROTOCOLID_TCP_ULP ||
type == PROTOCOLID_FCOE || type == PROTOCOLID_FCOE ||
type == PROTOCOLID_IWARP; type == PROTOCOLID_IWARP;
} }
static bool tm_cid_proto(enum protocol_type type) static bool tm_cid_proto(enum protocol_type type)
{ {
return type == PROTOCOLID_ISCSI || return type == PROTOCOLID_TCP_ULP ||
type == PROTOCOLID_FCOE || type == PROTOCOLID_FCOE ||
type == PROTOCOLID_ROCE || type == PROTOCOLID_ROCE ||
type == PROTOCOLID_IWARP; type == PROTOCOLID_IWARP;
...@@ -2090,13 +2090,13 @@ int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks) ...@@ -2090,13 +2090,13 @@ int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks)
if (p_params->num_cons && p_params->num_tasks) { if (p_params->num_cons && p_params->num_tasks) {
qed_cxt_set_proto_cid_count(p_hwfn, qed_cxt_set_proto_cid_count(p_hwfn,
PROTOCOLID_ISCSI, PROTOCOLID_TCP_ULP,
p_params->num_cons, p_params->num_cons,
0); 0);
qed_cxt_set_proto_tid_count(p_hwfn, qed_cxt_set_proto_tid_count(p_hwfn,
PROTOCOLID_ISCSI, PROTOCOLID_TCP_ULP,
QED_CXT_ISCSI_TID_SEG, QED_CXT_TCP_ULP_TID_SEG,
0, 0,
p_params->num_tasks, p_params->num_tasks,
true); true);
...@@ -2129,8 +2129,8 @@ int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn, ...@@ -2129,8 +2129,8 @@ int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,
seg = QED_CXT_FCOE_TID_SEG; seg = QED_CXT_FCOE_TID_SEG;
break; break;
case QED_PCI_ISCSI: case QED_PCI_ISCSI:
proto = PROTOCOLID_ISCSI; proto = PROTOCOLID_TCP_ULP;
seg = QED_CXT_ISCSI_TID_SEG; seg = QED_CXT_TCP_ULP_TID_SEG;
break; break;
default: default:
return -EINVAL; return -EINVAL;
...@@ -2455,8 +2455,8 @@ int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn, ...@@ -2455,8 +2455,8 @@ int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn,
seg = QED_CXT_FCOE_TID_SEG; seg = QED_CXT_FCOE_TID_SEG;
break; break;
case QED_PCI_ISCSI: case QED_PCI_ISCSI:
proto = PROTOCOLID_ISCSI; proto = PROTOCOLID_TCP_ULP;
seg = QED_CXT_ISCSI_TID_SEG; seg = QED_CXT_TCP_ULP_TID_SEG;
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
...@@ -50,7 +50,7 @@ int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn, ...@@ -50,7 +50,7 @@ int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn,
int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn, int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,
struct qed_tid_mem *p_info); struct qed_tid_mem *p_info);
#define QED_CXT_ISCSI_TID_SEG PROTOCOLID_ISCSI #define QED_CXT_TCP_ULP_TID_SEG PROTOCOLID_TCP_ULP
#define QED_CXT_ROCE_TID_SEG PROTOCOLID_ROCE #define QED_CXT_ROCE_TID_SEG PROTOCOLID_ROCE
#define QED_CXT_FCOE_TID_SEG PROTOCOLID_FCOE #define QED_CXT_FCOE_TID_SEG PROTOCOLID_FCOE
enum qed_cxt_elem_type { enum qed_cxt_elem_type {
......
...@@ -2266,7 +2266,7 @@ int qed_resc_alloc(struct qed_dev *cdev) ...@@ -2266,7 +2266,7 @@ int qed_resc_alloc(struct qed_dev *cdev)
} else if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) { } else if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
num_cons = num_cons =
qed_cxt_get_proto_cid_count(p_hwfn, qed_cxt_get_proto_cid_count(p_hwfn,
PROTOCOLID_ISCSI, PROTOCOLID_TCP_ULP,
NULL); NULL);
n_eqes += 2 * num_cons; n_eqes += 2 * num_cons;
} }
......
...@@ -1118,7 +1118,7 @@ struct outer_tag_config_struct { ...@@ -1118,7 +1118,7 @@ struct outer_tag_config_struct {
/* personality per PF */ /* personality per PF */
enum personality_type { enum personality_type {
BAD_PERSONALITY_TYP, BAD_PERSONALITY_TYP,
PERSONALITY_ISCSI, PERSONALITY_TCP_ULP,
PERSONALITY_FCOE, PERSONALITY_FCOE,
PERSONALITY_RDMA_AND_ETH, PERSONALITY_RDMA_AND_ETH,
PERSONALITY_RDMA, PERSONALITY_RDMA,
......
...@@ -158,7 +158,7 @@ qed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn, ...@@ -158,7 +158,7 @@ qed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_INIT_FUNC, ISCSI_RAMROD_CMD_ID_INIT_FUNC,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
...@@ -250,7 +250,7 @@ qed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn, ...@@ -250,7 +250,7 @@ qed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn,
p_hwfn->p_iscsi_info->event_context = event_context; p_hwfn->p_iscsi_info->event_context = event_context;
p_hwfn->p_iscsi_info->event_cb = async_event_cb; p_hwfn->p_iscsi_info->event_cb = async_event_cb;
qed_spq_register_async_cb(p_hwfn, PROTOCOLID_ISCSI, qed_spq_register_async_cb(p_hwfn, PROTOCOLID_TCP_ULP,
qed_iscsi_async_event); qed_iscsi_async_event);
return qed_spq_post(p_hwfn, p_ent, NULL); return qed_spq_post(p_hwfn, p_ent, NULL);
...@@ -286,7 +286,7 @@ static int qed_sp_iscsi_conn_offload(struct qed_hwfn *p_hwfn, ...@@ -286,7 +286,7 @@ static int qed_sp_iscsi_conn_offload(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_OFFLOAD_CONN, ISCSI_RAMROD_CMD_ID_OFFLOAD_CONN,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
...@@ -465,7 +465,7 @@ static int qed_sp_iscsi_conn_update(struct qed_hwfn *p_hwfn, ...@@ -465,7 +465,7 @@ static int qed_sp_iscsi_conn_update(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_UPDATE_CONN, ISCSI_RAMROD_CMD_ID_UPDATE_CONN,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
...@@ -506,7 +506,7 @@ qed_sp_iscsi_mac_update(struct qed_hwfn *p_hwfn, ...@@ -506,7 +506,7 @@ qed_sp_iscsi_mac_update(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_MAC_UPDATE, ISCSI_RAMROD_CMD_ID_MAC_UPDATE,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
...@@ -548,7 +548,7 @@ static int qed_sp_iscsi_conn_terminate(struct qed_hwfn *p_hwfn, ...@@ -548,7 +548,7 @@ static int qed_sp_iscsi_conn_terminate(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_TERMINATION_CONN, ISCSI_RAMROD_CMD_ID_TERMINATION_CONN,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
...@@ -582,7 +582,7 @@ static int qed_sp_iscsi_conn_clear_sq(struct qed_hwfn *p_hwfn, ...@@ -582,7 +582,7 @@ static int qed_sp_iscsi_conn_clear_sq(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_CLEAR_SQ, ISCSI_RAMROD_CMD_ID_CLEAR_SQ,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
...@@ -606,13 +606,13 @@ static int qed_sp_iscsi_func_stop(struct qed_hwfn *p_hwfn, ...@@ -606,13 +606,13 @@ static int qed_sp_iscsi_func_stop(struct qed_hwfn *p_hwfn,
rc = qed_sp_init_request(p_hwfn, &p_ent, rc = qed_sp_init_request(p_hwfn, &p_ent,
ISCSI_RAMROD_CMD_ID_DESTROY_FUNC, ISCSI_RAMROD_CMD_ID_DESTROY_FUNC,
PROTOCOLID_ISCSI, &init_data); PROTOCOLID_TCP_ULP, &init_data);
if (rc) if (rc)
return rc; return rc;
rc = qed_spq_post(p_hwfn, p_ent, NULL); rc = qed_spq_post(p_hwfn, p_ent, NULL);
qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_ISCSI); qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_TCP_ULP);
return rc; return rc;
} }
...@@ -786,7 +786,7 @@ static int qed_iscsi_acquire_connection(struct qed_hwfn *p_hwfn, ...@@ -786,7 +786,7 @@ static int qed_iscsi_acquire_connection(struct qed_hwfn *p_hwfn,
u32 icid; u32 icid;
spin_lock_bh(&p_hwfn->p_iscsi_info->lock); spin_lock_bh(&p_hwfn->p_iscsi_info->lock);
rc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_ISCSI, &icid); rc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_TCP_ULP, &icid);
spin_unlock_bh(&p_hwfn->p_iscsi_info->lock); spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
if (rc) if (rc)
return rc; return rc;
......
...@@ -1037,8 +1037,8 @@ static int qed_sp_ll2_tx_queue_start(struct qed_hwfn *p_hwfn, ...@@ -1037,8 +1037,8 @@ static int qed_sp_ll2_tx_queue_start(struct qed_hwfn *p_hwfn,
case QED_LL2_TYPE_FCOE: case QED_LL2_TYPE_FCOE:
p_ramrod->conn_type = PROTOCOLID_FCOE; p_ramrod->conn_type = PROTOCOLID_FCOE;
break; break;
case QED_LL2_TYPE_ISCSI: case QED_LL2_TYPE_TCP_ULP:
p_ramrod->conn_type = PROTOCOLID_ISCSI; p_ramrod->conn_type = PROTOCOLID_TCP_ULP;
break; break;
case QED_LL2_TYPE_ROCE: case QED_LL2_TYPE_ROCE:
p_ramrod->conn_type = PROTOCOLID_ROCE; p_ramrod->conn_type = PROTOCOLID_ROCE;
...@@ -1048,7 +1048,7 @@ static int qed_sp_ll2_tx_queue_start(struct qed_hwfn *p_hwfn, ...@@ -1048,7 +1048,7 @@ static int qed_sp_ll2_tx_queue_start(struct qed_hwfn *p_hwfn,
break; break;
case QED_LL2_TYPE_OOO: case QED_LL2_TYPE_OOO:
if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) if (p_hwfn->hw_info.personality == QED_PCI_ISCSI)
p_ramrod->conn_type = PROTOCOLID_ISCSI; p_ramrod->conn_type = PROTOCOLID_TCP_ULP;
else else
p_ramrod->conn_type = PROTOCOLID_IWARP; p_ramrod->conn_type = PROTOCOLID_IWARP;
break; break;
...@@ -2442,7 +2442,7 @@ static int __qed_ll2_start(struct qed_hwfn *p_hwfn, ...@@ -2442,7 +2442,7 @@ static int __qed_ll2_start(struct qed_hwfn *p_hwfn,
conn_type = QED_LL2_TYPE_FCOE; conn_type = QED_LL2_TYPE_FCOE;
break; break;
case QED_PCI_ISCSI: case QED_PCI_ISCSI:
conn_type = QED_LL2_TYPE_ISCSI; conn_type = QED_LL2_TYPE_TCP_ULP;
break; break;
case QED_PCI_ETH_ROCE: case QED_PCI_ETH_ROCE:
conn_type = QED_LL2_TYPE_ROCE; conn_type = QED_LL2_TYPE_ROCE;
......
...@@ -83,7 +83,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn) ...@@ -83,7 +83,7 @@ int qed_ooo_alloc(struct qed_hwfn *p_hwfn)
switch (p_hwfn->hw_info.personality) { switch (p_hwfn->hw_info.personality) {
case QED_PCI_ISCSI: case QED_PCI_ISCSI:
proto = PROTOCOLID_ISCSI; proto = PROTOCOLID_TCP_ULP;
break; break;
case QED_PCI_ETH_RDMA: case QED_PCI_ETH_RDMA:
case QED_PCI_ETH_IWARP: case QED_PCI_ETH_IWARP:
......
...@@ -385,7 +385,7 @@ int qed_sp_pf_start(struct qed_hwfn *p_hwfn, ...@@ -385,7 +385,7 @@ int qed_sp_pf_start(struct qed_hwfn *p_hwfn,
p_ramrod->personality = PERSONALITY_FCOE; p_ramrod->personality = PERSONALITY_FCOE;
break; break;
case QED_PCI_ISCSI: case QED_PCI_ISCSI:
p_ramrod->personality = PERSONALITY_ISCSI; p_ramrod->personality = PERSONALITY_TCP_ULP;
break; break;
case QED_PCI_ETH_ROCE: case QED_PCI_ETH_ROCE:
case QED_PCI_ETH_IWARP: case QED_PCI_ETH_IWARP:
......
...@@ -702,7 +702,7 @@ enum mf_mode { ...@@ -702,7 +702,7 @@ enum mf_mode {
/* Per-protocol connection types */ /* Per-protocol connection types */
enum protocol_type { enum protocol_type {
PROTOCOLID_ISCSI, PROTOCOLID_TCP_ULP,
PROTOCOLID_FCOE, PROTOCOLID_FCOE,
PROTOCOLID_ROCE, PROTOCOLID_ROCE,
PROTOCOLID_CORE, PROTOCOLID_CORE,
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
enum qed_ll2_conn_type { enum qed_ll2_conn_type {
QED_LL2_TYPE_FCOE, QED_LL2_TYPE_FCOE,
QED_LL2_TYPE_ISCSI, QED_LL2_TYPE_TCP_ULP,
QED_LL2_TYPE_TEST, QED_LL2_TYPE_TEST,
QED_LL2_TYPE_OOO, QED_LL2_TYPE_OOO,
QED_LL2_TYPE_RESERVED2, QED_LL2_TYPE_RESERVED2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment