lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 net-next 2/2] tcp: minor optimization around tcp_hdr() usage in tcp receive path
On Tue, May 29, 2018 at 12:53 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>
> On 05/28/2018 05:41 PM, Yafang Shao wrote:
>
>> OK.
>>
>> And what about introducing a new helper tcp_hdr_fast() ?
>>
>> /* use it when tcp header has not been pulled yet */
>> static inline struct tcphdr *tcp_hdr_fast(const struct sk_buff *skb)
>>
>> {
>>
>> return (const struct tcphdr *)skb->data;
>>
>> }
>>
>>
>> That could help us to use this optimized one instead of the original
>> one if possilbe.
>
>
> I would rather not add such macro...
>
> The call site needs to know what is going on, so having a macro like that would not help.

OK

\
 
 \ /
  Last update: 2018-05-29 13:11    [W:0.051 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site