All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, arkadis@mellanox.com, idosch@mellanox.com,
	mlxsw@mellanox.com, jhs@mojatatu.com, ivecera@redhat.com,
	roopa@cumulusnetworks.com, f.fainelli@gmail.com,
	vivien.didelot@savoirfairelinux.com, john.fastabend@gmail.com,
	andrew@lunn.ch, simon.horman@netronome.com
Subject: [patch net-next v2 0/8] Add support for pipeline debug (dpipe)
Date: Tue, 28 Mar 2017 17:24:09 +0200	[thread overview]
Message-ID: <1490714657-6116-1-git-send-email-jiri@resnulli.us> (raw)

From: Jiri Pirko <jiri@mellanox.com>

Arkadi says:

While doing the hardware offloading process much of the hardware
specifics cannot be presented. An example for such is the routing
LPM algorithm which differ in hardware implementation from the
kernel software implementation. The only information the user receives
is whether specific route is offloaded or not, but he cannot really
understand the underlying implementation nor get the specific statistics
related to that process.

Another example is ACL offload using TC which is commonly implemented
using TCAM memory. Currently there is no capability to gain visibility
into the TCAM structure and to debug suboptimal resource allocation.

This patchset introduces capability for exporting the ASICs pipeline
abstraction via devlink infrastructure, which should serve as an
complementary tool. This infrastructure allows the user to get visibility
into the ASIC by modeling it as a set of match/action tables.

The main objects defined:
Table - abstraction for a single pipeline stage. Contains the
        available match/actions and counter availability.
Entry - entry in a specific table with specific matches/actions
        values and dedicated counter.
Header/field - tuples which describes the tables behavior.

As an example one of the ASIC's L3 blocks will be modeled. The egress
rif (router interface) table is the final step in the L3 pipeline
processing which does match on the internal rif index which was
determined before by the routing logic. The erif table determines
whether to forward or drop the packet and updates the corresponding
rif L3 statistics.

To expose this internal resources a special metadata header will
be introduced that describes the internal information gathered by
the ASIC's pipeline and contains the following fields: rif_port_index,
forward and drop.

Some internal hardware resources have direct mapping to kernel
objects. For example the rif_port_index is mapped to the net-devices
ifindex. By providing this mapping the users gains visibility into
the offloading process.

Follow-up work will include exporting more L3 tables which will give
visibility into the routing process.

First stage is adding support for dpipe in devlink. Next add support
in spectrum driver. Finally implement egress router interface
(erif) table for spectrum ASIC as an example.

---
v1->v2: Please see individual patches

Arkadi Sharshevsky (8):
  devlink: Support for pipeline debug (dpipe)
  mlxsw: reg: Add counter fields to RITR register
  mlxsw: spectrum: Add placeholder for dpipe
  mlxsw: spectrum: Add definition for egress rif table
  mlxsw: reg: Add Router Interface Counter Register
  mlxsw: spectrum: Support for counters on router interfaces
  mlxsw: spectrum_router: Add rif helper functions
  mlxsw: spectrum: Add Support for erif table entries access

 drivers/net/ethernet/mellanox/mlxsw/Makefile       |   2 +-
 drivers/net/ethernet/mellanox/mlxsw/reg.h          | 178 +++++
 drivers/net/ethernet/mellanox/mlxsw/resources.h    |   2 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |  10 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c |   9 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h |   1 +
 .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c   | 351 +++++++++
 .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h   |  43 ++
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 174 +++++
 .../net/ethernet/mellanox/mlxsw/spectrum_router.h  |  58 ++
 include/net/devlink.h                              | 259 +++++++
 include/uapi/linux/devlink.h                       |  67 +-
 net/core/devlink.c                                 | 836 +++++++++++++++++++++
 13 files changed, 1988 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
 create mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h
 create mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h

-- 
2.7.4

             reply	other threads:[~2017-03-28 15:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 15:24 Jiri Pirko [this message]
2017-03-28 15:24 ` [patch net-next v2 1/8] devlink: Support for pipeline debug (dpipe) Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 2/8] mlxsw: reg: Add counter fields to RITR register Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 3/8] mlxsw: spectrum: Add placeholder for dpipe Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 4/8] mlxsw: spectrum: Add definition for egress rif table Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 5/8] mlxsw: reg: Add Router Interface Counter Register Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 6/8] mlxsw: spectrum: Support for counters on router interfaces Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 7/8] mlxsw: spectrum_router: Add rif helper functions Jiri Pirko
2017-03-28 15:24 ` [patch net-next v2 8/8] mlxsw: spectrum: Add Support for erif table entries access Jiri Pirko
2017-03-28 15:26 ` [patch iproute2/net-next repost] devlink: Add support for pipeline debug (dpipe) Jiri Pirko
2017-04-12 23:45   ` Stephen Hemminger
2017-04-13  9:30     ` Jiri Pirko
2017-04-14 23:01       ` Stephen Hemminger
2017-04-15  8:59         ` Jiri Pirko
2017-04-15 13:57           ` David Miller
2017-03-28 16:41 ` [patch net-next v2 0/8] " Ivan Vecera
2017-03-29  0:29 ` 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=1490714657-6116-1-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=andrew@lunn.ch \
    --cc=arkadis@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=ivecera@redhat.com \
    --cc=jhs@mojatatu.com \
    --cc=john.fastabend@gmail.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=simon.horman@netronome.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 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.