[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d7ad6a9-2cd4-7936-7dc5-b6c79cd8c02e@akamai.com>
Date: Fri, 26 May 2023 14:54:07 -0700
From: Josh Hunt <johunt@...mai.com>
To: Pedro Tammela <pctammela@...atatu.com>,
Max Tottenham <mtottenh@...mai.com>, netdev@...r.kernel.org
Cc: Jamal Hadi Salim <jhs@...atatu.com>, Cong Wang
<xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>, Amir Vadai <amir@...ai.me>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2] net/sched: act_pedit: Parse L3 Header for L4 offset
On 5/26/23 7:03 AM, Pedro Tammela wrote:
> On 26/05/2023 10:47, Pedro Tammela wrote:
>>
>>> +
>>> + switch (skb->protocol) {
>>> + case htons(ETH_P_IP):
>>> + if (!pskb_may_pull(skb, sizeof(*iph) + noff))
>>> + goto out;
>>
>> I might have missed something but is this really needed?
>> https://urldefense.com/v3/__https://elixir.bootlin.com/linux/latest/source/net/ipv4/ip_input.c*L456__;Iw!!GjvTz_vk!TyuEOA10ZxgU7TBKFX6HAZ359qEMEuo3H0jNMIF1EP75tQbrs8uiSNQSpaaW4N34AH1sCdf5vHcUrV0qsw$
>
> Yes this obviously happens before the mentioned function.
> Now I'm wondering if it's not better to use skb_header_pointer() instead...
Can you elaborate on why you think it would be better?
Thanks
Josh
Powered by blists - more mailing lists