Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2017 03:52:32 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r314323 - stable/11/sys/dev/iscsi
Message-ID:  <201702270352.v1R3qWxd062510@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Feb 27 03:52:32 2017
New Revision: 314323
URL: https://svnweb.freebsd.org/changeset/base/314323

Log:
  MFC r313707: Remove M_PKTHDR from m_getm2() in icl_pdu_append_data().
  
  ip_data_mbuf is always appended to ip_bhs_mbuf, so it does not need own
  packet header.  This change first avoids allocation/initialization of the
  header, and then avoids dropping one when it later gets to socket buffer.

Modified:
  stable/11/sys/dev/iscsi/icl_soft.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/iscsi/icl_soft.c
==============================================================================
--- stable/11/sys/dev/iscsi/icl_soft.c	Mon Feb 27 00:10:00 2017	(r314322)
+++ stable/11/sys/dev/iscsi/icl_soft.c	Mon Feb 27 03:52:32 2017	(r314323)
@@ -1087,7 +1087,7 @@ icl_pdu_append_data(struct icl_pdu *requ
 
 	KASSERT(len > 0, ("len == 0"));
 
-	newmb = m_getm2(NULL, len, flags, MT_DATA, M_PKTHDR);
+	newmb = m_getm2(NULL, len, flags, MT_DATA, 0);
 	if (newmb == NULL) {
 		ICL_WARN("failed to allocate mbuf for %zd bytes", len);
 		return (ENOMEM);



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