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: <51085D6C.4050102@ti.com>
Date:	Tue, 29 Jan 2013 18:38:20 -0500
From:	Cyril Chemparathy <cyril@...com>
To:	Mugunthan V N <mugunthanvnm@...com>
CC:	<netdev@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	<davem@...emloft.net>, <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/2] drivers: net: cpsw: Add helper functions for VLAN
 ALE implementation

On 01/28/2013 03:12 PM, Mugunthan V N wrote:
> Add helper functions for VLAN ALE implementations for Add, Delete
> Dump VLAN related ALE entries
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@...com>
> ---
>   drivers/net/ethernet/ti/cpsw_ale.c |  172 ++++++++++++++++++++++++++++++++++--
>   drivers/net/ethernet/ti/cpsw_ale.h |   11 +++
>   2 files changed, 178 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
> index 0e9ccc2..0d7a60a 100644
> --- a/drivers/net/ethernet/ti/cpsw_ale.c
> +++ b/drivers/net/ethernet/ti/cpsw_ale.c

[...]

> +int cpsw_ale_add_vlan(struct cpsw_ale *ale, u16 vid, int port, int untag,
> +		      int reg_mcast, int unreg_mcast)

[...]

> +int cpsw_ale_del_vlan(struct cpsw_ale *ale, u16 vid, int port)

[...]

> +int cpsw_ale_vlan_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
> +				int flags, u16 vid)

[...]

> +int cpsw_ale_vlan_del_ucast(struct cpsw_ale *ale, u8 *addr, int port, u16 vid)

[...]

> +int cpsw_ale_vlan_add_mcast(struct cpsw_ale *ale, u8 *addr,
> +		int port_mask, u16 vid, int super, int mcast_state)

[...]

> +int cpsw_ale_vlan_del_mcast(struct cpsw_ale *ale, u8 *addr,
> +				int port_mask, u16 vid)

Are the VLAN and non-VLAN variants different enough to justify separate 
implementations for all these functions?  Could we collapse these by 
generalizing the original to take an optional vlan argument instead?

Thanks
-- Cyril.
--
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