linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com,
	davem@davemloft.net
Cc: jiri@resnulli.us, idosch@idosch.org, kuba@kernel.org,
	netdev@vger.kernel.org, xiaoliang.yang_1@nxp.com,
	linux-kernel@vger.kernel.org, horatiu.vultur@microchip.com,
	alexandre.belloni@bootlin.com, allan.nielsen@microchip.com,
	joergen.andreasen@microchip.com, UNGLinuxDriver@microchip.com,
	yangbo.lu@nxp.com, alexandru.marginean@nxp.com, po.liu@nxp.com,
	claudiu.manoil@nxp.com, leoyang.li@nxp.com,
	nikolay@cumulusnetworks.com, roopa@cumulusnetworks.com
Subject: [PATCH v2 net-next 0/6] Port and flow policers for DSA (SJA1105, Felix/Ocelot)
Date: Sun, 29 Mar 2020 14:51:56 +0300	[thread overview]
Message-ID: <20200329115202.16348-1-olteanv@gmail.com> (raw)

From: Vladimir Oltean <vladimir.oltean@nxp.com>

This series adds support for 2 types of policers:
 - port policers, via tc matchall filter
 - flow policers, via tc flower filter
for 2 DSA drivers:
 - sja1105
 - felix/ocelot

First we start with ocelot/felix. Prior to this patch, the ocelot core
library currently only supported:
- Port policers
- Flow-based dropping and trapping
But the felix wrapper could not actually use the port policers due to
missing linkage and support in the DSA core. So one of the patches
addresses exactly that limitation by adding the missing support to the
DSA core. The other patch for felix flow policers (via the VCAP IS2
engine) is actually in the ocelot library itself, since the linkage with
the ocelot flower classifier has already been done in an earlier patch
set.

Then with the newly added .port_policer_add and .port_policer_del, we
can also start supporting the L2 policers on sja1105.

Then, for full functionality of these L2 policers on sja1105, we also
implement a more limited set of flow-based policing keys for this
switch, namely for broadcast and VLAN PCP.

Series version 1 was submitted here:
https://patchwork.ozlabs.org/cover/1263353/

Nothing functional changed in v2, only a rebase.

Vladimir Oltean (5):
  net: dsa: refactor matchall mirred action to separate function
  net: dsa: add port policers
  net: dsa: felix: add port policers
  net: dsa: sja1105: add configuration of port policers
  net: dsa: sja1105: add broadcast and per-traffic class policers

Xiaoliang Yang (1):
  net: mscc: ocelot: add action of police on vcap_is2

 drivers/net/dsa/ocelot/felix.c            |  24 ++
 drivers/net/dsa/sja1105/Makefile          |   1 +
 drivers/net/dsa/sja1105/sja1105.h         |  40 +++
 drivers/net/dsa/sja1105/sja1105_flower.c  | 340 ++++++++++++++++++++++
 drivers/net/dsa/sja1105/sja1105_main.c    | 136 +++++++--
 drivers/net/ethernet/mscc/ocelot_ace.c    |  64 +++-
 drivers/net/ethernet/mscc/ocelot_ace.h    |   4 +
 drivers/net/ethernet/mscc/ocelot_flower.c |   9 +
 drivers/net/ethernet/mscc/ocelot_police.c |  27 ++
 drivers/net/ethernet/mscc/ocelot_police.h |  11 +-
 drivers/net/ethernet/mscc/ocelot_tc.c     |   2 +-
 include/net/dsa.h                         |  13 +-
 include/soc/mscc/ocelot.h                 |   9 +
 net/dsa/slave.c                           | 145 ++++++---
 14 files changed, 742 insertions(+), 83 deletions(-)
 create mode 100644 drivers/net/dsa/sja1105/sja1105_flower.c

-- 
2.17.1


             reply	other threads:[~2020-03-29 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 11:51 Vladimir Oltean [this message]
2020-03-29 11:51 ` [PATCH v2 net-next 1/6] net: mscc: ocelot: add action of police on vcap_is2 Vladimir Oltean
2020-03-29 11:51 ` [PATCH v2 net-next 2/6] net: dsa: refactor matchall mirred action to separate function Vladimir Oltean
2020-03-29 11:51 ` [PATCH v2 net-next 3/6] net: dsa: add port policers Vladimir Oltean
2020-03-29 11:52 ` [PATCH v2 net-next 4/6] net: dsa: felix: " Vladimir Oltean
2020-03-29 11:52 ` [PATCH v2 net-next 5/6] net: dsa: sja1105: add configuration of " Vladimir Oltean
2020-03-29 11:52 ` [PATCH v2 net-next 6/6] net: dsa: sja1105: add broadcast and per-traffic class policers Vladimir Oltean
2020-03-30 18:44 ` [PATCH v2 net-next 0/6] Port and flow policers for DSA (SJA1105, Felix/Ocelot) 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=20200329115202.16348-1-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=joergen.andreasen@microchip.com \
    --cc=kuba@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=po.liu@nxp.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=vivien.didelot@gmail.com \
    --cc=xiaoliang.yang_1@nxp.com \
    --cc=yangbo.lu@nxp.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).