[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAjsZQz2orPoBS-yRYQcBEv3mzUHrAiyqB-jti5RTyx39HOVjA@mail.gmail.com>
Date: Sat, 3 Aug 2024 10:21:22 +0900
From: Moon Yeounsu <yyyynoom@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: cooldavid@...ldavid.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: use ip_hdrlen() instead of bit shift
On Fri, Aug 2, 2024 at 10:35 PM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
> The extra () around "ip_hdrlen(skb)" can be remove.
> Also maybe the ones around "ETH_HLEN + ip_hdrlen(skb)" could also be
> removed.
Okay, I'll send the next patch which the parenthesis are removed!
But... The parenthesis around `ETH_HLEN + ip_hdrlen(skb) +
sizeof(struct udphdr)`
should be retained, because it makes a clear boundary.
>
> > skb_reset_network_header(skb);
> > return csum;
> > }
> > - skb_set_transport_header(skb,
> > - ETH_HLEN + (ip_hdr(skb)->ihl << 2));
> > + skb_set_transport_header(skb, ETH_HLEN + (ip_hdrlen(skb)));
>
> Same here, the extra () around "ip_hdrlen(skb)" can be remove.
I'll remove it also.
>
> CJ
>
> > csum = udp_hdr(skb)->check;
> > skb_reset_transport_header(skb);
> > skb_reset_network_header(skb);
>
Thank you for reviewing ^오^
Powered by blists - more mailing lists