[openfabrics-ewg] [PATCH 2/4] IB/iSER: remove old iSER patches

Vladimir Sokolovsky vlad at dev.mellanox.co.il
Tue Jan 2 09:05:12 PST 2007


Applied.

Regards,
Vladimir

Erez Zilber wrote:
> Remove patches that were relevant for iSER in OFED 1.1 (add_conn_term.patch, include_libiscsi.patch, iser_get_set_param_removal.patch).
>
> diff -ruN ofa_1_2_kernel-20061228-0200/kernel_patches/backport/2.6.16_sles10/add_conn_term.patch ofa_1_2_kernel-20061228-0200-open-iscsi/kernel_patches/backport/2.6.16_sles10/add_conn_term.patch
> --- ofa_1_2_kernel-20061228-0200/kernel_patches/backport/2.6.16_sles10/add_conn_term.patch	2006-12-31 14:49:36.000000000 +0200
> +++ ofa_1_2_kernel-20061228-0200-open-iscsi/kernel_patches/backport/2.6.16_sles10/add_conn_term.patch	1970-01-01 02:00:00.000000000 +0200
> @@ -1,51 +0,0 @@
> -diff -rup openib-1.1/drivers/infiniband/ulp/iser/iscsi_iser.c openib-1.1-conn-term-backpatch/drivers/infiniband/ulp/iser/iscsi_iser.c
> ---- openib-1.1/drivers/infiniband/ulp/iser/iscsi_iser.c	2006-09-14 17:20:06.000000000 +0300
> -+++ openib-1.1-conn-term-backpatch/drivers/infiniband/ulp/iser/iscsi_iser.c	2006-09-17 15:02:05.000000000 +0300
> -@@ -378,6 +378,21 @@ iscsi_iser_conn_start(struct iscsi_cls_c
> - 	return iser_conn_set_full_featured_mode(conn);
> - }
> - 
> -+static void
> -+iscsi_iser_conn_terminate(struct iscsi_conn *conn)
> -+{
> -+	struct iscsi_iser_conn *iser_conn = conn->dd_data;
> -+	struct iser_conn *ib_conn = iser_conn->ib_conn;
> -+
> -+	BUG_ON(!ib_conn);
> -+	/* starts conn teardown process, waits until all previously   *
> -+	 * posted buffers get flushed, deallocates all conn resources */
> -+	iser_conn_terminate(ib_conn);
> -+	iser_conn->ib_conn = NULL;
> -+	conn->recv_lock = NULL;
> -+}
> -+
> -+
> - static struct iscsi_transport iscsi_iser_transport;
> - 
> - static struct iscsi_cls_session *
> -@@ -540,13 +555,13 @@ iscsi_iser_ep_poll(__u64 ep_handle, int 
> - static void
> - iscsi_iser_ep_disconnect(__u64 ep_handle)
> - {
> --	struct iser_conn *ib_conn;
> -+	struct iser_conn *ib_conn = iscsi_iser_ib_conn_lookup(ep_handle);
> - 
> --	ib_conn = iscsi_iser_ib_conn_lookup(ep_handle);
> - 	if (!ib_conn)
> - 		return;
> - 
> - 	iser_err("ib conn %p state %d\n",ib_conn, ib_conn->state);
> -+
> - 	iser_conn_terminate(ib_conn);
> - }
> - 
> -@@ -599,6 +614,9 @@ static struct iscsi_transport iscsi_iser
> - 	.get_session_param	= iscsi_session_get_param,
> - 	.start_conn             = iscsi_iser_conn_start,
> - 	.stop_conn              = iscsi_conn_stop,
> -+	/* these are called as part of conn recovery */
> -+	.suspend_conn_recv	= NULL, /* FIXME is/how this relvant to iser? */
> -+	.terminate_conn		= iscsi_iser_conn_terminate,
> - 	/* IO */
> - 	.send_pdu		= iscsi_conn_send_pdu,
> - 	.get_stats		= iscsi_iser_conn_get_stats,
> diff -ruN ofa_1_2_kernel-20061228-0200/kernel_patches/backport/2.6.16_sles10/include_libiscsi.patch ofa_1_2_kernel-20061228-0200-open-iscsi/kernel_patches/backport/2.6.16_sles10/include_libiscsi.patch
> --- ofa_1_2_kernel-20061228-0200/kernel_patches/backport/2.6.16_sles10/include_libiscsi.patch	2006-12-31 14:49:36.000000000 +0200
> +++ ofa_1_2_kernel-20061228-0200-open-iscsi/kernel_patches/backport/2.6.16_sles10/include_libiscsi.patch	1970-01-01 02:00:00.000000000 +0200
> @@ -1,10 +0,0 @@
> -diff --git a/drivers/infiniband/ulp/iser/Makefile b/drivers/infiniband/ulp/iser/Makefile
> -index fe6cd15..9e254ae 100644
> ---- a/drivers/infiniband/ulp/iser/Makefile
> -+++ b/drivers/infiniband/ulp/iser/Makefile
> -@@ -1,3 +1,5 @@
> -+EXTRA_CFLAGS += -Idrivers
> -+
> - obj-$(CONFIG_INFINIBAND_ISER)	+= ib_iser.o
> - 
> - ib_iser-y			:= iser_verbs.o iser_initiator.o iser_memory.o \
> diff -ruN ofa_1_2_kernel-20061228-0200/kernel_patches/backport/2.6.16_sles10/iser_get_set_param_removal.patch ofa_1_2_kernel-20061228-0200-open-iscsi/kernel_patches/backport/2.6.16_sles10/iser_get_set_param_removal.patch
> --- ofa_1_2_kernel-20061228-0200/kernel_patches/backport/2.6.16_sles10/iser_get_set_param_removal.patch	2006-12-31 14:49:36.000000000 +0200
> +++ ofa_1_2_kernel-20061228-0200-open-iscsi/kernel_patches/backport/2.6.16_sles10/iser_get_set_param_removal.patch	1970-01-01 02:00:00.000000000 +0200
> @@ -1,198 +0,0 @@
> -diff -ur openib-1.1/drivers/infiniband/ulp/iser/iscsi_iser.c openib-1.1.mod/drivers/infiniband/ulp/iser/iscsi_iser.c
> ---- openib-1.1/drivers/infiniband/ulp/iser/iscsi_iser.c	2006-08-31 14:49:37.000000000 +0300
> -+++ openib-1.1.mod/drivers/infiniband/ulp/iser/iscsi_iser.c	2006-07-07 12:38:59.000000000 +0300
> -@@ -437,50 +437,159 @@
> - }
> - 
> - static int
> --iscsi_iser_set_param(struct iscsi_cls_conn *cls_conn,
> --		     enum iscsi_param param, char *buf, int buflen)
> -+iscsi_iser_conn_set_param(struct iscsi_cls_conn *cls_conn,
> -+			  enum iscsi_param param, uint32_t value)
> - {
> --	int value;
> -+	struct iscsi_conn *conn = cls_conn->dd_data;
> -+	struct iscsi_session *session = conn->session;
> -+
> -+	spin_lock_bh(&session->lock);
> -+	if (conn->c_stage != ISCSI_CONN_INITIAL_STAGE &&
> -+	    conn->stop_stage != STOP_CONN_RECOVER) {
> -+		printk(KERN_ERR "iscsi_iser: can not change parameter [%d]\n",
> -+		       param);
> -+		spin_unlock_bh(&session->lock);
> -+		return 0;
> -+	}
> -+	spin_unlock_bh(&session->lock);
> - 
> - 	switch (param) {
> - 	case ISCSI_PARAM_MAX_RECV_DLENGTH:
> - 		/* TBD */
> - 		break;
> -+	case ISCSI_PARAM_MAX_XMIT_DLENGTH:
> -+		conn->max_xmit_dlength =  value;
> -+		break;
> - 	case ISCSI_PARAM_HDRDGST_EN:
> --		sscanf(buf, "%d", &value);
> - 		if (value) {
> - 			printk(KERN_ERR "DataDigest wasn't negotiated to None");
> - 			return -EPROTO;
> - 		}
> - 		break;
> - 	case ISCSI_PARAM_DATADGST_EN:
> --		sscanf(buf, "%d", &value);
> - 		if (value) {
> - 			printk(KERN_ERR "DataDigest wasn't negotiated to None");
> - 			return -EPROTO;
> - 		}
> - 		break;
> -+	case ISCSI_PARAM_INITIAL_R2T_EN:
> -+		session->initial_r2t_en = value;
> -+		break;
> -+	case ISCSI_PARAM_IMM_DATA_EN:
> -+		session->imm_data_en = value;
> -+		break;
> -+	case ISCSI_PARAM_FIRST_BURST:
> -+		session->first_burst = value;
> -+		break;
> -+	case ISCSI_PARAM_MAX_BURST:
> -+		session->max_burst = value;
> -+		break;
> -+	case ISCSI_PARAM_PDU_INORDER_EN:
> -+		session->pdu_inorder_en = value;
> -+		break;
> -+	case ISCSI_PARAM_DATASEQ_INORDER_EN:
> -+		session->dataseq_inorder_en = value;
> -+		break;
> -+	case ISCSI_PARAM_ERL:
> -+		session->erl = value;
> -+		break;
> - 	case ISCSI_PARAM_IFMARKER_EN:
> --		sscanf(buf, "%d", &value);
> - 		if (value) {
> - 			printk(KERN_ERR "IFMarker wasn't negotiated to No");
> - 			return -EPROTO;
> - 		}
> - 		break;
> - 	case ISCSI_PARAM_OFMARKER_EN:
> --		sscanf(buf, "%d", &value);
> - 		if (value) {
> - 			printk(KERN_ERR "OFMarker wasn't negotiated to No");
> - 			return -EPROTO;
> - 		}
> - 		break;
> - 	default:
> --		return iscsi_set_param(cls_conn, param, buf, buflen);
> -+		break;
> - 	}
> - 
> - 	return 0;
> - }
> - 
> -+static int
> -+iscsi_iser_session_get_param(struct iscsi_cls_session *cls_session,
> -+			     enum iscsi_param param, uint32_t *value)
> -+{
> -+	struct Scsi_Host *shost = iscsi_session_to_shost(cls_session);
> -+	struct iscsi_session *session = iscsi_hostdata(shost->hostdata);
> -+
> -+	switch (param) {
> -+	case ISCSI_PARAM_INITIAL_R2T_EN:
> -+		*value = session->initial_r2t_en;
> -+		break;
> -+	case ISCSI_PARAM_MAX_R2T:
> -+		*value = session->max_r2t;
> -+		break;
> -+	case ISCSI_PARAM_IMM_DATA_EN:
> -+		*value = session->imm_data_en;
> -+		break;
> -+	case ISCSI_PARAM_FIRST_BURST:
> -+		*value = session->first_burst;
> -+		break;
> -+	case ISCSI_PARAM_MAX_BURST:
> -+		*value = session->max_burst;
> -+		break;
> -+	case ISCSI_PARAM_PDU_INORDER_EN:
> -+		*value = session->pdu_inorder_en;
> -+		break;
> -+	case ISCSI_PARAM_DATASEQ_INORDER_EN:
> -+		*value = session->dataseq_inorder_en;
> -+		break;
> -+	case ISCSI_PARAM_ERL:
> -+		*value = session->erl;
> -+		break;
> -+	case ISCSI_PARAM_IFMARKER_EN:
> -+		*value = 0;
> -+		break;
> -+	case ISCSI_PARAM_OFMARKER_EN:
> -+		*value = 0;
> -+		break;
> -+	default:
> -+		return ISCSI_ERR_PARAM_NOT_FOUND;
> -+	}
> -+
> -+	return 0;
> -+}
> -+
> -+static int
> -+iscsi_iser_conn_get_param(struct iscsi_cls_conn *cls_conn,
> -+			  enum iscsi_param param, uint32_t *value)
> -+{
> -+	struct iscsi_conn *conn = cls_conn->dd_data;
> -+
> -+	switch(param) {
> -+	case ISCSI_PARAM_MAX_RECV_DLENGTH:
> -+		*value = conn->max_recv_dlength;
> -+		break;
> -+	case ISCSI_PARAM_MAX_XMIT_DLENGTH:
> -+		*value = conn->max_xmit_dlength;
> -+		break;
> -+	case ISCSI_PARAM_HDRDGST_EN:
> -+		*value = 0;
> -+		break;
> -+	case ISCSI_PARAM_DATADGST_EN:
> -+		*value = 0;
> -+		break;
> -+	/*case ISCSI_PARAM_TARGET_RECV_DLENGTH:
> -+		*value = conn->target_recv_dlength;
> -+		break;
> -+	case ISCSI_PARAM_INITIATOR_RECV_DLENGTH:
> -+		*value = conn->initiator_recv_dlength;
> -+		break;*/
> -+	default:
> -+		return ISCSI_ERR_PARAM_NOT_FOUND;
> -+	}
> -+
> -+	return 0;
> -+}
> -+
> -+
> - static void
> - iscsi_iser_conn_get_stats(struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats)
> - {
> -@@ -592,12 +701,7 @@
> - 				  ISCSI_FIRST_BURST |
> - 				  ISCSI_MAX_BURST |
> - 				  ISCSI_PDU_INORDER_EN |
> --				  ISCSI_DATASEQ_INORDER_EN |
> --				  ISCSI_EXP_STATSN |
> --				  ISCSI_PERSISTENT_PORT |
> --				  ISCSI_PERSISTENT_ADDRESS |
> --				  ISCSI_TARGET_NAME |
> --				  ISCSI_TPGT,
> -+				  ISCSI_DATASEQ_INORDER_EN,
> - 	.host_template          = &iscsi_iser_sht,
> - 	.conndata_size		= sizeof(struct iscsi_conn),
> - 	.max_lun                = ISCSI_ISER_MAX_LUN,
> -@@ -609,9 +713,9 @@
> - 	.create_conn            = iscsi_iser_conn_create,
> - 	.bind_conn              = iscsi_iser_conn_bind,
> - 	.destroy_conn           = iscsi_iser_conn_destroy,
> --	.set_param              = iscsi_iser_set_param,
> --	.get_conn_param		= iscsi_conn_get_param,
> --	.get_session_param	= iscsi_session_get_param,
> -+	.set_param              = iscsi_iser_conn_set_param,
> -+	.get_conn_param		= iscsi_iser_conn_get_param,
> -+	.get_session_param	= iscsi_iser_session_get_param,
> - 	.start_conn             = iscsi_iser_conn_start,
> - 	.stop_conn              = iscsi_conn_stop,
> - 	/* these are called as part of conn recovery */
>
>
> _______________________________________________
> openfabrics-ewg mailing list
> openfabrics-ewg at openib.org
> http://openib.org/mailman/listinfo/openfabrics-ewg
>   





More information about the ewg mailing list