[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vev0g09sn4oD07=o7fefziQ06Qz0YOK=zhTKtOcbghBGg@mail.gmail.com>
Date: Wed, 26 Jul 2023 15:05:08 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: Andy Shevchenko <andy@...nel.org>, Yury Norov <yury.norov@...il.com>,
Marcin Szycik <marcin.szycik@...ux.intel.com>, intel-wired-lan@...ts.osuosl.org,
netdev@...r.kernel.org, wojciech.drewek@...el.com,
michal.swiatkowski@...ux.intel.com, davem@...emloft.net, kuba@...nel.org,
jiri@...nulli.us, pabeni@...hat.com, jesse.brandeburg@...el.com,
simon.horman@...igine.com, idosch@...dia.com
Subject: Re: [PATCH iwl-next v3 2/6] ip_tunnel: convert __be16 tunnel flags to bitmaps
On Wed, Jul 26, 2023 at 3:01 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Wed, Jul 26, 2023 at 2:11 PM Alexander Lobakin
> <aleksander.lobakin@...el.com> wrote:
> > From: Andy Shevchenko <andy@...nel.org>, Yury Norov <yury.norov@...il.com>
> > Date: Fri, 21 Jul 2023 17:42:12 +0300
...
> > >> + __set_bit(IP_TUNNEL_CSUM_BIT, info->key.tun_flags);
> > >> if (flags & BPF_F_ZERO_CSUM_TX)
> > >> - info->key.tun_flags &= ~TUNNEL_CSUM;
> > >> + __clear_bit(IP_TUNNEL_CSUM_BIT, info->key.tun_flags);
> > >
> > > Instead of set/clear, use assign, i.e. __asign_bit().
> >
> > Just to make it clear, you mean
> >
> > __assign_bit(IP_TUNNEL_CSUM_BIT, info->key.tun_flags,
> > flags & BPF_F_ZERO_CSUM_TX);
> >
> > right?
>
> Yes.
Actually in your case it's an inverted value, but you got the idea.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists