• Petr Machata's avatar
    mlxsw: spectrum_qdisc: Offload mirroring on RED qevent early_drop · f6668eac
    Petr Machata authored
    The RED qevents early_drop and mark can be offloaded under the following
    fairly strict conditions:
    
    - At most one filter is configured at the qevent block
    - The protocol is "any"
    - The classifier is matchall
    - The action is trap, sample, or mirror with the same conditions as
      with other SPAN offloads
    - The hw_counters type is none
    
    In this patchset, implement offload of mirror for early_drop qevent.
    The ECN trigger is currently not implemented in the FW and therefore
    the mark qevent is not supported.
    
    The qevent notifications look exactly like regular block binding
    notifications with a binder type that identifies them as qevents.
    Therefore the details of processing this binding are fairly similar
    to the matchall offload.
    
    struct flow_block_offload.sch points at the qdisc in question. Use it to
    figure out if the qdisc is offloaded at all and what TC it configures.
    Bounce bindings on not-offloaded qdiscs.
    
    Individual bindings are kept in a list so that several qevents can share
    the same block and all binding points get configured as the configured
    filters change.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f6668eac
spectrum.h 41.4 KB