[ewg] [PATCH 2/2 - v2] IB/iser: move open-iscsi crypto functions to kernel_addons (RHEL4)

Erez Zilber erezz at voltaire.com
Sun Aug 5 23:52:28 PDT 2007


move open-iscsi crypto functions to kernel_addons (RHEL4)

Signed-off-by: Erez Zilber <erezz at voltaire.com>
---
 .../backport/2.6.9_U3/include/linux/crypto.h       |   55 ++++++++++++--
 .../backport/2.6.9_U4/include/linux/crypto.h       |   55 ++++++++++++--
 .../backport/2.6.9_U5/include/linux/crypto.h       |   55 ++++++++++++--
 .../backport/2.6.9_U3/add_open_iscsi.patch         |   83 --------------------
 .../backport/2.6.9_U4/add_open_iscsi.patch         |   83 --------------------
 .../backport/2.6.9_U5/add_open_iscsi.patch         |   83 --------------------
 6 files changed, 147 insertions(+), 267 deletions(-)

diff --git a/kernel_addons/backport/2.6.9_U3/include/linux/crypto.h b/kernel_addons/backport/2.6.9_U3/include/linux/crypto.h
index aecccde..0f02f6f 100644
--- a/kernel_addons/backport/2.6.9_U3/include/linux/crypto.h
+++ b/kernel_addons/backport/2.6.9_U3/include/linux/crypto.h
@@ -1,11 +1,54 @@
-#ifndef LINUX_CRYPTO_BACKPORT_H
-#define LINUX_CRYPTO_BACKPORT_H
+#ifndef BACKPORT_LINUX_CRYPTO_H
+#define BACKPORT_LINUX_CRYPTO_H
 
 #include_next <linux/crypto.h>
 
-#define crypto_hash_init(desc) crypto_digest_init(*desc)
-#define crypto_hash_digest(desc, sg, nbytes, out) crypto_digest_digest(*desc, sg, 1, out)
-#define crypto_hash_update(desc, sg, nbytes) crypto_digest_update(*desc, sg, 1)
-#define crypto_hash_final(desc, out) crypto_digest_final(*desc, out)
+#define CRYPTO_ALG_ASYNC               0x00000080
+
+struct hash_desc
+{
+	struct crypto_tfm *tfm;
+	u32 flags;
+};
+
+static inline int crypto_hash_init(struct hash_desc *desc)
+{
+	crypto_digest_init(desc->tfm);
+	return 0;
+}
+
+static inline int crypto_hash_digest(struct hash_desc *desc,
+                                    struct scatterlist *sg,
+                                    unsigned int nbytes, u8 *out)
+{
+	crypto_digest_digest(desc->tfm, sg, (nbytes+(PAGE_SIZE-1)) / PAGE_SIZE, out);
+	return nbytes;
+}
+
+static inline int crypto_hash_update(struct hash_desc *desc,
+                                    struct scatterlist *sg,
+                                    unsigned int nbytes)
+{
+	crypto_digest_update(desc->tfm, sg, (nbytes+(PAGE_SIZE-1)) / PAGE_SIZE);
+	return nbytes;
+}
+
+static inline int crypto_hash_final(struct hash_desc *desc, u8 *out)
+{
+	crypto_digest_final(desc->tfm, out);
+	return 0;
+}
+
+static inline struct crypto_tfm *crypto_alloc_hash(const char *alg_name,
+                                                   u32 type, u32 mask)
+{
+	struct crypto_tfm *ret = crypto_alloc_tfm(alg_name ,type);
+	return ret ? ret : ERR_PTR(-ENOMEM);
+}
+
+static inline void crypto_free_hash(struct crypto_tfm *tfm)
+{
+	crypto_free_tfm(tfm);
+}
 
 #endif
diff --git a/kernel_addons/backport/2.6.9_U4/include/linux/crypto.h b/kernel_addons/backport/2.6.9_U4/include/linux/crypto.h
index aecccde..0f02f6f 100644
--- a/kernel_addons/backport/2.6.9_U4/include/linux/crypto.h
+++ b/kernel_addons/backport/2.6.9_U4/include/linux/crypto.h
@@ -1,11 +1,54 @@
-#ifndef LINUX_CRYPTO_BACKPORT_H
-#define LINUX_CRYPTO_BACKPORT_H
+#ifndef BACKPORT_LINUX_CRYPTO_H
+#define BACKPORT_LINUX_CRYPTO_H
 
 #include_next <linux/crypto.h>
 
-#define crypto_hash_init(desc) crypto_digest_init(*desc)
-#define crypto_hash_digest(desc, sg, nbytes, out) crypto_digest_digest(*desc, sg, 1, out)
-#define crypto_hash_update(desc, sg, nbytes) crypto_digest_update(*desc, sg, 1)
-#define crypto_hash_final(desc, out) crypto_digest_final(*desc, out)
+#define CRYPTO_ALG_ASYNC               0x00000080
+
+struct hash_desc
+{
+	struct crypto_tfm *tfm;
+	u32 flags;
+};
+
+static inline int crypto_hash_init(struct hash_desc *desc)
+{
+	crypto_digest_init(desc->tfm);
+	return 0;
+}
+
+static inline int crypto_hash_digest(struct hash_desc *desc,
+                                    struct scatterlist *sg,
+                                    unsigned int nbytes, u8 *out)
+{
+	crypto_digest_digest(desc->tfm, sg, (nbytes+(PAGE_SIZE-1)) / PAGE_SIZE, out);
+	return nbytes;
+}
+
+static inline int crypto_hash_update(struct hash_desc *desc,
+                                    struct scatterlist *sg,
+                                    unsigned int nbytes)
+{
+	crypto_digest_update(desc->tfm, sg, (nbytes+(PAGE_SIZE-1)) / PAGE_SIZE);
+	return nbytes;
+}
+
+static inline int crypto_hash_final(struct hash_desc *desc, u8 *out)
+{
+	crypto_digest_final(desc->tfm, out);
+	return 0;
+}
+
+static inline struct crypto_tfm *crypto_alloc_hash(const char *alg_name,
+                                                   u32 type, u32 mask)
+{
+	struct crypto_tfm *ret = crypto_alloc_tfm(alg_name ,type);
+	return ret ? ret : ERR_PTR(-ENOMEM);
+}
+
+static inline void crypto_free_hash(struct crypto_tfm *tfm)
+{
+	crypto_free_tfm(tfm);
+}
 
 #endif
diff --git a/kernel_addons/backport/2.6.9_U5/include/linux/crypto.h b/kernel_addons/backport/2.6.9_U5/include/linux/crypto.h
index aecccde..0f02f6f 100644
--- a/kernel_addons/backport/2.6.9_U5/include/linux/crypto.h
+++ b/kernel_addons/backport/2.6.9_U5/include/linux/crypto.h
@@ -1,11 +1,54 @@
-#ifndef LINUX_CRYPTO_BACKPORT_H
-#define LINUX_CRYPTO_BACKPORT_H
+#ifndef BACKPORT_LINUX_CRYPTO_H
+#define BACKPORT_LINUX_CRYPTO_H
 
 #include_next <linux/crypto.h>
 
-#define crypto_hash_init(desc) crypto_digest_init(*desc)
-#define crypto_hash_digest(desc, sg, nbytes, out) crypto_digest_digest(*desc, sg, 1, out)
-#define crypto_hash_update(desc, sg, nbytes) crypto_digest_update(*desc, sg, 1)
-#define crypto_hash_final(desc, out) crypto_digest_final(*desc, out)
+#define CRYPTO_ALG_ASYNC               0x00000080
+
+struct hash_desc
+{
+	struct crypto_tfm *tfm;
+	u32 flags;
+};
+
+static inline int crypto_hash_init(struct hash_desc *desc)
+{
+	crypto_digest_init(desc->tfm);
+	return 0;
+}
+
+static inline int crypto_hash_digest(struct hash_desc *desc,
+                                    struct scatterlist *sg,
+                                    unsigned int nbytes, u8 *out)
+{
+	crypto_digest_digest(desc->tfm, sg, (nbytes+(PAGE_SIZE-1)) / PAGE_SIZE, out);
+	return nbytes;
+}
+
+static inline int crypto_hash_update(struct hash_desc *desc,
+                                    struct scatterlist *sg,
+                                    unsigned int nbytes)
+{
+	crypto_digest_update(desc->tfm, sg, (nbytes+(PAGE_SIZE-1)) / PAGE_SIZE);
+	return nbytes;
+}
+
+static inline int crypto_hash_final(struct hash_desc *desc, u8 *out)
+{
+	crypto_digest_final(desc->tfm, out);
+	return 0;
+}
+
+static inline struct crypto_tfm *crypto_alloc_hash(const char *alg_name,
+                                                   u32 type, u32 mask)
+{
+	struct crypto_tfm *ret = crypto_alloc_tfm(alg_name ,type);
+	return ret ? ret : ERR_PTR(-ENOMEM);
+}
+
+static inline void crypto_free_hash(struct crypto_tfm *tfm)
+{
+	crypto_free_tfm(tfm);
+}
 
 #endif
diff --git a/kernel_patches/backport/2.6.9_U3/add_open_iscsi.patch b/kernel_patches/backport/2.6.9_U3/add_open_iscsi.patch
index a339163..800d39b 100644
--- a/kernel_patches/backport/2.6.9_U3/add_open_iscsi.patch
+++ b/kernel_patches/backport/2.6.9_U3/add_open_iscsi.patch
@@ -1,67 +1,6 @@
 diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.c linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.c
 --- linux-2.6.20/drivers/scsi/iscsi_tcp.c	2007-02-04 20:44:54.000000000 +0200
 +++ linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.c	2007-05-17 16:55:43.000000000 +0300
-@@ -676,7 +676,7 @@ iscsi_tcp_copy(struct iscsi_conn *conn, 
- }
- 
- static inline void
--partial_sg_digest_update(struct hash_desc *desc, struct scatterlist *sg,
-+partial_sg_digest_update(struct crypto_tfm *desc, struct scatterlist *sg,
- 			 int offset, int length)
- {
- 	struct scatterlist temp;
-@@ -684,7 +684,7 @@ partial_sg_digest_update(struct hash_des
- 	memcpy(&temp, sg, sizeof(struct scatterlist));
- 	temp.offset = offset;
- 	temp.length = length;
--	crypto_hash_update(desc, &temp, length);
-+	crypto_hash_update(&desc, &temp, length);
- }
- 
- static void
-@@ -1774,22 +1774,18 @@ iscsi_tcp_conn_create(struct iscsi_cls_s
- 	/* initial operational parameters */
- 	tcp_conn->hdr_size = sizeof(struct iscsi_hdr);
- 
--	tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0,
--						  CRYPTO_ALG_ASYNC);
--	tcp_conn->tx_hash.flags = 0;
--	if (IS_ERR(tcp_conn->tx_hash.tfm))
-+	tcp_conn->tx_hash = crypto_alloc_tfm("crc32c", 0);
-+	if (!tcp_conn->tx_hash)
- 		goto free_tcp_conn;
- 
--	tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
--						  CRYPTO_ALG_ASYNC);
--	tcp_conn->rx_hash.flags = 0;
--	if (IS_ERR(tcp_conn->rx_hash.tfm))
-+	tcp_conn->rx_hash = crypto_alloc_tfm("crc32c", 0);
-+	if (!tcp_conn->rx_hash)
- 		goto free_tx_tfm;
- 
- 	return cls_conn;
- 
- free_tx_tfm:
--	crypto_free_hash(tcp_conn->tx_hash.tfm);
-+	crypto_free_tfm(tcp_conn->tx_hash);
- free_tcp_conn:
- 	kfree(tcp_conn);
- tcp_conn_alloc_fail:
-@@ -1823,10 +1819,10 @@ iscsi_tcp_conn_destroy(struct iscsi_cls_
- 	iscsi_tcp_release_conn(conn);
- 	iscsi_conn_teardown(cls_conn);
- 
--	if (tcp_conn->tx_hash.tfm)
--		crypto_free_hash(tcp_conn->tx_hash.tfm);
--	if (tcp_conn->rx_hash.tfm)
--		crypto_free_hash(tcp_conn->rx_hash.tfm);
-+	if (tcp_conn->tx_hash)
-+		crypto_free_tfm(tcp_conn->tx_hash);
-+	if (tcp_conn->rx_hash)
-+		crypto_free_tfm(tcp_conn->rx_hash);
- 
- 	kfree(tcp_conn);
- }
 @@ -2017,7 +2013,7 @@ iscsi_tcp_conn_get_param(struct iscsi_cl
  {
  	struct iscsi_conn *conn = cls_conn->dd_data;
@@ -79,28 +18,6 @@ diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.c linux-2.6.20-rh4-backport/driver
  	.can_queue		= ISCSI_XMIT_CMDS_MAX - 1,
  	.sg_tablesize		= ISCSI_SG_TABLESIZE,
  	.cmd_per_lun		= ISCSI_DEF_CMD_PER_LUN,
-diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.h linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.h
---- linux-2.6.20/drivers/scsi/iscsi_tcp.h	2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.h	2007-05-17 16:38:14.000000000 +0300
-@@ -49,7 +49,6 @@
- #define ISCSI_SG_TABLESIZE		SG_ALL
- #define ISCSI_TCP_MAX_CMD_LEN		16
- 
--struct crypto_hash;
- struct socket;
- 
- /* Socket connection recieve helper */
-@@ -93,8 +92,8 @@ struct iscsi_tcp_conn {
- 	void			(*old_write_space)(struct sock *);
- 
- 	/* data and header digests */
--	struct hash_desc	tx_hash;	/* CRC32C (Tx) */
--	struct hash_desc	rx_hash;	/* CRC32C (Rx) */
-+	struct crypto_tfm	*tx_hash;	/* CRC32C (Tx) */
-+	struct crypto_tfm	*rx_hash;	/* CRC32C (Rx) */
- 
- 	/* MIB custom statistics */
- 	uint32_t		sendpage_failures_cnt;
 diff -rup linux-2.6.20/drivers/scsi/libiscsi.c linux-2.6.20-rh4-backport/drivers/scsi/libiscsi.c
 --- linux-2.6.20/drivers/scsi/libiscsi.c	2007-02-04 20:44:54.000000000 +0200
 +++ linux-2.6.20-rh4-backport/drivers/scsi/libiscsi.c	2007-05-17 16:38:14.000000000 +0300
diff --git a/kernel_patches/backport/2.6.9_U4/add_open_iscsi.patch b/kernel_patches/backport/2.6.9_U4/add_open_iscsi.patch
index a339163..800d39b 100644
--- a/kernel_patches/backport/2.6.9_U4/add_open_iscsi.patch
+++ b/kernel_patches/backport/2.6.9_U4/add_open_iscsi.patch
@@ -1,67 +1,6 @@
 diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.c linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.c
 --- linux-2.6.20/drivers/scsi/iscsi_tcp.c	2007-02-04 20:44:54.000000000 +0200
 +++ linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.c	2007-05-17 16:55:43.000000000 +0300
-@@ -676,7 +676,7 @@ iscsi_tcp_copy(struct iscsi_conn *conn, 
- }
- 
- static inline void
--partial_sg_digest_update(struct hash_desc *desc, struct scatterlist *sg,
-+partial_sg_digest_update(struct crypto_tfm *desc, struct scatterlist *sg,
- 			 int offset, int length)
- {
- 	struct scatterlist temp;
-@@ -684,7 +684,7 @@ partial_sg_digest_update(struct hash_des
- 	memcpy(&temp, sg, sizeof(struct scatterlist));
- 	temp.offset = offset;
- 	temp.length = length;
--	crypto_hash_update(desc, &temp, length);
-+	crypto_hash_update(&desc, &temp, length);
- }
- 
- static void
-@@ -1774,22 +1774,18 @@ iscsi_tcp_conn_create(struct iscsi_cls_s
- 	/* initial operational parameters */
- 	tcp_conn->hdr_size = sizeof(struct iscsi_hdr);
- 
--	tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0,
--						  CRYPTO_ALG_ASYNC);
--	tcp_conn->tx_hash.flags = 0;
--	if (IS_ERR(tcp_conn->tx_hash.tfm))
-+	tcp_conn->tx_hash = crypto_alloc_tfm("crc32c", 0);
-+	if (!tcp_conn->tx_hash)
- 		goto free_tcp_conn;
- 
--	tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
--						  CRYPTO_ALG_ASYNC);
--	tcp_conn->rx_hash.flags = 0;
--	if (IS_ERR(tcp_conn->rx_hash.tfm))
-+	tcp_conn->rx_hash = crypto_alloc_tfm("crc32c", 0);
-+	if (!tcp_conn->rx_hash)
- 		goto free_tx_tfm;
- 
- 	return cls_conn;
- 
- free_tx_tfm:
--	crypto_free_hash(tcp_conn->tx_hash.tfm);
-+	crypto_free_tfm(tcp_conn->tx_hash);
- free_tcp_conn:
- 	kfree(tcp_conn);
- tcp_conn_alloc_fail:
-@@ -1823,10 +1819,10 @@ iscsi_tcp_conn_destroy(struct iscsi_cls_
- 	iscsi_tcp_release_conn(conn);
- 	iscsi_conn_teardown(cls_conn);
- 
--	if (tcp_conn->tx_hash.tfm)
--		crypto_free_hash(tcp_conn->tx_hash.tfm);
--	if (tcp_conn->rx_hash.tfm)
--		crypto_free_hash(tcp_conn->rx_hash.tfm);
-+	if (tcp_conn->tx_hash)
-+		crypto_free_tfm(tcp_conn->tx_hash);
-+	if (tcp_conn->rx_hash)
-+		crypto_free_tfm(tcp_conn->rx_hash);
- 
- 	kfree(tcp_conn);
- }
 @@ -2017,7 +2013,7 @@ iscsi_tcp_conn_get_param(struct iscsi_cl
  {
  	struct iscsi_conn *conn = cls_conn->dd_data;
@@ -79,28 +18,6 @@ diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.c linux-2.6.20-rh4-backport/driver
  	.can_queue		= ISCSI_XMIT_CMDS_MAX - 1,
  	.sg_tablesize		= ISCSI_SG_TABLESIZE,
  	.cmd_per_lun		= ISCSI_DEF_CMD_PER_LUN,
-diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.h linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.h
---- linux-2.6.20/drivers/scsi/iscsi_tcp.h	2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.h	2007-05-17 16:38:14.000000000 +0300
-@@ -49,7 +49,6 @@
- #define ISCSI_SG_TABLESIZE		SG_ALL
- #define ISCSI_TCP_MAX_CMD_LEN		16
- 
--struct crypto_hash;
- struct socket;
- 
- /* Socket connection recieve helper */
-@@ -93,8 +92,8 @@ struct iscsi_tcp_conn {
- 	void			(*old_write_space)(struct sock *);
- 
- 	/* data and header digests */
--	struct hash_desc	tx_hash;	/* CRC32C (Tx) */
--	struct hash_desc	rx_hash;	/* CRC32C (Rx) */
-+	struct crypto_tfm	*tx_hash;	/* CRC32C (Tx) */
-+	struct crypto_tfm	*rx_hash;	/* CRC32C (Rx) */
- 
- 	/* MIB custom statistics */
- 	uint32_t		sendpage_failures_cnt;
 diff -rup linux-2.6.20/drivers/scsi/libiscsi.c linux-2.6.20-rh4-backport/drivers/scsi/libiscsi.c
 --- linux-2.6.20/drivers/scsi/libiscsi.c	2007-02-04 20:44:54.000000000 +0200
 +++ linux-2.6.20-rh4-backport/drivers/scsi/libiscsi.c	2007-05-17 16:38:14.000000000 +0300
diff --git a/kernel_patches/backport/2.6.9_U5/add_open_iscsi.patch b/kernel_patches/backport/2.6.9_U5/add_open_iscsi.patch
index a339163..800d39b 100644
--- a/kernel_patches/backport/2.6.9_U5/add_open_iscsi.patch
+++ b/kernel_patches/backport/2.6.9_U5/add_open_iscsi.patch
@@ -1,67 +1,6 @@
 diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.c linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.c
 --- linux-2.6.20/drivers/scsi/iscsi_tcp.c	2007-02-04 20:44:54.000000000 +0200
 +++ linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.c	2007-05-17 16:55:43.000000000 +0300
-@@ -676,7 +676,7 @@ iscsi_tcp_copy(struct iscsi_conn *conn, 
- }
- 
- static inline void
--partial_sg_digest_update(struct hash_desc *desc, struct scatterlist *sg,
-+partial_sg_digest_update(struct crypto_tfm *desc, struct scatterlist *sg,
- 			 int offset, int length)
- {
- 	struct scatterlist temp;
-@@ -684,7 +684,7 @@ partial_sg_digest_update(struct hash_des
- 	memcpy(&temp, sg, sizeof(struct scatterlist));
- 	temp.offset = offset;
- 	temp.length = length;
--	crypto_hash_update(desc, &temp, length);
-+	crypto_hash_update(&desc, &temp, length);
- }
- 
- static void
-@@ -1774,22 +1774,18 @@ iscsi_tcp_conn_create(struct iscsi_cls_s
- 	/* initial operational parameters */
- 	tcp_conn->hdr_size = sizeof(struct iscsi_hdr);
- 
--	tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0,
--						  CRYPTO_ALG_ASYNC);
--	tcp_conn->tx_hash.flags = 0;
--	if (IS_ERR(tcp_conn->tx_hash.tfm))
-+	tcp_conn->tx_hash = crypto_alloc_tfm("crc32c", 0);
-+	if (!tcp_conn->tx_hash)
- 		goto free_tcp_conn;
- 
--	tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
--						  CRYPTO_ALG_ASYNC);
--	tcp_conn->rx_hash.flags = 0;
--	if (IS_ERR(tcp_conn->rx_hash.tfm))
-+	tcp_conn->rx_hash = crypto_alloc_tfm("crc32c", 0);
-+	if (!tcp_conn->rx_hash)
- 		goto free_tx_tfm;
- 
- 	return cls_conn;
- 
- free_tx_tfm:
--	crypto_free_hash(tcp_conn->tx_hash.tfm);
-+	crypto_free_tfm(tcp_conn->tx_hash);
- free_tcp_conn:
- 	kfree(tcp_conn);
- tcp_conn_alloc_fail:
-@@ -1823,10 +1819,10 @@ iscsi_tcp_conn_destroy(struct iscsi_cls_
- 	iscsi_tcp_release_conn(conn);
- 	iscsi_conn_teardown(cls_conn);
- 
--	if (tcp_conn->tx_hash.tfm)
--		crypto_free_hash(tcp_conn->tx_hash.tfm);
--	if (tcp_conn->rx_hash.tfm)
--		crypto_free_hash(tcp_conn->rx_hash.tfm);
-+	if (tcp_conn->tx_hash)
-+		crypto_free_tfm(tcp_conn->tx_hash);
-+	if (tcp_conn->rx_hash)
-+		crypto_free_tfm(tcp_conn->rx_hash);
- 
- 	kfree(tcp_conn);
- }
 @@ -2017,7 +2013,7 @@ iscsi_tcp_conn_get_param(struct iscsi_cl
  {
  	struct iscsi_conn *conn = cls_conn->dd_data;
@@ -79,28 +18,6 @@ diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.c linux-2.6.20-rh4-backport/driver
  	.can_queue		= ISCSI_XMIT_CMDS_MAX - 1,
  	.sg_tablesize		= ISCSI_SG_TABLESIZE,
  	.cmd_per_lun		= ISCSI_DEF_CMD_PER_LUN,
-diff -rup linux-2.6.20/drivers/scsi/iscsi_tcp.h linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.h
---- linux-2.6.20/drivers/scsi/iscsi_tcp.h	2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20-rh4-backport/drivers/scsi/iscsi_tcp.h	2007-05-17 16:38:14.000000000 +0300
-@@ -49,7 +49,6 @@
- #define ISCSI_SG_TABLESIZE		SG_ALL
- #define ISCSI_TCP_MAX_CMD_LEN		16
- 
--struct crypto_hash;
- struct socket;
- 
- /* Socket connection recieve helper */
-@@ -93,8 +92,8 @@ struct iscsi_tcp_conn {
- 	void			(*old_write_space)(struct sock *);
- 
- 	/* data and header digests */
--	struct hash_desc	tx_hash;	/* CRC32C (Tx) */
--	struct hash_desc	rx_hash;	/* CRC32C (Rx) */
-+	struct crypto_tfm	*tx_hash;	/* CRC32C (Tx) */
-+	struct crypto_tfm	*rx_hash;	/* CRC32C (Rx) */
- 
- 	/* MIB custom statistics */
- 	uint32_t		sendpage_failures_cnt;
 diff -rup linux-2.6.20/drivers/scsi/libiscsi.c linux-2.6.20-rh4-backport/drivers/scsi/libiscsi.c
 --- linux-2.6.20/drivers/scsi/libiscsi.c	2007-02-04 20:44:54.000000000 +0200
 +++ linux-2.6.20-rh4-backport/drivers/scsi/libiscsi.c	2007-05-17 16:38:14.000000000 +0300
-- 
1.5.2





More information about the ewg mailing list