[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z07sQ8PvWQZrMQIW@debian>
Date: Tue, 3 Dec 2024 12:32:19 +0100
From: Guillaume Nault <gnault@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: David Miller <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
Simon Horman <horms@...nel.org>, David Ahern <dsahern@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>
Subject: Re: [PATCH net-next 1/4] vrf: Make pcpu_dstats update functions
available to other modules.
On Mon, Dec 02, 2024 at 07:59:24PM -0800, Jakub Kicinski wrote:
> On Mon, 2 Dec 2024 22:48:48 +0100 Guillaume Nault wrote:
> > - int len = skb->len;
> > netdev_tx_t ret = is_ip_tx_frame(skb, dev);
> > + unsigned int len = skb->len;
>
> You can't reorder skb->len init after is_ip_tx_frame().
> IDK what is_ stands for but that function xmits / frees the skb.
Yes, silly mistake. Sorry for not spotting that :/.
> You're already making this code cleaner, let's take another step
> forward and move that call out of line. Complex functions should not
> be called as part of variable init IMHO. It makes the code harder to
> read at best and error prone at worst..
Yes, fully agree. I'll post v2 tomorrow.
Powered by blists - more mailing lists