Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Cyril Chemparathy <cyril@ti.com>
To: Mugunthan V N <mugunthanvnm@ti.com>
Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org,
	davem@davemloft.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation
Date: Tue, 29 Jan 2013 18:38:20 -0500	[thread overview]
Message-ID: <51085D6C.4050102@ti.com> (raw)
In-Reply-To: <1359403945-28585-2-git-send-email-mugunthanvnm@ti.com>

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@ti.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.

  reply	other threads:[~2013-01-29 23:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28 20:12 [PATCH 0/2] Add CPSW VLAN Support Mugunthan V N
2013-01-28 20:12 ` [PATCH 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation Mugunthan V N
2013-01-29 23:38   ` Cyril Chemparathy [this message]
2013-01-30  4:17     ` Mugunthan V N
2013-01-28 20:12 ` [PATCH 2/2] drivers: net:ethernet: cpsw: add support for VLAN Mugunthan V N
2013-01-28 20:44   ` Felipe Balbi
2013-01-29  5:05     ` Mugunthan V N
2013-01-29  7:21       ` Felipe Balbi
2013-01-29  7:36   ` Richard Cochran
2013-01-29 12:33     ` Mugunthan V N
2013-01-29  9:48   ` Jan Lübbe
2013-01-29 12:09     ` Mugunthan V N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51085D6C.4050102@ti.com \
    --to=cyril@ti.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox