Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2016 14:57:37 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300211 - head/sys/dev/iscsi
Message-ID:  <201605191457.u4JEvbXV095085@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu May 19 14:57:37 2016
New Revision: 300211
URL: https://svnweb.freebsd.org/changeset/base/300211

Log:
  Make ICL proxy use kernel code for handling iSCSI sequence numbers
  for PDUs to/from iscsid(8).  This fixes StatSN for Logout PDUs sent
  by iscsi_session_logout().
  
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/iscsi.c	Thu May 19 14:45:34 2016	(r300210)
+++ head/sys/dev/iscsi/iscsi.c	Thu May 19 14:57:37 2016	(r300211)
@@ -713,6 +713,8 @@ iscsi_receive_callback(struct icl_pdu *r
 
 	ISCSI_SESSION_LOCK(is);
 
+	iscsi_pdu_update_statsn(response);
+
 #ifdef ICL_KERNEL_PROXY
 	if (is->is_login_phase) {
 		if (is->is_login_pdu == NULL)
@@ -725,8 +727,6 @@ iscsi_receive_callback(struct icl_pdu *r
 	}
 #endif
 
-	iscsi_pdu_update_statsn(response);
-	
 	/*
 	 * The handling routine is responsible for freeing the PDU
 	 * when it's no longer needed.
@@ -1620,9 +1620,7 @@ iscsi_ioctl_daemon_send(struct iscsi_sof
 		KASSERT(error == 0, ("icl_pdu_append_data(..., M_WAITOK) failed"));
 		free(data, M_ISCSI);
 	}
-	ISCSI_SESSION_LOCK(is);
-	icl_pdu_queue(ip);
-	ISCSI_SESSION_UNLOCK(is);
+	iscsi_pdu_queue(ip);
 
 	return (0);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605191457.u4JEvbXV095085>