svn commit: r314378 - stable/11/sys/dev/iscsi
Alexander Motin
mav at FreeBSD.org
Tue Feb 28 06:30:44 UTC 2017
Author: mav
Date: Tue Feb 28 06:30:42 2017
New Revision: 314378
URL: https://svnweb.freebsd.org/changeset/base/314378
Log:
MFC r313739: Directly call m_gethdr() instead of m_getm2() for BHS.
All this code is based on assumption that data will be stored in one piece,
and since buffer size if known and fixed, it is easier to hardcode it.
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 Tue Feb 28 06:29:44 2017 (r314377)
+++ stable/11/sys/dev/iscsi/icl_soft.c Tue Feb 28 06:30:42 2017 (r314378)
@@ -260,8 +260,8 @@ icl_soft_conn_new_pdu(struct icl_conn *i
if (ip == NULL)
return (NULL);
- ip->ip_bhs_mbuf = m_getm2(NULL, sizeof(struct iscsi_bhs),
- flags, MT_DATA, M_PKTHDR);
+ CTASSERT(sizeof(struct iscsi_bhs) <= MHLEN);
+ ip->ip_bhs_mbuf = m_gethdr(flags, MT_DATA);
if (ip->ip_bhs_mbuf == NULL) {
ICL_WARN("failed to allocate BHS mbuf");
icl_pdu_free(ip);
More information about the svn-src-all
mailing list