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]
Message-Id: <20140523.145535.35857476092197009.davem@davemloft.net>
Date:	Fri, 23 May 2014 14:55:35 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	alexander.h.duyck@...el.com
Cc:	netdev@...r.kernel.org, jeffrey.t.kirsher@...el.com,
	jpirko@...hat.com
Subject: Re: [PATCH] net: Add support for device specific address syncing

From: Alexander Duyck <alexander.h.duyck@...el.com>
Date: Wed, 21 May 2014 13:55:15 -0700

> This change provides a function to be used in order to break the
> ndo_set_rx_mode call into a set of address add and remove calls.  The code
> is based on the implementation of dev_uc_sync/dev_mc_sync.  Since they
> essentially do the same thing but with only one dev I simply named my
> functions __dev_uc_sync/__dev_mc_sync.
> 
> I also implemented an unsync version of the functions as well to allow for
> cleanup on close.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@...el.com>

This looks fine semantically to me.

Please fix the coding style issues below and submit this alongside
the changes for whatever driver will first make use of this.

Thanks!

> +int __hw_addr_sync_dev(struct netdev_hw_addr_list *list,
> +		struct net_device *dev,
> +		int (*sync)(struct net_device *, const unsigned char *),
> +		int (*unsync)(struct net_device *, const unsigned char *));

Arguments on continuation lines should start at the first column after
the openning parenthesis on the first line.  You must use the appropriate
number of TAB and SPACE characters necessary to achieve this.

> +void __hw_addr_unsync_dev(struct netdev_hw_addr_list *list,
> +		struct net_device *dev,
> +		int (*unsync)(struct net_device *, const unsigned char *));

Likewise.

> +static inline int __dev_uc_sync(struct net_device *dev,
> +		int (*sync)(struct net_device *, const unsigned char *),
> +		int (*unsync)(struct net_device *, const unsigned char *))

Likewise.

> +static inline void __dev_uc_unsync(struct net_device *dev,
> +		   int (*unsync)(struct net_device *, const unsigned char *))

Likewise.

> +static inline int __dev_mc_sync(struct net_device *dev,
> +		int (*sync)(struct net_device *, const unsigned char *),
> +		int (*unsync)(struct net_device *, const unsigned char *))

Likewise.

> +static inline void __dev_mc_unsync(struct net_device *dev,
> +		int (*unsync)(struct net_device *, const unsigned char *))

Likewise.

> +int __hw_addr_sync_dev(struct netdev_hw_addr_list *list,
> +		struct net_device *dev,
> +		int (*sync)(struct net_device *, const unsigned char *),
> +		int (*unsync)(struct net_device *, const unsigned char *))

Likewise.

> +void __hw_addr_unsync_dev(struct netdev_hw_addr_list *list,
> +		struct net_device *dev,
> +		int (*unsync)(struct net_device *, const unsigned char *))

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