lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Jan 2022 10:37:31 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <vladimir.oltean@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH v2 net-next 0/7] Cleanup to main DSA structures

On 1/5/22 6:28 AM, Vladimir Oltean wrote:
> On Wed, Jan 05, 2022 at 03:21:34PM +0200, Vladimir Oltean wrote:
>> This series contains changes that do the following:
>>
>> - struct dsa_port reduced from 576 to 544 bytes, and first cache line a
>>   bit better organized
>> - struct dsa_switch from 160 to 136 bytes, and first cache line a bit
>>   better organized
>> - struct dsa_switch_tree from 112 to 104 bytes, and first cache line a
>>   bit better organized
>>
>> No changes compared to v1, just split into a separate patch set.
>>
>> Vladimir Oltean (7):
>>   net: dsa: move dsa_port :: stp_state near dsa_port :: mac
>>   net: dsa: merge all bools of struct dsa_port into a single u8
>>   net: dsa: move dsa_port :: type near dsa_port :: index
>>   net: dsa: merge all bools of struct dsa_switch into a single u32
>>   net: dsa: make dsa_switch :: num_ports an unsigned int
>>   net: dsa: move dsa_switch_tree :: ports and lags to first cache line
>>   net: dsa: combine two holes in struct dsa_switch_tree
>>
>>  include/net/dsa.h | 146 +++++++++++++++++++++++++---------------------
>>  net/dsa/dsa2.c    |   2 +-
>>  2 files changed, 81 insertions(+), 67 deletions(-)
>>
>> -- 
>> 2.25.1
>>
> 
> Let's keep this version for review only (RFC). For the final version I
> just figured that I can use this syntax:
> 
> 	u8			vlan_filtering:1;
> 
> 	/* Managed by DSA on user ports and by drivers on CPU and DSA ports */
> 	u8			learning:1;
> 
> 	u8			lag_tx_enabled:1;
> 
> 	u8			devlink_port_setup:1;
> 
> 	u8			setup:1;
> 
> instead of this syntax:
> 
> 	u8			vlan_filtering:1,
> 				/* Managed by DSA on user ports and by
> 				 * drivers on CPU and DSA ports
> 				 */
> 				learning:1,
> 				lag_tx_enabled:1,
> 				devlink_port_setup:1,
> 				setup:1;
> 
> which is what I'm going to prefer.

Yes this is indeed more readable. Thanks!
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ