]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: ksz9477: port mirror sniffing limited to one port
authorArun Ramadoss <arun.ramadoss@microchip.com>
Thu, 28 Apr 2022 07:07:09 +0000 (12:37 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Apr 2022 01:41:07 +0000 (18:41 -0700)
commitdfac95323f9f7a205c290cb45d129baee6a869df
tree57c989d848da2f844ba474fa9a3e5ff5e0093d9f
parentd24b06c0b8c7de91d749e81dbd6291e0ac5cd0e0
net: dsa: ksz9477: port mirror sniffing limited to one port

This patch limits the sniffing to only one port during the mirror add.
And during the mirror_del it checks for all the ports using the sniff,
if and only if no other ports are referring, sniffing is disabled.
The code is updated based on the review comments of LAN937x port mirror
patch.

Link: https://patchwork.kernel.org/project/netdevbpf/patch/20210422094257.1641396-8-prasanna.vengateshan@microchip.com/
Fixes: 93279a8384af ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Prasanna Vengateshan <prasanna.vengateshan@microchip.com>
Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Link: https://lore.kernel.org/r/20220428070709.7094-1-arun.ramadoss@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz9477.c