All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iwan R Timmer <irtimmer@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Add support for port mirroring
Date: Wed, 18 Sep 2019 00:32:32 +0200	[thread overview]
Message-ID: <20190917223232.GA32887@i5wan> (raw)
In-Reply-To: <20190917205505.GF9591@lunn.ch>

On Tue, Sep 17, 2019 at 10:55:05PM +0200, Andrew Lunn wrote:
> On Tue, Sep 17, 2019 at 10:23:01PM +0200, 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 the
> > capture port, configured with set_egress_port.
> 
> Hi Iwan
> 
> This looks good as far as it goes.
> 
> Have you tried adding/deleting multiple port mirrors? Do we need to
> limit how many are added. A quick look at the datasheet, you can
> define one egress mirror port and one ingress mirror port. I think you
> can have multiple ports mirroring ingress to that one ingress mirror
> port. And you can have multiple port mirroring egress to the one
> egress mirror port. We should add code to check this, and return
> -EBUSY if the existing configuration prevents a new mirror being
> configured.
> 
> Thanks
> 	Andrew

Hi Andrew,

I only own a simple 5 ports switch (88E6176) which has no problem of
mirroring the other ports to a single port. Except for a bandwith
shortage ofcourse. While I thought I checked adding and removing ports,
I seemed to forgot to check removing ingress traffic as it will now
disable mirroring egress traffic. Searching for how I can distinct
ingress from egress mirroring in port_mirror_del, I saw there is a
variable in the mirror struct called ingress. Which seems strange,
because why is it a seperate argument to the port_mirror_add function?

Origally I planned to be able to set the egress and ingress mirror
seperatly. But in my laziness when I saw there already was a function
to configure the destination port this functionality was lost.

Because the other drivers which implemented the port_mirror_add (b53 and
ksz9477) also lacks additional checks to prevent new mirror filters from
breaking previous ones I assumed they were not necessary.

At least I will soon sent a new version with at least the issue of
removing mirror ingress traffic fixed and the ability to define a 
seperate ingress and egress port.

Regards,
Iwan

  reply	other threads:[~2019-09-17 22:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 20:23 [PATCH net-next] net: dsa: mv88e6xxx: Add support for port mirroring Iwan R Timmer
2019-09-17 20:55 ` Andrew Lunn
2019-09-17 22:32   ` Iwan R Timmer [this message]
2019-09-17 22:42     ` Florian Fainelli
  -- strict thread matches above, loose matches on Subject: below --
2019-09-19 21:30 Jason Cobham
2019-09-19 22:12 ` Florian Fainelli

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=20190917223232.GA32887@i5wan \
    --to=irtimmer@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.