]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Add plumbing for port mirroring
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 30 Jan 2017 20:41:40 +0000 (12:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jan 2017 20:55:46 +0000 (15:55 -0500)
commit46be0b769a3735466b7bcc0c50bc513f21f4973f
tree788d02870180ae1bcb725eec81ca8f53b4568aaa
parent5151d80c09d18fdbbc24c32a056627e8c6c08248
net: dsa: Add plumbing for port mirroring

Add necessary plumbing at the slave network device level to have switch
drivers implement ndo_setup_tc() and most particularly the cls_matchall
classifier. We add support for two switch operations:

port_add_mirror and port_del_mirror() which configure, on a per-port
basis the mirror parameters requested from the cls_matchall classifier.

Code is largely borrowed from the Mellanox Spectrum switch driver.

Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/dsa_priv.h
net/dsa/slave.c