From: MD Danish Anwar <danishanwar@ti.com>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: <aleksander.lobakin@intel.com>, <lukma@denx.de>,
<m-malladi@ti.com>, <diogo.ivo@siemens.com>,
<rdunlap@infradead.org>, <schnelle@linux.ibm.com>,
<vladimir.oltean@nxp.com>, <horms@kernel.org>,
<rogerq@kernel.org>, <pabeni@redhat.com>, <kuba@kernel.org>,
<edumazet@google.com>, <davem@davemloft.net>,
<andrew+netdev@lunn.ch>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<srk@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH net-next 2/4] net: ti: icssg-prueth: Add VLAN support in EMAC mode
Date: Thu, 19 Dec 2024 14:49:55 +0530 [thread overview]
Message-ID: <06886be4-5f35-4785-bc63-a5c84887adfb@ti.com> (raw)
In-Reply-To: <Z2PE5m8R5lM4/YRT@mev-dev.igk.intel.com>
On 19/12/24 12:32 pm, Michal Swiatkowski wrote:
> On Mon, Dec 16, 2024 at 03:30:42PM +0530, MD Danish Anwar wrote:
>> Add support for vlan filtering in dual EMAC mode.
>>
>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
>> ---
>> drivers/net/ethernet/ti/icssg/icssg_prueth.c | 29 +++++++++-----------
>> 1 file changed, 13 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
>> index c568c84a032b..e031bccf31dc 100644
>> --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
>> +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
>> @@ -822,19 +822,18 @@ static int emac_ndo_vlan_rx_add_vid(struct net_device *ndev,
>> {
>> struct prueth_emac *emac = netdev_priv(ndev);
>> struct prueth *prueth = emac->prueth;
>> + int port_mask = BIT(emac->port_id);
>> int untag_mask = 0;
>> - int port_mask;
>>
>> - if (prueth->is_hsr_offload_mode) {
>> - port_mask = BIT(PRUETH_PORT_HOST) | BIT(emac->port_id);
>> - untag_mask = 0;
>> + if (prueth->is_hsr_offload_mode)
>> + port_mask |= BIT(PRUETH_PORT_HOST);
>>
>> - netdev_dbg(emac->ndev, "VID add vid:%u port_mask:%X untag_mask %X\n",
>> - vid, port_mask, untag_mask);
>> + netdev_err(emac->ndev, "VID add vid:%u port_mask:%X untag_mask %X\n",
>> + vid, port_mask, untag_mask);
>> +
>> + icssg_vtbl_modify(emac, vid, port_mask, untag_mask, true);
>> + icssg_set_pvid(emac->prueth, vid, emac->port_id);
>>
>> - icssg_vtbl_modify(emac, vid, port_mask, untag_mask, true);
>> - icssg_set_pvid(emac->prueth, vid, emac->port_id);
>> - }
>> return 0;
>> }
>>
>> @@ -843,18 +842,16 @@ static int emac_ndo_vlan_rx_del_vid(struct net_device *ndev,
>> {
>> struct prueth_emac *emac = netdev_priv(ndev);
>> struct prueth *prueth = emac->prueth;
>> + int port_mask = BIT(emac->port_id);
>> int untag_mask = 0;
>> - int port_mask;
>>
>> - if (prueth->is_hsr_offload_mode) {
>> + if (prueth->is_hsr_offload_mode)
>> port_mask = BIT(PRUETH_PORT_HOST);
>> - untag_mask = 0;
>>
>> - netdev_dbg(emac->ndev, "VID del vid:%u port_mask:%X untag_mask %X\n",
>> - vid, port_mask, untag_mask);
>> + netdev_err(emac->ndev, "VID del vid:%u port_mask:%X untag_mask %X\n",
>> + vid, port_mask, untag_mask);
> Why error? It doesn't look like error path, previously there was
> netdev_dbg (made more sense in my opinion)
>
My bad. It should be netdev_dbg(). I'll change it in v2. Thanks
>> + icssg_vtbl_modify(emac, vid, port_mask, untag_mask, false);
>>
>> - icssg_vtbl_modify(emac, vid, port_mask, untag_mask, false);
>> - }
>> return 0;
>> }
>>
>> --
>> 2.34.1
--
Thanks and Regards,
Danish
next prev parent reply other threads:[~2024-12-19 9:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 10:00 [PATCH net-next 0/4] Add Multicast Filtering support for VLAN interface MD Danish Anwar
2024-12-16 10:00 ` [PATCH net-next 1/4] net: ti: Kconfig: Select HSR for ICSSG Driver MD Danish Anwar
2024-12-18 16:59 ` Larysa Zaremba
2024-12-19 5:06 ` MD Danish Anwar
2024-12-19 16:59 ` Larysa Zaremba
2024-12-20 5:31 ` Anwar, Md Danish
2024-12-23 6:30 ` MD Danish Anwar
2024-12-20 19:30 ` kernel test robot
2024-12-16 10:00 ` [PATCH net-next 2/4] net: ti: icssg-prueth: Add VLAN support in EMAC mode MD Danish Anwar
2024-12-19 7:02 ` Michal Swiatkowski
2024-12-19 9:19 ` MD Danish Anwar [this message]
2024-12-16 10:00 ` [PATCH net-next 3/4] net: ti: icssg-prueth: Add Multicast Filtering support for VLAN in MAC mode MD Danish Anwar
2024-12-19 7:28 ` Michal Swiatkowski
2024-12-19 9:36 ` MD Danish Anwar
2024-12-19 9:57 ` Michal Swiatkowski
2024-12-16 10:00 ` [PATCH net-next 4/4] net: ti: icssg-prueth: Add Support for Multicast filtering with VLAN in HSR mode MD Danish Anwar
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=06886be4-5f35-4785-bc63-a5c84887adfb@ti.com \
--to=danishanwar@ti.com \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukma@denx.de \
--cc=m-malladi@ti.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rogerq@kernel.org \
--cc=schnelle@linux.ibm.com \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
--cc=vladimir.oltean@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®