From: Andrew Lunn <andrew@lunn•ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux•com>
Cc: netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
kernel@savoirfairelinux•com,
"David S. Miller" <davem@davemloft•net>,
Scott Feldman <sfeldma@gmail•com>, Jiri Pirko <jiri@resnulli•us>,
Florian Fainelli <f.fainelli@gmail•com>,
Neil Armstrong <narmstrong@baylibre•com>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
Subject: Re: [PATCH net-next 4/6] net: dsa: add port_fdb_prepare
Date: Thu, 8 Oct 2015 02:25:43 +0200 [thread overview]
Message-ID: <20151008002543.GB31267@lunn.ch> (raw)
In-Reply-To: <1444261711-1829-5-git-send-email-vivien.didelot@savoirfairelinux.com>
On Wed, Oct 07, 2015 at 07:48:29PM -0400, Vivien Didelot wrote:
> Push the prepare phase for FDB operations down to the DSA drivers, with
> a new port_fdb_prepare function. Currently only mv88e6xxx is affected.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux•com>
> ---
> drivers/net/dsa/mv88e6171.c | 1 +
> drivers/net/dsa/mv88e6352.c | 1 +
> drivers/net/dsa/mv88e6xxx.c | 10 ++++++++++
> drivers/net/dsa/mv88e6xxx.h | 3 +++
> include/net/dsa.h | 4 ++++
> net/dsa/slave.c | 7 +++++--
> 6 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
> index c95cfab..ca3330a 100644
> --- a/drivers/net/dsa/mv88e6171.c
> +++ b/drivers/net/dsa/mv88e6171.c
> @@ -121,6 +121,7 @@ struct dsa_switch_driver mv88e6171_switch_driver = {
> .port_vlan_add = mv88e6xxx_port_vlan_add,
> .port_vlan_del = mv88e6xxx_port_vlan_del,
> .vlan_getnext = mv88e6xxx_vlan_getnext,
> + .port_fdb_prepare = mv88e6xxx_port_fdb_prepare,
Hi Vivien
Bike shedding a bit, but i would call this
mv88e6xxx_port_fdb_prepare_add.
> .port_fdb_add = mv88e6xxx_port_fdb_add,
> .port_fdb_del = mv88e6xxx_port_fdb_del,
> .port_fdb_getnext = mv88e6xxx_port_fdb_getnext,
Taking a theoretical example, say mv88e6xxx_port_fdb_getnext needed a
prepare call to allocate memory to put the returned ATU into. What
would you call that?
mv88e6xxx_port_fdb_prepare_add and mv88e6xxx_port_fdb_prepare_getnext
just seems unambiguous and future proof.
Andrew
next prev parent reply other threads:[~2015-10-08 0:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 23:48 [PATCH net-next 0/6] net: dsa: push switchdev prepare phase in FDB ops Vivien Didelot
2015-10-07 23:48 ` [PATCH net-next 1/6] net: dsa: add uses_hw_tag Vivien Didelot
2015-10-07 23:48 ` [PATCH net-next 2/6] net: dsa: include dsa.h in dsa_priv.h Vivien Didelot
2015-10-07 23:48 ` [PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h Vivien Didelot
2015-10-08 9:04 ` kbuild test robot
2015-10-08 9:18 ` Jiri Pirko
2015-10-08 10:37 ` Wei Xu
[not found] ` <56165D5F.7050300@hisilicon.com>
2015-10-08 12:18 ` Jiri Pirko
2015-10-08 12:36 ` huangdaode
2015-10-10 23:35 ` kbuild test robot
2015-10-07 23:48 ` [PATCH net-next 4/6] net: dsa: add port_fdb_prepare Vivien Didelot
2015-10-08 0:25 ` Andrew Lunn [this message]
2015-10-08 12:55 ` Vivien Didelot
2015-10-08 15:07 ` Andrew Lunn
2015-10-08 6:19 ` Scott Feldman
2015-10-07 23:48 ` [PATCH net-next 5/6] net: dsa: push prepare phase in port_fdb_add Vivien Didelot
2015-10-08 6:19 ` Scott Feldman
2015-10-07 23:48 ` [PATCH net-next 6/6] net: dsa: use switchdev obj in port_fdb_del Vivien Didelot
2015-10-08 6:20 ` Scott Feldman
2015-10-08 12:28 ` [PATCH net-next 0/6] net: dsa: push switchdev prepare phase in FDB ops David Miller
2015-10-08 13:32 ` Vivien Didelot
2015-10-08 13:47 ` Jiri Pirko
2015-10-08 14:11 ` Vivien Didelot
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=20151008002543.GB31267@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=f.fainelli@gmail$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=kernel@savoirfairelinux$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=narmstrong@baylibre$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=sfeldma@gmail$(echo .)com \
--cc=vivien.didelot@savoirfairelinux$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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