On Mon, 2017-05-29 at 17:27 +0200, Paolo Abeni wrote:
> Since UDP no more uses sk->destructor, we can clear completely
> the skb head state before enqueuing.

...

> @@ -1739,6 +1740,9 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct 
> sk_buff *skb)
>               sk_mark_napi_id_once(sk, skb);
>       }
>  
> +     /* drop all pending head states; dst, nf and sk are dropped by caller */
> +     secpath_reset(skb);
> +

I wonder if using skb_release_head_state() would be more appropriate ?

Surely more descriptive and probably not more expensive since all
cache lines should be already hot at this point.

>       rc = __udp_enqueue_schedule_skb(sk, skb);
>       if (rc < 0) {
>               int is_udplite = IS_UDPLITE(sk);


Reply via email to