Web lists-archives.com

Re: [PATCH net-next 15/16] net: switchdev: Replace port attr set SDO with a notification




Sat, Feb 09, 2019 at 01:36:18AM CET, f.fainelli@xxxxxxxxx wrote:
>On 2/8/19 4:32 PM, Florian Fainelli wrote:
>> Drop switchdev_ops.switchdev_port_attr_set. Drop the uses of this field
>> from all clients, which were migrated to use switchdev notification in
>> the previous patches.
>> 
>> Add a new function switchdev_port_attr_notify() that sends the switchdev
>> notifications SWITCHDEV_PORT_ATTR_SET.
>> 
>> Drop __switchdev_port_attr_set() and update switchdev_port_attr_set()
>> likewise.
>> 
>> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
>> ---
>>  include/net/switchdev.h   | 18 --------
>>  net/switchdev/switchdev.c | 92 ++++++++++-----------------------------
>>  2 files changed, 22 insertions(+), 88 deletions(-)
>> 
>> diff --git a/include/net/switchdev.h b/include/net/switchdev.h
>> index 4c5f7e5430cf..5387ff6f41c5 100644
>> --- a/include/net/switchdev.h
>> +++ b/include/net/switchdev.h
>> @@ -111,21 +111,6 @@ void *switchdev_trans_item_dequeue(struct switchdev_trans *trans);
>>  
>>  typedef int switchdev_obj_dump_cb_t(struct switchdev_obj *obj);
>>  
>> -/**
>> - * struct switchdev_ops - switchdev operations
>> - *
>> - * @switchdev_port_attr_get: Get a port attribute (see switchdev_attr).
>> - *
>> - * @switchdev_port_attr_set: Set a port attribute (see switchdev_attr).
>> - */
>> -struct switchdev_ops {
>> -	int	(*switchdev_port_attr_get)(struct net_device *dev,
>> -					   struct switchdev_attr *attr);
>> -	int	(*switchdev_port_attr_set)(struct net_device *dev,
>> -					   const struct switchdev_attr *attr,
>> -					   struct switchdev_trans *trans);
>> -};
>> -
>
>This and the hunk below bisection, I will move that into patch #16 after
>receiving feedback on this.

Looks good. Thanks!