svn commit: r360571 - in head/sys: kern sys
Gleb Smirnoff
glebius at FreeBSD.org
Sat May 2 22:49:15 UTC 2020
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;
More information about the svn-src-all
mailing list