From: Jiri Pirko <jiri@resnulli.us>
To: Scott Feldman <sfeldma@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Jonas Johansson <jonasj76@gmail.com>,
Netdev <netdev@vger.kernel.org>,
Jonas Johansson <jonas.johansson@westermo.se>
Subject: Re: [PATCH net-next 2/2] mv88e6131: bonding: implement single device trunking
Date: Sat, 7 Mar 2015 15:38:38 +0100 [thread overview]
Message-ID: <20150307143838.GD2017@nanopsycho.orion> (raw)
In-Reply-To: <CAE4R7bBXbNNJ8VyCJ_01Ht4gWhCaYOGv3f_pUS_2grcU3i3OJw@mail.gmail.com>
Fri, Mar 06, 2015 at 11:43:55PM CET, sfeldma@gmail.com wrote:
>On Fri, Mar 6, 2015 at 1:47 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> Hi Florian
>>
>>> Most Broadcom switches, either SF2 or roboswitch (b53) have a limit of 2
>>> trunking groups, without limitations on the number of ports included in
>>> any of these two groups.
>>
>> O.K, so maybe we want the basic resource management in the DSA layer,
>> not the switch drivers.
>>
>>> The larger question is once we start advertising capabilities, where
>>> does that stop, right? It would probably be simpler for now to e.g:
>>> allow 2 trunking groups to be configured, and when trying to configure a
>>> 3rd one, return -ENOSPC and act upon that to either take the software
>>> slow path (which is probably not possible) or just return a hard error
>>> condition.
>>
>> This is more than a DSA question. It applies to all the hardware
>> acceleration being discussed at the moment. As you hinted to above, i
>> suppose we have two different situations:
>>
>> 1) We can fall back to a software slow path.
>>
>> 2) There is no software fallback, we have to error out, and it would
>> be nice to have a well defined error code for out of hardware
>> resources.
>>
>> We also should think about how we tell user space we have fallen back
>> to a slow path. I'm sure users want to know why it works, but works
>> much slower.
>
>For the general hardware acceleration of bonds, my thoughts for switchdev are:
>
>(Assume 802.3ad LAG setup for discussion sake, other bonding modes are similar).
>
>1. The driver has access to port membership notification via netevent,
>so driver knows which ports are in which bonds. This notification is
>passive; there is no way to signal to user that when port was put in a
>bond if it was programmed into a device LAG group or not. It's
>totally up to the driver and device resources to make that decision.
Exactly. The fact if another group can be added or not should be decided
and handled by driver. The driver then notifies higher layers using
switchdev notifier event.
>
>2. The driver can know port active status via netevent as well. If
>device has the port in a LAG group, then reflect the active status
>down to device port. Again, a passive notification.
>
>3. CPU-originating egress traffic would be LAGed by bonding (or team)
>driver. (This is true regardless if the device LAG group was setup or
>not).
>
>4a. If device LAG group setup, forwarded traffic would be LAG egressed
>by device (fast path).
>
>4b. If no device LAG group, ingress traffic is sent to CPU (slow path)
>for bonding (or team) to LAG egress.
>
>So software fall-back (4b) is the default case if driver/device can't
>setup LAG group for forwarding.
>
>So the question is: how does user know which bonds are accelerated?
>So far, we've used the label "external" to mark L2 bridge FDB which
>are offloaded to the device and "external" to mark L3 routes offloaded
>to the device. Do we mark bonds as "external" if the LAG path is
>offloaded to the device?
I believe that this is the way to go. Introduce this flag for bond and
team to signal user if LAG is offloaded or not.
>
>-scott
next prev parent reply other threads:[~2015-03-07 14:38 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
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 [this message]
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=20150307143838.GD2017@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=jonas.johansson@westermo.se \
--cc=jonasj76@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@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.