bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities advertisement
1. When FCoE offload driver is registered, copy its capabilities to the chip scratchpad. 2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad. 3. Add FCoE/iSCSI statistics collection support Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
747cf6ed3d
commit
2e499d3cc1
@@ -874,6 +874,11 @@ struct bnx2i_hba *bnx2i_alloc_hba(struct cnic_dev *cnic)
|
||||
hba->conn_ctx_destroy_tmo = 2 * HZ;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
spin_lock_init(&hba->stat_lock);
|
||||
#endif
|
||||
memset(&hba->stats, 0, sizeof(struct iscsi_stats_info));
|
||||
|
||||
if (iscsi_host_add(shost, &hba->pcidev->dev))
|
||||
goto free_dump_mem;
|
||||
return hba;
|
||||
@@ -1181,12 +1186,18 @@ static int
|
||||
bnx2i_mtask_xmit(struct iscsi_conn *conn, struct iscsi_task *task)
|
||||
{
|
||||
struct bnx2i_conn *bnx2i_conn = conn->dd_data;
|
||||
struct bnx2i_hba *hba = bnx2i_conn->hba;
|
||||
struct bnx2i_cmd *cmd = task->dd_data;
|
||||
|
||||
memset(bnx2i_conn->gen_pdu.req_buf, 0, ISCSI_DEF_MAX_RECV_SEG_LEN);
|
||||
|
||||
bnx2i_setup_cmd_wqe_template(cmd);
|
||||
bnx2i_conn->gen_pdu.req_buf_size = task->data_count;
|
||||
|
||||
/* Tx PDU/data length count */
|
||||
ADD_STATS_64(hba, tx_pdus, 1);
|
||||
ADD_STATS_64(hba, tx_bytes, task->data_count);
|
||||
|
||||
if (task->data_count) {
|
||||
memcpy(bnx2i_conn->gen_pdu.req_buf, task->data,
|
||||
task->data_count);
|
||||
|
||||
Reference in New Issue
Block a user