diff options
author | mav <mav@FreeBSD.org> | 2017-02-27 03:52:32 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2017-02-27 03:52:32 +0000 |
commit | eaff1b373b4fe4b2edab8cf843303ed4ce5bcfe6 (patch) | |
tree | 293a586449ce9388ba36c345a0dcd71675004326 | |
parent | e699ebd5d8a25277de419ba6fc22023c64dbf06f (diff) | |
download | FreeBSD-src-eaff1b373b4fe4b2edab8cf843303ed4ce5bcfe6.zip FreeBSD-src-eaff1b373b4fe4b2edab8cf843303ed4ce5bcfe6.tar.gz |
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.
-rw-r--r-- | sys/dev/iscsi/icl_soft.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 4efae9f..c6e2d06 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1087,7 +1087,7 @@ icl_pdu_append_data(struct icl_pdu *request, const void *addr, size_t len, 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); |