netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com,
	mlxsw@mellanox.com, nikolay@cumulusnetworks.com, andrew@lunn.ch,
	dsa@cumulusnetworks.com, edumazet@google.com, willemb@google.com,
	johannes.berg@intel.com, dcaratti@redhat.com, pabeni@redhat.com,
	daniel@iogearbox.net, f.fainelli@gmail.com, fw@strlen.de,
	gfree.wind@vip.163.com
Subject: [patch net-next v2 0/7] mlxsw: Add support for partial multicast route offload
Date: Tue,  3 Oct 2017 09:58:05 +0200	[thread overview]
Message-ID: <20171003075812.1540-1-jiri@resnulli.us> (raw)

From: Jiri Pirko <jiri@mellanox.com>

Yotam says:

Previous patchset introduced support for offloading multicast MFC routes to
the Spectrum hardware. As described in that patchset, no partial offloading
is supported, i.e if a route has one output interface which is not a valid
offloadable device (e.g. pimreg device, dummy device, management NIC), the
route is trapped to the CPU and the forwarding is done in slow-path.

Add support for partial offloading of multicast routes, by letting the
hardware to forward the packet to all the in-hardware devices, while the
kernel ipmr module will continue forwarding to all other interfaces.

Similarly to the bridge, the kernel ipmr module will forward a marked
packet to an interface only if the interface has a different parent ID than
the packet's ingress interfaces.

The first patch introduces the offload_mr_fwd_mark skb field, which can be
used by offloading drivers to indicate that a packet had already gone
through multicast forwarding in hardware, similarly to the offload_fwd_mark
field that indicates that a packet had already gone through L2 forwarding
in hardware.

Patches 2 and 3 change the ipmr module to not forward packets that had
already been forwarded by the hardware, i.e. packets that are marked with
offload_mr_fwd_mark and the ingress VIF shares the same parent ID with the
egress VIF.

Patches 4, 5, 6 and 7 add the support in the mlxsw Spectrum driver for trap
and forward routes, while marking the trapped packets with the
offload_mr_fwd_mark.

Yotam Gigi (7):
  skbuff: Add the offload_mr_fwd_mark field
  ipv4: ipmr: Add the parent ID field to VIF struct
  ipv4: ipmr: Don't forward packets already forwarded by hardware
  mlxsw: acl: Introduce ACL trap and forward action
  mlxsw: spectrum: Add trap for multicast trap-and-forward routes
  mlxsw: spectrum: mr_tcam: Add trap-and-forward multicast route
  mlxsw: spectrum: mr: Support trap-and-forward routes

 .../mellanox/mlxsw/core_acl_flex_actions.c         | 17 ++++++++
 .../mellanox/mlxsw/core_acl_flex_actions.h         |  2 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     | 13 ++++++
 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c  | 17 ++++----
 drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h  |  1 +
 .../net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c |  8 ++++
 drivers/net/ethernet/mellanox/mlxsw/trap.h         |  2 +
 include/linux/mroute.h                             |  1 +
 include/linux/skbuff.h                             |  1 +
 net/ipv4/ipmr.c                                    | 48 +++++++++++++++++++---
 10 files changed, 96 insertions(+), 14 deletions(-)

-- 
2.9.5

             reply	other threads:[~2017-10-03  7:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03  7:58 Jiri Pirko [this message]
2017-10-03  7:58 ` [patch net-next v2 1/7] skbuff: Add the offload_mr_fwd_mark field Jiri Pirko
2017-10-03  7:58 ` [patch net-next v2 2/7] ipv4: ipmr: Add the parent ID field to VIF struct Jiri Pirko
2017-10-03 10:25   ` Nikolay Aleksandrov
2017-10-03  7:58 ` [patch net-next v2 3/7] ipv4: ipmr: Don't forward packets already forwarded by hardware Jiri Pirko
2017-10-03 10:26   ` Nikolay Aleksandrov
2017-10-03  7:58 ` [patch net-next v2 4/7] mlxsw: acl: Introduce ACL trap and forward action Jiri Pirko
2017-10-03  7:58 ` [patch net-next v2 5/7] mlxsw: spectrum: Add trap for multicast trap-and-forward routes Jiri Pirko
2017-10-03  7:58 ` [patch net-next v2 6/7] mlxsw: spectrum: mr_tcam: Add trap-and-forward multicast route Jiri Pirko
2017-10-03  7:58 ` [patch net-next v2 7/7] mlxsw: spectrum: mr: Support trap-and-forward routes Jiri Pirko
2017-10-03 17:07 ` [patch net-next v2 0/7] mlxsw: Add support for partial multicast route offload 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=20171003075812.1540-1-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=andrew@lunn.ch \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=dsa@cumulusnetworks.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=fw@strlen.de \
    --cc=gfree.wind@vip.163.com \
    --cc=idosch@mellanox.com \
    --cc=johannes.berg@intel.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    --cc=yotamg@mellanox.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).