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, 1 Apr 2015 13:47:02 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	sfeldma@...il.com
Cc:	netdev@...r.kernel.org, roopa@...ulusnetworks.com,
	linux@...ck-us.net, f.fainelli@...il.com,
	sridhar.samudrala@...el.com, ronen.arad@...el.com
Subject: Re: [PATCH net-next v2 25/26] switchdev: convert
 swdev_fib_ipv4_add/del over to swdev_port_obj_add/del

Wed, Apr 01, 2015 at 12:08:01PM CEST, sfeldma@...il.com wrote:
>From: Scott Feldman <sfeldma@...il.com>

...

>@@ -63,10 +73,6 @@ struct swdev_obj {
>  * @swdev_port_obj_add: Add an object to port (see swdev_obj).
>  *
>  * @swdev_port_obj_del: Delete an object from port (see swdev_obj).
>- *
>- * @swdev_fib_ipv4_add: Called to add/modify IPv4 route to switch device.
>- *
>- * @swdev_fib_ipv4_del: Called to delete IPv4 route from switch device.
>  */
> struct swdev_ops {
> 	int	(*swdev_port_attr_get)(struct net_device *dev,
>@@ -77,13 +83,6 @@ struct swdev_ops {
> 				      struct swdev_obj *obj);
> 	int	(*swdev_port_obj_del)(struct net_device *dev,
> 				      struct swdev_obj *obj);
>-	int	(*swdev_fib_ipv4_add)(struct net_device *dev, __be32 dst,
>-				      int dst_len, struct fib_info *fi,
>-				      u8 tos, u8 type, u32 nlflags,
>-				      u32 tb_id);
>-	int	(*swdev_fib_ipv4_del)(struct net_device *dev, __be32 dst,
>-				      int dst_len, struct fib_info *fi,
>-				      u8 tos, u8 type, u32 tb_id);

Can you please elaborate more why generic add/del functions are better
than specific ones? Me personally I don't like this kind of approach. It
makes sense for atts, where we will probably end up in bigger number of
attrs and having setter/getter for each would not be optimal.

But for objs, what other objs do you expect? Why don't have a set of SDOs
for each. Speaking of SDOs, I thought that having many of them was the
reason you ripped them out of NDO struct. Now it looks like there will
be 4 SDOs forever. Maybe I'm missing something...

--
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