netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, yotamg@mellanox.com,
	eladr@mellanox.com, idosch@mellanox.com, nogahf@mellanox.com,
	ogerlitz@mellanox.com, jhs@mojatatu.com,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [patch net-next v2 0/9] mlxsw: implement port mirroring offload
Date: Fri, 22 Jul 2016 12:26:30 -0700	[thread overview]
Message-ID: <b31ce9ad-3d64-5e4b-b616-8060e2e26b7c@gmail.com> (raw)
In-Reply-To: <20160722192056.GB2050@nanopsycho.orion>

On 07/22/2016 12:20 PM, Jiri Pirko wrote:
> Fri, Jul 22, 2016 at 08:24:31PM CEST, f.fainelli@gmail.com wrote:
>> On 07/21/2016 03:03 AM, Jiri Pirko wrote:
>>> From: Jiri Pirko <jiri@mellanox.com>
>>>
>>> This patchset introduces tc matchall classifier and its offload
>>> to Spectrum hardware. In combination with mirred action, defined port mirroring
>>> setup is offloaded by mlxsw/spectrum driver.
>>>
>>> The commands used for creating mirror ports:
>>>
>>> # ingress mirroring using matchall
>>> tc qdisc  add dev eth25 handle ffff: ingress
>>> tc filter add dev eth25 parent ffff:            \
>>>         matchall skip_sw                        \
>>>         action mirred egress mirror             \
>>>         dev eth27
>>>
>>> # egress mirroring using matchall
>>> tc qdisc add dev eth25 handle 1: root prio
>>> tc filter add dev eth25 parent 1:               \
>>>         matchall skip_sw                        \
>>>         action mirred egress mirror             \
>>>         dev eth27
>>
>> Is there any logic that guards against the following cases where the
>> target device is:
>>
>> - outside of the switch hardware/cluster (which would imply going
>> through software)?
> 
> In that case only kernel (slow) path can be used. Not possible to
> offload of course.

So then what happens if I target a device that is outside of the switch,
do we get an error like -EOPNOTSUPP, or this just silently succeeed, but
nothing happens?

> 
> 
>> - has a downstream speed which is lower than the mirrored device?
> 
> The default behaviour is "strict" which means that if the mirrored
> packet can't be send, the packet is dropped. That is aligned with the
> behaviour of act_mirred.

What determines if the packet can be sent or not?

> 
> 
>>
>> this might already be in place for 1), I just could not locate it, thanks!
>>
>>>
>>> These patches contain:
>>>  - Resource query implementation
>>>  - Hardware port mirorring support for spectrum.
>>>  - Definition of the matchall traffic classifier.
>>>  - General support for hw-offloading for that classifier.
>>>  - Specific spectrum implementaion for matchall offloading.
>>>
>>> ---
>>> v1->v2:
>>>  - couple of minor style fixes
>>>
>>> Jiri Pirko (1):
>>>   net/sched: introduce Match-all classifier
>>>
>>> Nogah Frankel (2):
>>>   mlxsw: pci: Add resources query implementation.
>>>   mlxsw: pci: Add max span resources to resources query
>>>
>>> Yotam Gigi (6):
>>>   net/sched: Add match-all classifier hw offloading.
>>>   mlxsw: reg: Add Shared Buffer Internal Buffer register
>>>   mlxsw: reg: Add Monitoring Port Analyzer Table register
>>>   mlxsw: reg: Add the Monitoring Port Analyzer register
>>>   net/sched: act_mirred: Add helper inlines to access tcf_mirred info.
>>>   mlxsw: spectrum: Add support in matchall mirror TC offloading
>>>
>>>  drivers/net/ethernet/mellanox/mlxsw/cmd.h      |  32 ++
>>>  drivers/net/ethernet/mellanox/mlxsw/core.c     |  10 +-
>>>  drivers/net/ethernet/mellanox/mlxsw/core.h     |  11 +-
>>>  drivers/net/ethernet/mellanox/mlxsw/pci.c      |  64 +++-
>>>  drivers/net/ethernet/mellanox/mlxsw/reg.h      | 162 +++++++++
>>>  drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 465 ++++++++++++++++++++++++-
>>>  drivers/net/ethernet/mellanox/mlxsw/spectrum.h |  44 +++
>>>  drivers/net/ethernet/mellanox/mlxsw/switchx2.c |   1 +
>>>  include/linux/netdevice.h                      |   2 +
>>>  include/net/pkt_cls.h                          |  11 +
>>>  include/net/tc_act/tc_mirred.h                 |   9 +
>>>  include/uapi/linux/pkt_cls.h                   |  12 +
>>>  net/sched/Kconfig                              |  10 +
>>>  net/sched/Makefile                             |   1 +
>>>  net/sched/cls_matchall.c                       | 318 +++++++++++++++++
>>>  15 files changed, 1148 insertions(+), 4 deletions(-)
>>>  create mode 100644 net/sched/cls_matchall.c
>>>
>>
>>
>> -- 
>> Florian


-- 
Florian

  reply	other threads:[~2016-07-22 19:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 10:03 [patch net-next v2 0/9] mlxsw: implement port mirroring offload Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 1/9] mlxsw: pci: Add resources query implementation Jiri Pirko
2016-07-22 17:17   ` David Ahern
2016-07-22 19:17     ` Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 2/9] mlxsw: pci: Add max span resources to resources query Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 3/9] net/sched: introduce Match-all classifier Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 4/9] net/sched: Add match-all classifier hw offloading Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 5/9] mlxsw: reg: Add Shared Buffer Internal Buffer register Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 6/9] mlxsw: reg: Add Monitoring Port Analyzer Table register Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 7/9] mlxsw: reg: Add the Monitoring Port Analyzer register Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 8/9] net/sched: act_mirred: Add helper inlines to access tcf_mirred info Jiri Pirko
2016-07-21 10:03 ` [patch net-next v2 9/9] mlxsw: spectrum: Add support in matchall mirror TC offloading Jiri Pirko
2016-07-22 18:24 ` [patch net-next v2 0/9] mlxsw: implement port mirroring offload Florian Fainelli
2016-07-22 19:20   ` Jiri Pirko
2016-07-22 19:26     ` Florian Fainelli [this message]
2016-07-22 19:38       ` Jiri Pirko
2016-07-25  6:12 ` 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=b31ce9ad-3d64-5e4b-b616-8060e2e26b7c@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=eladr@mellanox.com \
    --cc=idosch@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nogahf@mellanox.com \
    --cc=ogerlitz@mellanox.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).