From: Andrew Lunn <andrew@lunn.ch>
To: Iwan R Timmer <irtimmer@gmail.com>
Cc: netdev@vger.kernel.org, vivien.didelot@gmail.com,
f.fainelli@gmail.com, davem@davemloft.net
Subject: Re: [PATCH net-next v3 2/2] net: dsa: mv88e6xxx: Add support for port mirroring
Date: Sun, 10 Nov 2019 16:57:45 +0100 [thread overview]
Message-ID: <20191110155745.GB25889@lunn.ch> (raw)
In-Reply-To: <20191107211114.106310-3-irtimmer@gmail.com>
On Thu, Nov 07, 2019 at 10:11:14PM +0100, Iwan R Timmer wrote:
> Add support for configuring port mirroring through the cls_matchall
> classifier. We do a full ingress and/or egress capture towards a
> capture port. It allows setting a different capture port for ingress
> and egress traffic.
>
> It keeps track of the mirrored ports and the destination ports to
> prevent changes to the capture port while other ports are being
> mirrored.
>
> Signed-off-by: Iwan R Timmer <irtimmer@gmail.com>
> ---
> drivers/net/dsa/mv88e6xxx/chip.c | 76 +++++++++++++++++++++++++++++
> drivers/net/dsa/mv88e6xxx/chip.h | 6 +++
> drivers/net/dsa/mv88e6xxx/global1.c | 18 +++++--
> drivers/net/dsa/mv88e6xxx/port.c | 37 ++++++++++++++
> drivers/net/dsa/mv88e6xxx/port.h | 3 ++
> 5 files changed, 136 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index dfca0ec35145..ce4503b387a8 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -5250,6 +5250,80 @@ static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port,
> return err;
> }
>
> +static int mv88e6xxx_port_mirror_add(struct dsa_switch *ds, int port,
> + struct dsa_mall_mirror_tc_entry *mirror,
> + bool ingress)
> +{
> + struct mv88e6xxx_chip *chip = ds->priv;
> + enum mv88e6xxx_egress_direction direction = ingress ?
> + MV88E6XXX_EGRESS_DIR_INGRESS :
> + MV88E6XXX_EGRESS_DIR_EGRESS;
> + bool other_mirrors = false;
> + int i;
> + int err;
David will complain about reverse christmas tree here, and in other
functions.
Please add my:
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
when you repost.
Andrew
next prev parent reply other threads:[~2019-11-10 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 21:11 [PATCH net-next v3 0/2] net: dsa: mv88e6xxx: Add support for port mirroring Iwan R Timmer
2019-11-07 21:11 ` [PATCH net-next v3 1/2] net: dsa: mv88e6xxx: Split monitor port configuration Iwan R Timmer
2019-11-10 15:51 ` Andrew Lunn
2019-11-07 21:11 ` [PATCH net-next v3 2/2] net: dsa: mv88e6xxx: Add support for port mirroring Iwan R Timmer
2019-11-10 15:57 ` Andrew Lunn [this message]
2019-11-11 20:51 ` [PATCH net-next v3 0/2] " 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=20191110155745.GB25889@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=irtimmer@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).