From: David S. Miller Date: Tue, 14 Jul 2020 21:50:50 +0000 (-0700) Subject: Merge branch 'mlxsw-Mirror-to-CPU-preparations' X-Git-Tag: v5.15~3197^2~254 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d12e50fdd336b9b2e86285dab02a3bb743548c7;p=platform%2Fkernel%2Flinux-starfive.git Merge branch 'mlxsw-Mirror-to-CPU-preparations' Ido Schimmel says: ==================== mlxsw: Mirror to CPU preparations A future patch set will add the ability to trap packets that were dropped due to buffer related reasons (e.g., early drop). Internally this is implemented by mirroring these packets towards the CPU port. This patch set adds the required infrastructure to enable such mirroring. Patches #1-#2 extend two registers needed for above mentioned functionality. Patches #3-#6 gradually add support for setting the mirroring target of a SPAN (mirroring) agent as the CPU port. This is only supported from Spectrum-2 onwards, so an error is returned for Spectrum-1. Patches #7-#8 add the ability to set a policer on a SPAN agent. This is required because unlike regularly trapped packets, a policer cannot be set on the trap group with which the mirroring trap is associated. Patches #9-#12 parse the mirror reason field from the Completion Queue Element (CQE). Unlike other trapped packets, the trap identifier of mirrored packets only indicates that the packet was mirrored, but not why. The reason (e.g., tail drop) is encoded in the mirror reason field. Patch #13 utilizes the mirror reason field in order to lookup the matching Rx listener. This allows us to maintain the abstraction that an Rx listener is mapped to a single trap reason. Without taking the mirror reason into account we would need to register a single Rx listener for all mirrored packets. ==================== Signed-off-by: David S. Miller --- 3d12e50fdd336b9b2e86285dab02a3bb743548c7