From: David Miller <davem@davemloft.net>
To: grygorii.strashko@ti.com
Cc: netdev@vger.kernel.org, nsekhar@ti.com,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: ti: cpsw: fix packet leaking in dual_mac mode
Date: Wed, 02 May 2018 11:08:41 -0400 (EDT) [thread overview]
Message-ID: <20180502.110841.378324128079268584.davem@davemloft.net> (raw)
In-Reply-To: <20180501174122.11323-1-grygorii.strashko@ti.com>
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 1 May 2018 12:41:22 -0500
> In dual_mac mode packets arrived on one port should not be forwarded by
> switch hw to another port. Only Linux Host can forward packets between
> ports. The below test case (reported in [1]) shows that packet arrived on
> one port can be leaked to anoter (reproducible with dual port evms):
> - connect port 1 (eth0) to linux Host 0 and run tcpdump or Wireshark
> - connect port 2 (eth1) to linux Host 1 with vlan 1 configured
> - ping <IPx> from Host 1 through vlan 1 interface.
> ARP packets will be seen on Host 0.
>
> Issue happens because dual_mac mode is implemnted using two vlans: 1 (Port
> 1+Port 0) and 2 (Port 2+Port 0), so there are vlan records created for for
> each vlan. By default, the ALE will find valid vlan record in its table
> when vlan 1 tagged packet arrived on Port 2 and so forwards packet to all
> ports which are vlan 1 members (like Port.
>
> To avoid such behaviorr the ALE VLAN ID Ingress Check need to be enabled
> for each external CPSW port (ALE_PORTCTLn.VID_INGRESS_CHECK) so ALE will
> drop ingress packets if Rx port is not VLAN member.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Applied and queued up for -stable, thank you.
next prev parent reply other threads:[~2018-05-02 15:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 17:41 [PATCH] net: ethernet: ti: cpsw: fix packet leaking in dual_mac mode Grygorii Strashko
2018-05-02 15:08 ` David Miller [this message]
2018-05-17 17:48 ` Naresh Kamboju
2018-05-17 19:10 ` Greg Kroah-Hartman
2018-05-18 16:37 ` Grygorii Strashko
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=20180502.110841.378324128079268584.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nsekhar@ti.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