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 v2 1/2] net: dsa: mv88e6xxx: Split monitor port configuration
Date: Wed, 23 Oct 2019 03:06:21 +0200 [thread overview]
Message-ID: <20191023010621.GH5707@lunn.ch> (raw)
In-Reply-To: <20191021210143.119426-2-irtimmer@gmail.com>
On Mon, Oct 21, 2019 at 11:01:42PM +0200, Iwan R Timmer wrote:
> Separate the configuration of the egress and ingress monitor port.
> This allows the port mirror functionality to do ingress and egress
> port mirroring to separate ports.
>
> Signed-off-by: Iwan R Timmer <irtimmer@gmail.com>
> ---
> drivers/net/dsa/mv88e6xxx/chip.c | 9 ++++++++-
> drivers/net/dsa/mv88e6xxx/chip.h | 3 ++-
> drivers/net/dsa/mv88e6xxx/global1.c | 23 +++++++++++------------
> drivers/net/dsa/mv88e6xxx/global1.h | 6 ++++--
> 4 files changed, 25 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 6787d560e9e3..e9735346838d 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -2378,7 +2378,14 @@ static int mv88e6xxx_setup_upstream_port(struct mv88e6xxx_chip *chip, int port)
>
> if (chip->info->ops->set_egress_port) {
> err = chip->info->ops->set_egress_port(chip,
> - upstream_port);
> + true,
> + upstream_port);
> + if (err)
> + return err;
> +
> + err = chip->info->ops->set_egress_port(chip,
> + false,
> + upstream_port);
Hi Iwam
I never find true/false very simple to understand. Please could you
add an enum. We already have
enum mv88e6xxx_egress_mode {
MV88E6XXX_EGRESS_MODE_UNMODIFIED,
MV88E6XXX_EGRESS_MODE_UNTAGGED,
MV88E6XXX_EGRESS_MODE_TAGGED,
MV88E6XXX_EGRESS_MODE_ETHERTYPE,
};
so maybe
enum mv88e6xxx_egress_direction {
MV88E6XXX_EGRESS_DIR_INGRESS,
MV88E6XXX_EGRESS_DIR_EGRESS,
};
Otherwise the spirit of the patch is O.K.
Andrew
next prev parent reply other threads:[~2019-10-23 1:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 21:01 [PATCH net-next v2 0/2] net: dsa: mv88e6xxx: Add support for port mirroring Iwan R Timmer
2019-10-21 21:01 ` [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: Split monitor port configuration Iwan R Timmer
2019-10-23 1:06 ` Andrew Lunn [this message]
2019-10-21 21:01 ` [PATCH net-next v2 2/2] net: dsa: mv88e6xxx: Add support for port mirroring Iwan R Timmer
2019-10-23 1:18 ` Andrew Lunn
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=20191023010621.GH5707@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).