Skip to content

net: Support Wake-on-LAN using filters

Florian Fainelli netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rulesdrivers/net/dsa/bcm_sf2_cfp.c+2 -11 reply
2/7net: dsa: bcm_sf2: Disable learning while in WoLdrivers/net/dsa/bcm_sf2.c drivers/net/dsa/bcm_sf2_regs.h+13 -12 replies
3/7net: systemport: Do not re-configure upon WoL interruptdrivers/net/ethernet/broadcom/bcmsysport.c+1 -30 replies
4/7net: systemport: Create helper to set MPDdrivers/net/ethernet/broadcom/bcmsysport.c+13 -70 replies
5/7ethtool: Add WAKE_FILTER bitmaskinclude/uapi/linux/ethtool.h+2 -10 replies
6/7net: systemport: Add support for WAKE_FILTERdrivers/net/ethernet/broadcom/bcmsysport.c drivers/net/ethernet/broadcom/bcmsysport.h+109 -168 replies
7/7net: dsa: bcm_sf2: Support WAKE_FILTERdrivers/net/dsa/bcm_sf2.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

Hi all,

This patch series adds support for allowing Wake-on-LAN to wake-up the system using configurable filters. This is particular useful in the context of Android where wake on MDNS is a requirement.

We support this by using the bcm_sf2 Compact Field Processor (CFP) which supports matching packets and tagging them with an unique identifier (Classification ID) that is added in each packet being matched through the use of Broadcom tags. The SYSTEMPORT MAC attached to that switch is then used to match that unique identifier and trigger a system wake-up event.

Last patch is the ethtool modifications to support that feature.

Example:

ethtool --config-nfc gphy flow-type udp4 src-ip 192.168.1.1 dst-ip 192.168.1.32 \
	src-port 1234 dst-port 5678 action 64

Added rule with ID 1

ethtool -s gphy wol f filters 0x2

To wake up the device:

nc -vz -u -p 1234 -s 192.168.1.1 192.168.1.32 5678

Florian Fainelli (7):
net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules
net: dsa: bcm_sf2: Disable learning while in WoL
net: systemport: Do not re-configure upon WoL interrupt
net: systemport: Create helper to set MPD
ethtool: Add WAKE_FILTER bitmask
net: systemport: Add support for WAKE_FILTER
net: dsa: bcm_sf2: Support WAKE_FILTER

 drivers/net/dsa/bcm_sf2.c                  |  14 +++-
 drivers/net/dsa/bcm_sf2_cfp.c              |   3 +-
 drivers/net/dsa/bcm_sf2_regs.h             |   2 +
 drivers/net/ethernet/broadcom/bcmsysport.c | 129 ++++++++++++++++++++++++-----
 drivers/net/ethernet/broadcom/bcmsysport.h |  14 +++-
 include/uapi/linux/ethtool.h               |   3 +-
 6 files changed, 138 insertions(+), 27 deletions(-)
Signature · 1 line
2.14.1