lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191110155745.GB25889@lunn.ch>
Date:   Sun, 10 Nov 2019 16:57:45 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Iwan R Timmer <irtimmer@...il.com>
Cc:     netdev@...r.kernel.org, vivien.didelot@...il.com,
        f.fainelli@...il.com, davem@...emloft.net
Subject: Re: [PATCH net-next v3 2/2] net: dsa: mv88e6xxx: Add support for
 port mirroring

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@...il.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@...n.ch>

when you repost.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ