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
This commit is contained in:
Gleb Smirnoff 2020-05-02 22:49:14 +00:00
parent 4c9f0f982f
commit 7433a5a966
3 changed files with 4 additions and 5 deletions

View File

@ -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 @@ ktls_encrypt(struct mbuf_ext_pgs *pgs)
m->m_ext.ext_free = mb_free_mext_pgs;
/* Pages are now writable. */
pgs->flags |= MBUF_PEXT_FLAG_ANON;
pgs->flags |= EPG_FLAG_ANON;
}
/*

View File

@ -1678,7 +1678,7 @@ m_uiotombuf_nomap(struct uio *uio, int how, int len, int maxseg, int flags)
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:

View File

@ -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;