From: Ido Schimmel <idosch@idosch.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jiri@mellanox.com,
mlxsw@mellanox.com, Ido Schimmel <idosch@mellanox.com>
Subject: Re: [PATCH net-next 00/14] mlxsw: Various trap changes - part 2
Date: Wed, 27 May 2020 02:19:05 +0300 [thread overview]
Message-ID: <20200526231905.GA1507270@splinter> (raw)
In-Reply-To: <20200526151437.6fc3fb67@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
On Tue, May 26, 2020 at 03:14:37PM -0700, Jakub Kicinski wrote:
> On Tue, 26 May 2020 02:05:42 +0300 Ido Schimmel wrote:
> > From: Ido Schimmel <idosch@mellanox.com>
> >
> > This patch set contains another set of small changes in mlxsw trap
> > configuration. It is the last set before exposing control traps (e.g.,
> > IGMP query, ARP request) via devlink-trap.
>
> When traps were introduced my understanding was that they are for
> reporting frames which hit an expectation on the datapath. IOW the
> primary use for them was troubleshooting.
>
> Now, if I'm following things correctly we have explicit DHCP, IGMP,
> ARP, ND, BFD etc. traps. Are we still in the troubleshooting realm?
First of all, we always had them. This patch set mainly performs some
cleanups in mlxsw.
Second, I don't understand how you got the impression that the primary
use of devlink-trap is troubleshooting. I was very clear and transparent
about the scope of the work from the very beginning and I don't wish to
be portrayed as if I wasn't.
The first two paragraphs from the kernel documentation [1] explicitly
mention the ability to trap control packets to the CPU:
"Devices capable of offloading the kernel’s datapath and perform
functions such as bridging and routing must also be able to send
specific packets to the kernel (i.e., the CPU) for processing.
For example, a device acting as a multicast-aware bridge must be able to
send IGMP membership reports to the kernel for processing by the bridge
module. Without processing such packets, the bridge module could never
populate its MDB."
In my reply to you from almost a year ago I outlined the entire plan for
devlink-trap [2]:
"Switch ASICs have dedicated traps for specific packets. Usually, these
packets are control packets (e.g., ARP, BGP) which are required for the
correct functioning of the control plane. You can see this in the SAI
interface, which is an abstraction layer over vendors' SDKs:
https://github.com/opencomputeproject/SAI/blob/master/inc/saihostif.h#L157
We need to be able to configure the hardware policers of these traps and
read their statistics to understand how many packets they dropped. We
currently do not have a way to do any of that and we rely on hardcoded
defaults in the driver which do not fit every use case (from
experience):
https://elixir.bootlin.com/linux/v5.2/source/drivers/net/ethernet/mellanox/mlxsw/spectrum.c#L4103
We plan to extend devlink-trap mechanism to cover all these use cases. I
hope you agree that this functionality belongs in devlink given it is a
device-specific configuration and not a netdev-specific one.
That being said, in its current form, this mechanism is focused on traps
that correlate to packets the device decided to drop as this is very
useful for debugging."
In the last cycle, when I added the ability to configure trap policers
[3] I again mentioned under "Future plans" that I plan to "Add more
packet traps. For example, for control packets (e.g., IGMP)".
If you worry that packets received via control traps will be somehow
tunneled to user space via drop_monitor, then I can assure you this is
not the case. You can refer to this commit [4] from the next submission.
Thanks
[1] https://www.kernel.org/doc/html/latest/networking/devlink/devlink-trap.html
[2] https://lore.kernel.org/netdev/20190709123844.GA27309@splinter/
[3] https://lwn.net/Articles/815948/
[4] https://github.com/jpirko/linux_mlxsw/commit/4a5f0a8034f0f10301680fe68559e3debacf534d
next prev parent reply other threads:[~2020-05-26 23:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 23:05 [PATCH net-next 00/14] mlxsw: Various trap changes - part 2 Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 01/14] mlxsw: spectrum: Use dedicated trap group for ACL trap Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 02/14] mlxsw: spectrum: Use same switch case for identical groups Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 03/14] mlxsw: spectrum: Rename IPv6 ND trap group Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 04/14] mlxsw: spectrum: Use same trap group for various IPv6 packets Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 05/14] mlxsw: spectrum: Use separate trap group for FID miss Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 06/14] mlxsw: spectrum: Use same trap group for local routes and link-local destination Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 07/14] mlxsw: spectrum: Reduce priority of locally delivered packets Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 08/14] mlxsw: switchx2: Move SwitchX-2 trap groups out of main enum Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 09/14] mlxsw: spectrum_trap: Do not hard code "thin" policer identifier Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 10/14] mlxsw: reg: Move all trap groups under the same enum Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 11/14] mlxsw: spectrum: Share one group for all locally delivered packets Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 12/14] mlxsw: spectrum: Treat IPv6 link-local SIP as an exception Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 13/14] mlxsw: spectrum: Add packet traps for BFD packets Ido Schimmel
2020-05-25 23:05 ` [PATCH net-next 14/14] mlxsw: spectrum_router: Allow programming link-local prefix routes Ido Schimmel
2020-05-26 22:14 ` [PATCH net-next 00/14] mlxsw: Various trap changes - part 2 Jakub Kicinski
2020-05-26 23:19 ` Ido Schimmel [this message]
2020-05-26 23:43 ` Jakub Kicinski
2020-05-27 7:38 ` Ido Schimmel
2020-05-27 19:50 ` Jakub Kicinski
2020-05-29 18:35 ` Ido Schimmel
2020-05-27 3:34 ` 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=20200526231905.GA1507270@splinter \
--to=idosch@idosch.org \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
/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).