[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW3PR11MB4522BCE8D08A318E2EF2DF5E8F270@MW3PR11MB4522.namprd11.prod.outlook.com>
Date: Thu, 10 Sep 2020 21:06:05 +0000
From: "Brady, Alan" <alan.brady@...el.com>
To: Jakub Kicinski <kuba@...nel.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"Michael, Alice" <alice.michael@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
"Burra, Phani R" <phani.r.burra@...el.com>,
"Hay, Joshua A" <joshua.a.hay@...el.com>,
"Chittim, Madhu" <madhu.chittim@...el.com>,
"Linga, Pavan Kumar" <pavan.kumar.linga@...el.com>,
"Skidmore, Donald C" <donald.c.skidmore@...el.com>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"Samudrala, Sridhar" <sridhar.samudrala@...el.com>
Subject: RE: [net-next v5 01/15] virtchnl: Extend AVF ops
> -----Original Message-----
> From: Brady, Alan
> Sent: Thursday, August 27, 2020 10:16 AM
> To: Jakub Kicinski <kuba@...nel.org>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>
> Cc: davem@...emloft.net; Michael, Alice <Alice.Michael@...el.com>;
> netdev@...r.kernel.org; nhorman@...hat.com; sassmann@...hat.com;
> Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>; Burra, Phani R
> <phani.r.burra@...el.com>; Hay, Joshua A <joshua.a.hay@...el.com>; Chittim,
> Madhu <madhu.chittim@...el.com>; Linga, Pavan Kumar
> <Pavan.Kumar.Linga@...el.com>; Skidmore, Donald C
> <donald.c.skidmore@...el.com>; Brandeburg, Jesse
> <jesse.brandeburg@...el.com>; Samudrala, Sridhar
> <sridhar.samudrala@...el.com>
> Subject: RE: [net-next v5 01/15] virtchnl: Extend AVF ops
>
> > -----Original Message-----
> > From: Jakub Kicinski <kuba@...nel.org>
> > Sent: Monday, August 24, 2020 12:43 PM
> > To: Nguyen, Anthony L <anthony.l.nguyen@...el.com>
> > Cc: davem@...emloft.net; Michael, Alice <alice.michael@...el.com>;
> > netdev@...r.kernel.org; nhorman@...hat.com; sassmann@...hat.com;
> > Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>; Brady, Alan
> > <alan.brady@...el.com>; Burra, Phani R <phani.r.burra@...el.com>; Hay,
> > Joshua A <joshua.a.hay@...el.com>; Chittim, Madhu
> > <madhu.chittim@...el.com>; Linga, Pavan Kumar
> > <pavan.kumar.linga@...el.com>; Skidmore, Donald C
> > <donald.c.skidmore@...el.com>; Brandeburg, Jesse
> > <jesse.brandeburg@...el.com>; Samudrala, Sridhar
> > <sridhar.samudrala@...el.com>
> > Subject: Re: [net-next v5 01/15] virtchnl: Extend AVF ops
> >
> > On Mon, 24 Aug 2020 10:32:52 -0700 Tony Nguyen wrote:
> > > +struct virtchnl_rss_hash {
> > > + u64 hash;
> > > + u16 vport_id;
> > > +};
> > > +
> > > +VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
> >
> > I've added 32bit builds to my local setup since v4 was posted - looks
> > like there's a number of errors here. You can't assume u64 forces a
> > 64bit alignment. Best to specify the padding explicitly.
> >
> > FWIW these are the errors I got but there may be more:
> >
>
> It seems like these are triggering on old messages too, curious why this wasn't
> caught sooner. Will fix, thanks.
>
> -Alan
I managed to get a 32-bit build environment setup and found that we do indeed have alignment issues there on 32 bit systems for some of the new ops we added with the series. However, I think I'm still missing something as it looks like you have errors triggering on much more than I found and I'm suspecting there might be a compile option I'm missing or perhaps my GCC version is older than yours. E.g., I found issues in virtchnl_txq_info_v2, virtchnl_rxq_info_v2, virtchnl_config_rx_queues, and virtchnl_rss_hash. It appears you have compile issues in virtchnl_get_capabilities (among others) however which did not trigger on mine. Manual inspection indicates that it _should_ be triggering a failure and that your setup is more correct than mine. I'm guessing some extra padding is getting included in some places and causing a false positive on the other alignment issues. Are there any hints you can provide me that might help me more accurately reproduce this?
-Alan
Powered by blists - more mailing lists