[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1496250043.27480.6.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 31 May 2017 10:00:43 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next 2/3] udp: avoid a cache miss on dequeue
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);
Powered by blists - more mailing lists