From owner-svn-src-all@freebsd.org Sat May 2 22:49:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEF1D2C6979; Sat, 2 May 2020 22:49:15 +0000 (UTC) (envelope-from glebius@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49F46z5XFfz3HsJ; Sat, 2 May 2020 22:49:15 +0000 (UTC) (envelope-from glebius@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4DE6F95; Sat, 2 May 2020 22:49:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 042MnFQ3042158; Sat, 2 May 2020 22:49:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 042MnFHE042155; Sat, 2 May 2020 22:49:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202005022249.042MnFHE042155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 2 May 2020 22:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360571 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 360571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2020 22:49:15 -0000 Author: glebius Date: Sat May 2 22:49:14 2020 New Revision: 360571 URL: https://svnweb.freebsd.org/changeset/base/360571 Log: Start moving into EPG_/epg_ namespace. There is only one flag, but next commit brings in second flag, so let them already be in the future namespace. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D24598 Modified: head/sys/kern/uipc_ktls.c head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Sat May 2 22:44:23 2020 (r360570) +++ head/sys/kern/uipc_ktls.c Sat May 2 22:49:14 2020 (r360571) @@ -1545,7 +1545,7 @@ ktls_encrypt(struct mbuf_ext_pgs *pgs) * (from sendfile), anonymous wired pages are * allocated and assigned to the destination iovec. */ - is_anon = (pgs->flags & MBUF_PEXT_FLAG_ANON) != 0; + is_anon = (pgs->flags & EPG_FLAG_ANON) != 0; off = pgs->first_pg_off; for (i = 0; i < pgs->npgs; i++, off = 0) { @@ -1601,7 +1601,7 @@ retry_page: m->m_ext.ext_free = mb_free_mext_pgs; /* Pages are now writable. */ - pgs->flags |= MBUF_PEXT_FLAG_ANON; + pgs->flags |= EPG_FLAG_ANON; } /* Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sat May 2 22:44:23 2020 (r360570) +++ head/sys/kern/uipc_mbuf.c Sat May 2 22:49:14 2020 (r360571) @@ -1678,7 +1678,7 @@ m_uiotombuf_nomap(struct uio *uio, int how, int len, i prev->m_next = mb; prev = mb; pgs = &mb->m_ext_pgs; - pgs->flags = MBUF_PEXT_FLAG_ANON; + pgs->flags = EPG_FLAG_ANON; needed = length = MIN(maxseg, total); for (i = 0; needed > 0; i++, needed -= PAGE_SIZE) { retry_page: Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sat May 2 22:44:23 2020 (r360570) +++ head/sys/sys/mbuf.h Sat May 2 22:49:14 2020 (r360571) @@ -229,8 +229,6 @@ struct pkthdr { #define MBUF_PEXT_MAX_BYTES \ (MBUF_PEXT_MAX_PGS * PAGE_SIZE + MBUF_PEXT_HDR_LEN + MBUF_PEXT_TRAIL_LEN) -#define MBUF_PEXT_FLAG_ANON 1 /* Data can be encrypted in place. */ - struct ktls_session; struct socket; @@ -366,6 +364,7 @@ struct mbuf { uint16_t first_pg_off; uint16_t last_pg_len; uint8_t flags; +#define EPG_FLAG_ANON 0x1 /* Data can be encrypted in place. */ uint8_t record_type; uint8_t spare[2]; int enc_cnt;