From: Ido Schimmel <idosch@mellanox.com>
To: netdev@vger.kernel.org, davem@davemloft.net, sfr@canb.auug.org.au
Cc: jiri@mellanox.com, petrm@mellanox.com, mlxsw@mellanox.com
Subject: Re: [PATCH net 2/2] mlxsw: spectrum: Prevent duplicate mirrors
Date: Fri, 9 Mar 2018 15:39:57 +0200 [thread overview]
Message-ID: <20180309133957.GA9718@splinter> (raw)
In-Reply-To: <20180309133353.9558-3-idosch@mellanox.com>
+Stephen
On Fri, Mar 09, 2018 at 03:33:53PM +0200, Ido Schimmel wrote:
> From: Petr Machata <petrm@mellanox.com>
>
> The Spectrum ASIC doesn't support mirroring more than once from a single
> binding point (which is a port-direction pair). Therefore detect that a
> second binding of a given binding point is attempted.
>
> To that end, extend struct mlxsw_sp_span_inspected_port to track whether
> a given binding point is bound or not. Extend
> mlxsw_sp_span_entry_port_find() to look for ports based on the full
> unique key: port number, direction, and boundness.
>
> Besides fixing the overt bug where configured mirrors are not offloaded,
> this also fixes a more subtle bug: mlxsw_sp_span_inspected_port_del()
> just defers to mlxsw_sp_span_entry_bound_port_find(), and that used to
> find the first port with the right number (disregarding the type). Thus
> by adding and removing egress and ingress mirrors in the right order,
> one could trick the system into believing it has no egress mirrors when
> in fact it did have some. That then caused that
> mlxsw_sp_span_port_mtu_update() didn't update mirroring buffer when MTU
> was changed.
>
> Fixes: 763b4b70afcd ("mlxsw: spectrum: Add support in matchall mirror TC offloading")
> Signed-off-by: Petr Machata <petrm@mellanox.com>
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Hi Dave, Stephen,
Please note that this is going to conflict with recent mirroring to GRE
tap work when you merge net into net-next. The resolution is available
here:
git@github.com:jpirko/linux_mlxsw.git (branch: linux-next-fix)
Or simply here:
https://github.com/jpirko/linux_mlxsw/commit/8175f7c4736fe9f6a4dac330ee79b45593502a6c
Thanks and sorry about the added work.
next prev parent reply other threads:[~2018-03-09 13:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 13:33 [PATCH net 0/2] mlxsw: ACL and mirroring fixes Ido Schimmel
2018-03-09 13:33 ` [PATCH net 1/2] mlxsw: spectrum: Fix gact_ok offloading Ido Schimmel
2018-03-09 13:33 ` [PATCH net 2/2] mlxsw: spectrum: Prevent duplicate mirrors Ido Schimmel
2018-03-09 13:39 ` Ido Schimmel [this message]
2018-03-09 18:02 ` [PATCH net 0/2] mlxsw: ACL and mirroring fixes David Miller
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=20180309133957.GA9718@splinter \
--to=idosch@mellanox.com \
--cc=davem@davemloft.net \
--cc=jiri@mellanox.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).