From: Mugunthan V N <mugunthanvnm@ti.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation
Date: Thu, 31 Jan 2013 16:39:18 +0530 [thread overview]
Message-ID: <510A50DE.1010308@ti.com> (raw)
In-Reply-To: <20130130220208.GA22847@electric-eye.fr.zoreil.com>
On 1/31/2013 3:32 AM, Francois Romieu wrote:
> Mugunthan V N <mugunthanvnm@ti.com> :
> [...]
>> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
>> index 0e9ccc2..18b88ce 100644
>> --- a/drivers/net/ethernet/ti/cpsw_ale.c
>> +++ b/drivers/net/ethernet/ti/cpsw_ale.c
> [...]
>> @@ -274,19 +292,26 @@ int cpsw_ale_flush(struct cpsw_ale *ale, int port_mask)
>> return 0;
>> }
>>
>> -int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags)
>> +int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
>> + int flags, u16 vid)
>> {
>> u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
>> int idx;
>>
>> - cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> [...]
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> It could be fctored out.
Are you mentioning to have static inline function for the above two
statements above?
>
> [...]
>> @@ -362,6 +395,55 @@ int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask)
>> return 0;
>> }
>>
>> +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_mask)
> [...]
>
> Patch #2 doesn't use the returned status code.
Will modify the prototype to return void
Regards
Mugunthan V N
WARNING: multiple messages have this Message-ID (diff)
From: mugunthanvnm@ti.com (Mugunthan V N)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation
Date: Thu, 31 Jan 2013 16:39:18 +0530 [thread overview]
Message-ID: <510A50DE.1010308@ti.com> (raw)
In-Reply-To: <20130130220208.GA22847@electric-eye.fr.zoreil.com>
On 1/31/2013 3:32 AM, Francois Romieu wrote:
> Mugunthan V N <mugunthanvnm@ti.com> :
> [...]
>> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
>> index 0e9ccc2..18b88ce 100644
>> --- a/drivers/net/ethernet/ti/cpsw_ale.c
>> +++ b/drivers/net/ethernet/ti/cpsw_ale.c
> [...]
>> @@ -274,19 +292,26 @@ int cpsw_ale_flush(struct cpsw_ale *ale, int port_mask)
>> return 0;
>> }
>>
>> -int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags)
>> +int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
>> + int flags, u16 vid)
>> {
>> u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
>> int idx;
>>
>> - cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> [...]
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> It could be fctored out.
Are you mentioning to have static inline function for the above two
statements above?
>
> [...]
>> @@ -362,6 +395,55 @@ int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask)
>> return 0;
>> }
>>
>> +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_mask)
> [...]
>
> Patch #2 doesn't use the returned status code.
Will modify the prototype to return void
Regards
Mugunthan V N
WARNING: multiple messages have this Message-ID (diff)
From: Mugunthan V N <mugunthanvnm@ti.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<linux-arm-kernel@lists.infradead.org>,
<linux-omap@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation
Date: Thu, 31 Jan 2013 16:39:18 +0530 [thread overview]
Message-ID: <510A50DE.1010308@ti.com> (raw)
In-Reply-To: <20130130220208.GA22847@electric-eye.fr.zoreil.com>
On 1/31/2013 3:32 AM, Francois Romieu wrote:
> Mugunthan V N <mugunthanvnm@ti.com> :
> [...]
>> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
>> index 0e9ccc2..18b88ce 100644
>> --- a/drivers/net/ethernet/ti/cpsw_ale.c
>> +++ b/drivers/net/ethernet/ti/cpsw_ale.c
> [...]
>> @@ -274,19 +292,26 @@ int cpsw_ale_flush(struct cpsw_ale *ale, int port_mask)
>> return 0;
>> }
>>
>> -int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags)
>> +int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
>> + int flags, u16 vid)
>> {
>> u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
>> int idx;
>>
>> - cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> [...]
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> It could be fctored out.
Are you mentioning to have static inline function for the above two
statements above?
>
> [...]
>> @@ -362,6 +395,55 @@ int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask)
>> return 0;
>> }
>>
>> +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_mask)
> [...]
>
> Patch #2 doesn't use the returned status code.
Will modify the prototype to return void
Regards
Mugunthan V N
next prev parent reply other threads:[~2013-01-31 11:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 19:07 [PATCH v2 0/2] Add CPSW VLAN Support Mugunthan V N
2013-01-30 19:07 ` Mugunthan V N
2013-01-30 19:07 ` Mugunthan V N
2013-01-30 19:07 ` [PATCH v2 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation Mugunthan V N
2013-01-30 19:07 ` Mugunthan V N
2013-01-30 19:07 ` Mugunthan V N
2013-01-30 22:02 ` Francois Romieu
2013-01-30 22:02 ` Francois Romieu
2013-01-31 11:09 ` Mugunthan V N [this message]
2013-01-31 11:09 ` Mugunthan V N
2013-01-31 11:09 ` Mugunthan V N
2013-01-31 21:43 ` Francois Romieu
2013-01-31 21:43 ` Francois Romieu
2013-01-30 19:07 ` [PATCH v2 2/2] drivers: net:ethernet: cpsw: add support for VLAN Mugunthan V N
2013-01-30 19:07 ` Mugunthan V N
2013-01-30 19:07 ` Mugunthan V N
2013-01-30 22:02 ` Francois Romieu
2013-01-30 22:02 ` Francois Romieu
2013-01-31 11:09 ` Mugunthan V N
2013-01-31 11:09 ` Mugunthan V N
2013-01-31 11: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=510A50DE.1010308@ti.com \
--to=mugunthanvnm@ti.com \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.