git: 51346bd59458 - main - mbuf: Add EXT_CTL for mbufs backed by a CTL backend buffer

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 03 May 2024 00:16:08 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=51346bd594585614bc99f29a124a2473df3155bd

commit 51346bd594585614bc99f29a124a2473df3155bd
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-05-02 23:34:36 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-05-02 23:38:30 +0000

    mbuf: Add EXT_CTL for mbufs backed by a CTL backend buffer
    
    This is somewhat similar to EXT_NET_DRV, but CTL isn't a network
    driver.
    
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D44725
---
 sys/kern/kern_mbuf.c | 1 +
 sys/sys/mbuf.h       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index 0df807e47bd6..44b6584f7331 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -1212,6 +1212,7 @@ mb_free_ext(struct mbuf *m)
 			break;
 		case EXT_SFBUF:
 		case EXT_NET_DRV:
+		case EXT_CTL:
 		case EXT_MOD_TYPE:
 		case EXT_DISPOSABLE:
 			KASSERT(mref->m_ext.ext_free != NULL,
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index e13ba39c27aa..741ae1b7c387 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -593,6 +593,7 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff)
 #define	EXT_PACKET	6	/* mbuf+cluster from packet zone */
 #define	EXT_MBUF	7	/* external mbuf reference */
 #define	EXT_RXRING	8	/* data in NIC receive ring */
+#define	EXT_CTL		9	/* buffer from a ctl(4) backend */
 
 #define	EXT_VENDOR1	224	/* for vendor-internal use */
 #define	EXT_VENDOR2	225	/* for vendor-internal use */