Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175750984
D60688.id189684.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60688.id189684.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
@@ -925,7 +925,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
Wed, Oct 14, 1:02 AM (6 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40778754
Default Alt Text
D60688.id189684.diff (1 KB)
Attached To
Mode
D60688: mbuf: make m_pullup() an inline over most expected case
Attached
Detach File
Event Timeline
Log In to Comment