From 898fd11f5e73a82fd4e7e994dbdd13cc742e5e6d Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Mon, 13 Feb 2017 20:36:28 +0000 Subject: [PATCH] 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. MFC after: 2 weeks --- sys/dev/iscsi/icl_soft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 230a4145679..138e350ff4d 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);