[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200423004358.GA2469@localhost.localdomain>
Date: Wed, 22 Apr 2020 21:43:58 -0300
From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
To: Vladimir Oltean <olteanv@...il.com>
Cc: kbuild test robot <lkp@...el.com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>, kbuild-all@...ts.01.org,
Ido Schimmel <idosch@...sch.org>,
"Allan W. Nielsen" <allan.nielsen@...rochip.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Antoine Tenart <antoine.tenart@...tlin.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Joergen Andreasen <joergen.andreasen@...rochip.com>
Subject: Re: [PATCH net-next 1/3] net: mscc: ocelot: support matching on
EtherType
On Thu, Apr 23, 2020 at 01:50:41AM +0300, Vladimir Oltean wrote:
> On Thu, 23 Apr 2020 at 01:36, kbuild test robot <lkp@...el.com> wrote:
> >
> > Hi Vladimir,
> >
>
> [...]
>
> >
> > sparse warnings: (new ones prefixed by >>)
> >
> > >> drivers/net/ethernet/mscc/ocelot_flower.c:184:54: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
>
> What's a resunsigned short?
Dunno, but seems "restricted unsigned short", considering the below.
>
> > >> drivers/net/ethernet/mscc/ocelot_flower.c:184:54: sparse: expected unsigned short [usertype]
> > >> drivers/net/ethernet/mscc/ocelot_flower.c:184:54: sparse: got restricted __be16 [usertype]
> >
>
> [...]
>
> > 179 if (match_protocol && proto != ETH_P_ALL) {
> > 180 /* TODO: support SNAP, LLC etc */
> > 181 if (proto < ETH_P_802_3_MIN)
> > 182 return -EOPNOTSUPP;
> > 183 ace->type = OCELOT_ACE_TYPE_ETYPE;
> > > 184 *(u16 *)ace->frame.etype.etype.value = htons(proto);
>
> What's wrong with this? Doesn't it like the left hand side or the
> right hand side?
It's assigning a big-endian value (network endian) to a host-endian
variable (u16 cast).
>
> > 185 *(u16 *)ace->frame.etype.etype.mask = 0xffff;
> > 186 }
>
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
> -Vladimir
>
Powered by blists - more mailing lists