From: roopa <roopa@cumulusnetworks•com>
To: Florian Fainelli <f.fainelli@gmail•com>
Cc: Jonas Johansson <jonasj76@gmail•com>,
netdev@vger•kernel.org,
Jonas Johansson <jonas.johansson@westermo•se>,
Jiri Pirko <jiri@resnulli•us>, Scott Feldman <sfeldma@gmail•com>
Subject: Re: [PATCH net-next 1/2] dsa: bonding: implement HW bonding
Date: Fri, 20 Feb 2015 09:56:26 -0800 [thread overview]
Message-ID: <54E7754A.3070407@cumulusnetworks.com> (raw)
In-Reply-To: <54E763A6.4020505@gmail.com>
On 2/20/15, 8:41 AM, Florian Fainelli wrote:
> On 20/02/15 02:51, Jonas Johansson wrote:
>> From: Jonas Johansson <jonas.johansson@westermo•se>
>>
>> This patch will implement hooks for hardware bonding support for the DSA
>> driver. When the team driver adds a DSA slave port the port will be assigned
>> a bond group id and the DSA slave driver can setup the hardware. When team
>> changes the port state (enabled/disabled) the DSA slave driver is able to
>> use the attach/detach callback which will allow the hardware to change the
>> hardware settings to reflect the state.
>>
>> Added DSA hooks:
>> bond_add_group: To add a port to a bond group
>> bond_del_group: To remove a port from a bond group
>> bond_attach: To mark the port in a bond group as attached/active
>> bond_detach: To unmark the port in a bond group as detach/inactive
>>
>> Added new network device hooks:
>> ndo_bond_attach: To attach a device to a bond group.
>> ndo_bond_detach: To detach a device from a bond group.
>>
>> Team:
>> Added callback to ndo_bond_attach when port is enabled.
>> Added callback to ndo_bond_detach when port is disabled.
>>
>> Added DSA notifier:
>> Listening on NETDEV_CHANGEUPPER to add or deleta a port to/from a bond group.
>>
>> Signed-off-by: Jonas Johansson <jonas.johansson@westermo•se>
>> ---
>> drivers/net/team/team.c | 4 ++++
>> include/linux/netdevice.h | 8 +++++++
>> include/net/dsa.h | 8 +++++++
>> net/dsa/dsa.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++
>> net/dsa/dsa_priv.h | 6 +++++
>> net/dsa/slave.c | 23 ++++++++++++++++++
>> 6 files changed, 109 insertions(+)
>>
>> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>> index 0e62274..f7b2afb 100644
>> --- a/drivers/net/team/team.c
>> +++ b/drivers/net/team/team.c
>> @@ -934,6 +934,8 @@ static void team_port_enable(struct team *team,
>> team->ops.port_enabled(team, port);
>> team_notify_peers(team);
>> team_mcast_rejoin(team);
>> + if (port->dev->netdev_ops->ndo_bond_attach)
>> + port->dev->netdev_ops->ndo_bond_attach(port->dev);
>> }
>>
>> static void __reconstruct_port_hlist(struct team *team, int rm_index)
>> @@ -965,6 +967,8 @@ static void team_port_disable(struct team *team,
>> team_adjust_ops(team);
>> team_notify_peers(team);
>> team_mcast_rejoin(team);
>> + if (port->dev->netdev_ops->ndo_bond_detach)
>> + port->dev->netdev_ops->ndo_bond_detach(port->dev);
>> }
> Do we really need new ndos here? Cannot we learn this via
> NETDEV_CHANGEUPPER?
+1, I was just typing a similar response. We need this for switchdevices
too and notifiers can be used here.
next prev parent reply other threads:[~2015-02-20 17:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 10:51 [PATCH net-next 0/2] dsa: implement HW bonding Jonas Johansson
2015-02-20 10:51 ` [PATCH net-next 1/2] dsa: bonding: " Jonas Johansson
2015-02-20 15:12 ` Andrew Lunn
2015-02-20 16:19 ` Jonas Johansson
2015-02-20 16:41 ` Florian Fainelli
2015-02-20 17:56 ` roopa [this message]
2015-02-20 19:28 ` Jonas Johansson
2015-02-21 16:57 ` Jiri Pirko
2015-02-21 20:43 ` Andrew Lunn
2015-02-21 21:12 ` Scott Feldman
2015-02-23 15:52 ` Jonas Johansson
2015-02-20 10:51 ` [PATCH net-next 2/2] mv88e6131: bonding: implement single device trunking Jonas Johansson
2015-02-20 15:26 ` Andrew Lunn
2015-02-20 15:56 ` Jonas Johansson
2015-03-06 17:06 ` Florian Fainelli
2015-03-06 19:23 ` Andrew Lunn
2015-03-06 20:47 ` Florian Fainelli
2015-03-06 21:47 ` Andrew Lunn
2015-03-06 22:43 ` Scott Feldman
2015-03-07 14:38 ` Jiri Pirko
2015-03-07 17:31 ` John Fastabend
2015-02-21 16:40 ` [PATCH net-next 0/2] dsa: implement HW bonding Jiri Pirko
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=54E7754A.3070407@cumulusnetworks.com \
--to=roopa@cumulusnetworks$(echo .)com \
--cc=f.fainelli@gmail$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=jonas.johansson@westermo$(echo .)se \
--cc=jonasj76@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sfeldma@gmail$(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