Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177564477
D60688.1794744357.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D60688.1794744357.diff
View Options
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -926,7 +926,7 @@
* contiguous region in an attempt to avoid being called next time.
*/
struct mbuf *
-m_pullup(struct mbuf *n, int len)
+__m_pullup(struct mbuf *n, int len)
{
struct mbuf *m;
int count;
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -862,7 +862,7 @@
struct mbuf *m_prepend(struct mbuf *, int, int);
void m_print(const struct mbuf *, int);
struct mbuf *m_pulldown(struct mbuf *, int, int, int *);
-struct mbuf *m_pullup(struct mbuf *, int);
+struct mbuf *__m_pullup(struct mbuf *, int);
int m_sanity(struct mbuf *, int);
struct mbuf *m_split(struct mbuf *, int, int);
struct mbuf *m_uiotombuf(struct uio *, int, int, int, int);
@@ -877,6 +877,15 @@
void m_rcvif_serialize(struct mbuf *);
struct ifnet *m_rcvif_restore(struct mbuf *);
+static __inline struct mbuf *
+m_pullup(struct mbuf *m, int len)
+{
+ if (__predict_false(m->m_len < len))
+ return (__m_pullup(m, len));
+ else
+ return (m);
+}
+
static __inline int
m_gettype(int size)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 12:05 PM (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41742562
Default Alt Text
D60688.1794744357.diff (1 KB)
Attached To
Mode
D60688: mbuf: make m_pullup() an inline over most expected case
Attached
Detach File
Event Timeline