From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters Date: Tue, 17 Jul 2018 09:06:37 -0700 Message-ID: <7e48b9b3-3e90-e56e-46af-b1108dc63292@gmail.com> References: <20180717153645.7500-1-f.fainelli@gmail.com> <20180717154702.GD968@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linville@tuxdriver.com, davem@davemloft.net, vivien.didelot@savoirfairelinux.com To: Andrew Lunn Return-path: Received: from mail-qt0-f193.google.com ([209.85.216.193]:33291 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729738AbeGQQkK (ORCPT ); Tue, 17 Jul 2018 12:40:10 -0400 Received: by mail-qt0-f193.google.com with SMTP id c15-v6so1345598qtp.0 for ; Tue, 17 Jul 2018 09:06:49 -0700 (PDT) In-Reply-To: <20180717154702.GD968@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 07/17/2018 08:47 AM, Andrew Lunn wrote: > On Tue, Jul 17, 2018 at 08:36:37AM -0700, Florian Fainelli wrote: >> 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 > > Hi Florian > > What is action 64? There are 8 egress queues per port, and we want to target port 8 here. Number of queues is discoverable through sysfs by scanning /sys/class/net/gphy/queues/tx-*. CPU port number is fixed at 8, we don't have a mechanism AFAICT to expose that to users, because, of course, we don't expose the CPU port with DSA. > >> ethtool -s gphy wol f filters 0x2 > > What does this 0x2 represent? 0x2 = bit 1 is set, which corresponds to the filter ID that was returned from the previous ethtool::rxnfc command invocation. If ethtool --config-nfc returned 3, then we would have used filters 0x8, etc. -- Florian