From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters Date: Tue, 17 Jul 2018 08:36:37 -0700 Message-ID: <20180717153645.7500-1-f.fainelli@gmail.com> Cc: Florian Fainelli , linville@tuxdriver.com, davem@davemloft.net, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com To: netdev@vger.kernel.org Return-path: Received: from mail-wr1-f65.google.com ([209.85.221.65]:43560 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731455AbeGQQKZ (ORCPT ); Tue, 17 Jul 2018 12:10:25 -0400 Received: by mail-wr1-f65.google.com with SMTP id b15-v6so1697369wrv.10 for ; Tue, 17 Jul 2018 08:37:12 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: 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(-) -- 2.14.1