[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR11MB2733AAB302567F2DA6AD818CF0639@SN6PR11MB2733.namprd11.prod.outlook.com>
Date: Fri, 26 Nov 2021 10:13:56 +0000
From: "Jagielski, Jedrzej" <jedrzej.jagielski@...el.com>
To: Jakub Kicinski <kuba@...nel.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"Dziedziuch, SylwesterX" <sylwesterx.dziedziuch@...el.com>,
"Jankowski, Konrad0" <konrad0.jankowski@...el.com>
Subject: RE: [PATCH net-next 08/12] iavf: Refactor iavf_mac_filter struct
memory usage
Hello,
Just to group them so they all occupy one memory chunk and for it to be clear how and where to add new ones in the future.
-----Original Message-----
From: Jakub Kicinski <kuba@...nel.org>
Sent: czwartek, 25 listopada 2021 00:50
To: Nguyen, Anthony L <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net; Jagielski, Jedrzej <jedrzej.jagielski@...el.com>; netdev@...r.kernel.org; sassmann@...hat.com; Dziedziuch, SylwesterX <sylwesterx.dziedziuch@...el.com>; Jankowski, Konrad0 <konrad0.jankowski@...el.com>
Subject: Re: [PATCH net-next 08/12] iavf: Refactor iavf_mac_filter struct memory usage
On Wed, 24 Nov 2021 09:16:48 -0800 Tony Nguyen wrote:
> - bool is_new_mac; /* filter is new, wait for PF decision */
> - bool remove; /* filter needs to be removed */
> - bool add; /* filter needs to be added */
> + struct {
> + u8 is_new_mac:1; /* filter is new, wait for PF decision */
> + u8 remove:1; /* filter needs to be removed */
> + u8 add:1; /* filter needs to be added */
> + u8 is_primary:1; /* filter is a default VF MAC */
> + u8 padding:4;
> + };
Why did you wrap it in a struct? Just curious.
Powered by blists - more mailing lists