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 <[email protected]>
---
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