From nobody Thu Dec 21 04:21:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Swch13Z6Rz54G36; Thu, 21 Dec 2023 04:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Swch12tz6z4YLc; Thu, 21 Dec 2023 04:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703132497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuboWrEbypGChhBZkZuGyP1kkmJniQreQoT9xwTCvvk=; b=jreZSnwOMO1m0eyaE45DJHAnTZm/Qna/L/e9ZAgi5gJpoSQ4GQxoSKMqaHf6ieXtpvfDhq 29cUZ3FNQcBgxE4/MoVQo/Gz/DyTRnZR2Mm8UjiPrtUT6V1r2FpadoFjfYlX70LDAbiADY hinFW5Guw7fSZ8dR+uRpn6zyj3GGfcjEvcbGn63gci8t3JurSGNX5GiunIHO9w7HWAs21p VpSJF6j+QQv4717ISL2LAe9YC4fGU9uO4IF3/DKG69tltTsukLXsm3b2GpJPbe2ReyVNoN U092+vv2lSVW685w58pQGjNPsmRyOZD6SmL/i7BpMYRJUG/k7t21Jutnpv+TtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703132497; a=rsa-sha256; cv=none; b=aUnXOu4xpTPvEVZZZpyOYonRCzHasK7zzMOmrstLFmNdI5UPluA8EXNAMviykLhkO7yXt6 dHIXxWwcFg4EkMnjj57IFmPGLV+SVARZzscQp7XVDjAkTPPluTg+z0AioqE1ZZyI56lgcL XJLemDjtXljKSb4WiRT9yW2UygiLY3Y0QleZxuKRf45HQmVdlHUQyr7ifSW7pH0IUUJgHe YRdXJhoOdLMNBfBn4AeSfsGF3ZNN4WSlWlPEVZLoOBO+XHzlKA2CT9AmlylZOllI19Dyix e9BRT+5uE+5hGmMPzasJobfyzjaL5fq8y9HtUO8Q+Q2Gl7C1GfXRf3PUSAGmsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703132497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuboWrEbypGChhBZkZuGyP1kkmJniQreQoT9xwTCvvk=; b=xYEfqV9zAwYnj7liYjPM/Jl0v05FDl51Umttl2rPyOTLGnaa7cM1g+v9EGYXCq5SQSvhvH ldil6S5yOY6sGBrgNXEWptlr5DxIO8A8rdUxY44kPpGTzPNWKLEd3c1V9HSNzunyxrWFSO le8JYMuZnNoXmMz0CJra2fzl0bNGtkUrIUppiJAHqk2fazc0gkmo+R35u5q+zPoVI2r7Ci VWShE7KJg4q0aVtVtu5lH92xKKz5/OVtEaYtJrTx8oKtaZI4FzWWHpqQ9TLQfrtpP5uLe1 3HoN+Crkh43MwnePPIgLeOU509uF2J9l+ckhwECJpGm36VPAJVBrLrc7DFFNPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Swch11wCpz3MH; Thu, 21 Dec 2023 04:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BL4Lb92036320; Thu, 21 Dec 2023 04:21:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BL4Lb9T036317; Thu, 21 Dec 2023 04:21:37 GMT (envelope-from git) Date: Thu, 21 Dec 2023 04:21:37 GMT Message-Id: <202312210421.3BL4Lb9T036317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9e6d11ce9a51 - main - vtnet: Adjust rx buffer so IP header 32-bit aligned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e6d11ce9a51d75ed6a94e180f2fb4e9188a2ba4 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9e6d11ce9a51d75ed6a94e180f2fb4e9188a2ba4 commit 9e6d11ce9a51d75ed6a94e180f2fb4e9188a2ba4 Author: Warner Losh AuthorDate: 2023-12-20 19:09:09 +0000 Commit: Warner Losh CommitDate: 2023-12-21 04:16:45 +0000 vtnet: Adjust rx buffer so IP header 32-bit aligned Call madj(m, ETHER_ALIGN) to offset rx buffers when allocating them. This improves performance everywhere, and allows armv7 to work at all. PR: 271288 (PR had a different fix than I wound up with) MFC After: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43136 --- sys/dev/virtio/network/if_vtnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 287af7751066..360176e4f845 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1532,8 +1532,8 @@ vtnet_rx_alloc_buf(struct vtnet_softc *sc, int nbufs, struct mbuf **m_tailp) m_freem(m_head); return (NULL); } - m->m_len = size; + m_adj(m, ETHER_ALIGN); if (m_head != NULL) { m_tail->m_next = m; m_tail = m;