From owner-svn-src-head@freebsd.org Mon Feb 13 20:36:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9092ECDD61C; Mon, 13 Feb 2017 20:36:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DBF4115; Mon, 13 Feb 2017 20:36:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1DKaSMB037924; Mon, 13 Feb 2017 20:36:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1DKaSEM037923; Mon, 13 Feb 2017 20:36:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201702132036.v1DKaSEM037923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 13 Feb 2017 20:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313707 - head/sys/dev/iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2017 20:36:29 -0000 Author: mav Date: Mon Feb 13 20:36:28 2017 New Revision: 313707 URL: https://svnweb.freebsd.org/changeset/base/313707 Log: 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 Modified: head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Mon Feb 13 20:13:29 2017 (r313706) +++ head/sys/dev/iscsi/icl_soft.c Mon Feb 13 20:36:28 2017 (r313707) @@ -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);