Thread (19 messages) flat view 19 messages, 3 authors, 2018-11-02

Re: [RFC PATCH v3 06/10] udp: cope with UDP GRO packet misdirection

From: Paolo Abeni <pabeni@redhat.com>
Date: 2018-11-02 22:52:09

On Thu, 2018-11-01 at 17:01 -0400, Willem de Bruijn wrote:
On Wed, Oct 31, 2018 at 5:57 AM Paolo Abeni [off-list ref] wrote:
quoted
@@ -450,4 +457,32 @@ DECLARE_STATIC_KEY_FALSE(udpv6_encap_needed_key);
quoted
 void udpv6_encap_enable(void);
 #endif

+static inline struct sk_buff *udp_rcv_segment(struct sock *sk,
+                                           struct sk_buff *skb)
+{
+     bool ipv4 = skb->protocol == htons(ETH_P_IP);
And this cause a compile warning when # CONFIG_IPV6 is not set, I will
fix in the next iteration (again thanks kbuildbot)
Can also just pass it as argument. 
Agreed. 
This skb->protocol should work correctly
with tunneled packets, but it wasn't as immediately obvious to me.

Also

+       if (unlikely(!segs))
+               goto drop;

this should not happen. But if it could and the caller treats it the
same as error (both now return NULL), then skb needs to be freed.
Right you are. Will do in the next iteration.

Thanks,

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help