[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ce783dc628699f02c45650c942f6735e93a18c4.camel@redhat.com>
Date: Tue, 05 Jun 2018 14:20:42 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Yafang Shao <laoar.shao@...il.com>, edumazet@...gle.com,
davem@...emloft.net
Cc: netdev@...r.kernel.org, inux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] ipv4: replace ip_hdr() with skb->data for
optimization
On Tue, 2018-06-05 at 08:04 -0400, Yafang Shao wrote:
> In ip receive path, when ip header hasn't been pulled yet, ip_hdr() and
> skb->data are pointing to the same byte.
>
> In ip output path, when ip header is just pushed, ip_hdr() and skb->data
> are pointing to the same byte.
>
> As ip_hdr() is more expensive than using skb->data, so replace ip_hdr()
> with skb->data in these situations for optimization.
IMHO this makes the code less readable and more error prone. Which kind
of performance improvement do you measure here?
Thanks,
Paolo
Powered by blists - more mailing lists