Thread (4 messages) flat view 4 messages, 2 authors, 25d ago
COLD25d

[PATCH 1/3] net: fix VLAN insert doc comment for shared-mbuf error code

From: William Bland <hidden>
Date: 2026-08-24 19:23:36
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

The implementation returns -EINVAL when the mbuf is shared or
indirect, but the doc comment inaccurately stated -EPERM.

Fixes: c974021a5949 ("ether: add soft vlan encap/decap")

Signed-off-by: William Bland <redacted>
---
 lib/net/rte_ether.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index c9a0b536c3..cb10d8fb06 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -387,7 +387,8 @@ static inline int rte_vlan_strip(struct rte_mbuf *m)
  *   The packet mbuf.
  * @return
  *   - 0: On success
- *   -EPERM: mbuf is shared overwriting would be unsafe
+ *   -EINVAL: overwriting would be unsafe because mbuf is shared or
+ *            indirect, or mbuf's first segment is too short
  *   -ENOSPC: not enough headroom in mbuf
  */
 static inline int rte_vlan_insert(struct rte_mbuf **m)
-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help