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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 09 Nov 2017 10:06:49 -0500
From:   Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:     Egil Hjelmeland <privat@...l-hjelmeland.no>, netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next 1/6] net: dsa: remove trans argument from mdb ops

Hi Egil,

Egil Hjelmeland <privat@...l-hjelmeland.no> writes:

> On 08. nov. 2017 18:19, Vivien Didelot wrote:
>> The DSA switch MDB ops pass the switchdev_trans structure down to the
>> drivers, but no one is using them and they aren't supposed to anyway.
>> 
>> Remove the trans argument from MDB prepare and add operations.
>> 
>> -	int	(*port_mdb_prepare)(struct dsa_switch *ds, int port,
>> -				    const struct switchdev_obj_port_mdb *mdb,
>> -				    struct switchdev_trans *trans);
>> -	void	(*port_mdb_add)(struct dsa_switch *ds, int port,
>> -				const struct switchdev_obj_port_mdb *mdb,
>> -				struct switchdev_trans *trans);
>> +	int (*port_mdb_prepare)(struct dsa_switch *ds, int port,
>> +				const struct switchdev_obj_port_mdb *mdb);
>> +	void (*port_mdb_add)(struct dsa_switch *ds, int port,
>> +			     const struct switchdev_obj_port_mdb *mdb);
>>   	int	(*port_mdb_del)(struct dsa_switch *ds, int port,
>>   				const struct switchdev_obj_port_mdb *mdb);
>
> Hi Vivien
> Nice to get rid of "trans". I recall I was confused by this parameter. 
> "Am I supposed to do something with this parameter?".
>
> But when at it. What about getting rid of switchdev_obj_port_mdb, making 
> similar signatures as the new .port_fdb_xxx functions? Would that make 
> sense?

There is definitely something to do to factorize FDB and MDB operations,
since an Ethernet switch driver will only manipulate an address database
in the end. I have something in mind but this is out-of-scope ATM.

Thanks,

        Vivien

Powered by blists - more mailing lists