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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Sep 2015 12:45:20 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...oirfairelinux.com,
	"David S. Miller" <davem@...emloft.net>,
	Scott Feldman <sfeldma@...il.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH v2 net-next 0/6] net: switchdev: use specific
 switchdev_obj_*

Tue, Sep 29, 2015 at 06:07:12PM CEST, vivien.didelot@...oirfairelinux.com wrote:
>This patchset changes switchdev add, del, dump operations from this:
>
>    int     (*switchdev_port_obj_add)(struct net_device *dev,
>                                      struct switchdev_obj *obj,
>                                      struct switchdev_trans *trans);
>    int     (*switchdev_port_obj_del)(struct net_device *dev,
>                                      struct switchdev_obj *obj);
>    int     (*switchdev_port_obj_dump)(struct net_device *dev,
>                                      struct switchdev_obj *obj);
>
>to something similar to the notifier_call callback of a notifier_block:
>
>    int     (*switchdev_port_obj_add)(struct net_device *dev,
>                                      enum switchdev_obj_id id,
>                                      const void *obj,
>                                      struct switchdev_trans *trans);                                                             
>    int     (*switchdev_port_obj_del)(struct net_device *dev,
>                                      enum switchdev_obj_id id,
>                                      const void *obj);
>    int     (*switchdev_port_obj_dump)(struct net_device *dev,
>                                       enum switchdev_obj_id id, void *obj,
>                                       int (*cb)(void *obj));
>
>This allows the caller to pass and expect back a specific switchdev_obj_*
>structure (e.g. switchdev_obj_fdb) instead of the generic switchdev_obj one.
>
>This will simplify pushing the callback function down to the drivers.
>
>The first 3 patches get rid of the dev parameter of the dump callback, since it
>is not always neeeded (e.g. vlan_dump) and some drivers (such as DSA drivers)
>may not have easy access to it.
>
>Patches 4 and 5 implement the change in the switchdev operations and its users.
>
>Patch 6 extracts the inner switchdev_obj_* structures from switchdev_obj and
>removes this last one.


How about attrs? We should keep objs and attrs api consistent.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ