From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Petr Machata <petrm@mellanox.com>,
netdev@vger.kernel.org, devel@driverdev.osuosl.org,
bridge@lists.linux-foundation.org
Cc: f.fainelli@gmail.com, andrew@lunn.ch, gregkh@linuxfoundation.org,
vivien.didelot@savoirfairelinux.com, idosch@mellanox.com,
jiri@mellanox.com, razvan.stefanescu@nxp.com,
davem@davemloft.net, dan.carpenter@oracle.com
Subject: Re: [PATCH net-next v4 1/8] net: bridge: Extract boilerplate around switchdev_port_obj_*()
Date: Wed, 30 May 2018 18:12:02 +0300 [thread overview]
Message-ID: <dfd84f5f-bcb8-c301-7c52-818150af69fd@cumulusnetworks.com> (raw)
In-Reply-To: <7b6f3bdc759168227bbff78173837d5fb5560528.1527641426.git.petrm@mellanox.com>
On 30/05/18 03:56, Petr Machata wrote:
> A call to switchdev_port_obj_add() or switchdev_port_obj_del() involves
> initializing a struct switchdev_obj_port_vlan, a piece of code that
> repeats on each call site almost verbatim. While in the current codebase
> there is just one duplicated add call, the follow-up patches add more of
> both add and del calls.
>
> Thus to remove the duplication, extract the repetition into named
> functions and reuse.
>
> Signed-off-by: Petr Machata <petrm@mellanox.com>
> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> net/bridge/br_private.h | 13 +++++++++++++
> net/bridge/br_switchdev.c | 25 +++++++++++++++++++++++++
> net/bridge/br_vlan.c | 26 +++-----------------------
> 3 files changed, 41 insertions(+), 23 deletions(-)
>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
next prev parent reply other threads:[~2018-05-30 15:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 0:55 [PATCH net-next v4 0/8] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-30 0:56 ` [PATCH net-next v4 1/8] net: bridge: Extract boilerplate around switchdev_port_obj_*() Petr Machata
2018-05-30 15:12 ` Nikolay Aleksandrov [this message]
2018-05-30 0:56 ` [PATCH net-next v4 2/8] net: bridge: Extract br_vlan_add_existing() Petr Machata
2018-05-30 15:15 ` Nikolay Aleksandrov
2018-05-30 0:57 ` [PATCH net-next v4 3/8] mlxsw: spectrum_switchdev: Ignore bridge VLAN events Petr Machata
2018-05-30 0:58 ` [PATCH net-next v4 4/8] rocker: rocker_main: " Petr Machata
2018-05-30 0:59 ` [PATCH net-next v4 5/8] dsa: port: " Petr Machata
2018-05-30 2:13 ` Florian Fainelli
2018-05-30 1:00 ` [PATCH net-next v4 6/8] staging: fsl-dpaa2: ethsw: " Petr Machata
2018-05-30 1:00 ` [PATCH net-next v4 7/8] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-30 15:58 ` Nikolay Aleksandrov
2018-05-30 1:00 ` [PATCH net-next v4 8/8] mlxsw: spectrum_switchdev: Schedule respin during trans prepare Petr Machata
2018-05-31 18:14 ` [PATCH net-next v4 0/8] net: bridge: Notify about bridge VLANs 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=dfd84f5f-bcb8-c301-7c52-818150af69fd@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
--cc=razvan.stefanescu@nxp.com \
--cc=vivien.didelot@savoirfairelinux.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).