[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO6EAnXu1LO=erZYcm9UEcNBxVk=MwA4kKxAwfKq3fLntXzt0g@mail.gmail.com>
Date: Fri, 30 Aug 2024 11:37:15 -0400
From: Maksym Kutsevol <max@...sevol.com>
To: Breno Leitao <leitao@...ian.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] netcons: Add udp send fail statistics to netconsole
Hello Breno,
On Fri, Aug 30, 2024 at 10:12 AM Breno Leitao <leitao@...ian.org> wrote:
>
> Hello Maksym,
>
> On Fri, Aug 30, 2024 at 08:58:12AM -0400, Maksym Kutsevol wrote:
>
> > > I am not sure this if/else/endif is the best way. I am wondering if
> > > something like this would make the code simpler (uncompiled/untested):
>
> > Two calls in two different places to netpoll_send_udp bothers you or
> > the way it has to distinct cases for enabled/disabled and you prefer to
> > have it as added steps for the case when it's enabled?
>
> I would say both. I try to reduce as much as possible the number of
> similar calls and #else(s) is the goal.
>
> At the same time, I admit it is easier said than done, and Jakub is
> usually the one that helps me to reach the last mile.
I see, ok.
I was more looking for possible (maybe impossible) compiler
optimizations in this case.
but access to nt->np probably makes it impossible anyway, I don't know
compilers well
enough to say.
I'll make it an if then, e.g.
if (IS_ENABLED(CONFIG_NETCONSOLE_DYNAMIC)){
}
Powered by blists - more mailing lists