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
This commit is contained in:
parent
8f3bba2d35
commit
898fd11f5e
@ -1087,7 +1087,7 @@ icl_pdu_append_data(struct icl_pdu *request, const void *addr, size_t len,
|
|||||||
|
|
||||||
KASSERT(len > 0, ("len == 0"));
|
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) {
|
if (newmb == NULL) {
|
||||||
ICL_WARN("failed to allocate mbuf for %zd bytes", len);
|
ICL_WARN("failed to allocate mbuf for %zd bytes", len);
|
||||||
return (ENOMEM);
|
return (ENOMEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user