Thread (19 messages) 19 messages, 2 authors, 2h ago

Re: [PATCH net-next v4 04/10] ip_tunnel: add __iptunnel_pull_header_reason()

From: Ido Schimmel <idosch@nvidia.com>
Date: 2026-09-28 06:46:18
Also in: lkml

On Sat, Sep 26, 2026 at 02:12:15AM +0300, Anton Danilov wrote:
On Wed, Sep 23, 2026 at 06:41:14PM +0300, Ido Schimmel wrote:
quoted
Either append patches to this series or as a follow-up, after this
series the only caller of __iptunnel_pull_header() other than
iptunnel_pull_header() is the VXLAN driver and it should be converted to
report the actual drop reason instead of NOMEM:
...
quoted
Then remove __iptunnel_pull_header():
...
quoted
+static inline bool iptunnel_pull_header(struct sk_buff *skb, int hdr_len,
+					__be16 inner_proto, bool xnet)
...

Thanks, I will add both changes to v5.

One question before I send it: is there a reason to prefer bool here?
All the callers only test the result for failure, so bool works for
them, but coding-style.rst (section 16) says that a function whose name
is an action should return an error-code integer. I can keep the int
return, as it is in net-next now, or go with bool as in your diff,
whichever you prefer.
Looking at it again, why do we even need
__iptunnel_pull_header_reason()?

All the callers of __iptunnel_pull_header() and iptunnel_pull_header()
treat the return value as a boolean. Can't you just change their return
type to 'enum skb_drop_reason'?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help