[SCSI] cxgb4i v5: iscsi driver

Added cxgb4i iSCSI driver.

This patch implements the cxgb4i iscsi connection acceleration for the
open-iscsi initiator.

The cxgb4i driver offers the iscsi PDU based offload:
- digest insertion and verification
- payload direct-placement into host memory buffer.

Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
kxie@chelsio.com 2010-08-16 20:55:53 -07:00 committed by James Bottomley
parent 9ba682f01e
commit 7b36b6e03b
8 changed files with 1652 additions and 0 deletions

View File

@ -379,6 +379,7 @@ config ISCSI_BOOT_SYSFS
say Y. Otherwise, say N.
source "drivers/scsi/cxgb3i/Kconfig"
source "drivers/scsi/cxgbi/Kconfig"
source "drivers/scsi/bnx2i/Kconfig"
source "drivers/scsi/be2iscsi/Kconfig"

View File

@ -134,6 +134,7 @@ obj-$(CONFIG_SCSI_STEX) += stex.o
obj-$(CONFIG_SCSI_MVSAS) += mvsas/
obj-$(CONFIG_PS3_ROM) += ps3rom.o
obj-$(CONFIG_SCSI_CXGB3_ISCSI) += libiscsi.o libiscsi_tcp.o cxgb3i/
obj-$(CONFIG_SCSI_CXGB4_ISCSI) += libiscsi.o libiscsi_tcp.o cxgbi/
obj-$(CONFIG_SCSI_BNX2_ISCSI) += libiscsi.o bnx2i/
obj-$(CONFIG_BE2ISCSI) += libiscsi.o be2iscsi/
obj-$(CONFIG_SCSI_PMCRAID) += pmcraid.o

View File

@ -0,0 +1 @@
source "drivers/scsi/cxgbi/cxgb4i/Kconfig"

View File

@ -0,0 +1 @@
obj-$(CONFIG_SCSI_CXGB4_ISCSI) += libcxgbi.o cxgb4i/

View File

@ -0,0 +1,3 @@
EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb4
obj-$(CONFIG_SCSI_CXGB4_ISCSI) += cxgb4i.o

View File

@ -0,0 +1,7 @@
config SCSI_CXGB4_ISCSI
tristate "Chelsio T4 iSCSI support"
depends on CHELSIO_T4_DEPENDS
select CHELSIO_T4
select SCSI_ISCSI_ATTRS
---help---
This driver supports iSCSI offload for the Chelsio T4 devices.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
/*
* cxgb4i.h: Chelsio T4 iSCSI driver.
*
* Copyright (c) 2010 Chelsio Communications, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* Written by: Karen Xie (kxie@chelsio.com)
* Written by: Rakesh Ranjan (rranjan@chelsio.com)
*/
#ifndef __CXGB4I_H__
#define __CXGB4I_H__
#define CXGB4I_SCSI_HOST_QDEPTH 1024
#define CXGB4I_MAX_CONN 16384
#define CXGB4I_MAX_TARGET CXGB4I_MAX_CONN
#define CXGB4I_MAX_LUN 0x1000
/* for TX: a skb must have a headroom of at least TX_HEADER_LEN bytes */
#define CXGB4I_TX_HEADER_LEN \
(sizeof(struct fw_ofld_tx_data_wr) + sizeof(struct sge_opaque_hdr))
struct cpl_rx_data_ddp {
union opcode_tid ot;
__be16 urg;
__be16 len;
__be32 seq;
union {
__be32 nxt_seq;
__be32 ddp_report;
};
__be32 ulp_crc;
__be32 ddpvld;
};
#endif /* __CXGB4I_H__ */