From patchwork Wed Dec 22 14:43:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ong Boon Leong X-Patchwork-Id: 12697108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E4FAC433F5 for ; Wed, 22 Dec 2021 14:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=b/Bmohq+XXu4kuLyEPagFDLHEzg4FV2+ngCXxArdEBc=; b=a0CJD/SGm23hIl lAOLPQU+YldmYeIt63oQSDTtshQJJ1jhH6PxQhj9DU46aDIj8rvSbgE/Acg5pijK3Ubfhm2/E4bEz xX+ZCF8YdLkVP8X5j0cjZ9+LhOWr88omxB6FKKD+9dfTr3WHVr9M92UiMxC7dWYgtdaBqXcHribcg 3gLSlk0a+yfnpX4qUgd3OEcdrpwJueqUug6O9EwlyW67agG5E54uSKr3Qg26s5WOFWCXlPVlEa2Vz keznKbYH/wstFL7LfIUOyvHtv3QOWkCRJQxt/V73sfXFAG9MTyWuNJ+z9XY+jApRgs45O6CE5lFYa Y45PU51q9TvtmVFJ/RVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n02t0-00AhEW-Fn; Wed, 22 Dec 2021 14:46:34 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n02sw-00AhDA-Op for linux-arm-kernel@lists.infradead.org; Wed, 22 Dec 2021 14:46:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640184390; x=1671720390; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pXXvBBejEF5X/NbaqsX7lZ7IENAcC8X7kUlHPaIcZZ8=; b=A6VAEb9ae97C0+YCOENiEKCbrUVN4xQ8txf6n1eynlDVgCrb0Yb3arv/ reoDTRock5S2rQThRsPA2Vzuct1RqhJqPgyuEOsFXFAaYhbIsyxlxERmt eGfMU7dJuLcisFPDXgP8VW/V/uv+GQrMHqkui3PQErpcULtXZmYSJAPSh VcfwQ7fBJnkxqpsKG038yk8XVGVXU87DPFUucTpik9FA6Bj9QcWZQF83a bqia4gxqaWYNe2Ru5h7KGb6Ifhm+7dQzWCj84keEIkj2ZDa1A2eK9L+aF a58XVCKU4gl1gw2+hKHqPME9479KIeTKIln+L9nY67DupPENMHIF/N9be Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10205"; a="220641686" X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="220641686" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2021 06:46:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,226,1635231600"; d="scan'208";a="522120921" Received: from p12hl98bong5.png.intel.com ([10.158.65.178]) by fmsmga007.fm.intel.com with ESMTP; 22 Dec 2021 06:46:24 -0800 From: Ong Boon Leong To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , alexandre.torgue@foss.st.com, Kurt Kanzenbach , Sebastian Andrzej Siewior Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Ong Boon Leong Subject: [PATCH net-next v2 0/1] net: stmmac: add EthType Rx Frame steering Date: Wed, 22 Dec 2021 22:43:09 +0800 Message-Id: <20211222144310.2761661-1-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211222_064630_840309_1C4CBEFE X-CRM114-Status: UNSURE ( 6.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Now that VLAN priority RX steering issue patch [1] is merged, this is the remaining patch from the original series to add LLDP and IEEE1588 EtherType RX frame steering in tc flower. As before, below are the test steps for checking out the newly added features (LLDP and PTP) together with VLAN priority:- # Setup traffic class and ingress filter $ IFDEVNAME=eth0 $ tc qdisc add dev $IFDEVNAME ingress $ tc qdisc add dev $IFDEVNAME root mqprio num_tc 8 \ map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 0 # Add two VLAN priority based RX Frame Steering $ tc filter add dev $IFDEVNAME parent ffff: protocol 802.1Q \ flower vlan_prio 1 hw_tc 1 $ tc filter add dev $IFDEVNAME parent ffff: protocol 802.1Q \ flower vlan_prio 2 hw_tc 2 # For LLDP $ tc filter add dev $IFDEVNAME parent ffff: protocol 0x88cc \ flower hw_tc 5 # For PTP $ tc filter add dev $IFDEVNAME parent ffff: protocol 0x88f7 \ flower hw_tc 6 # Show the ingress tc filters $ tc filter show dev $IFDEVNAME ingress filter parent ffff: protocol ptp pref 49149 flower chain 0 filter parent ffff: protocol ptp pref 49149 flower chain 0 handle 0x1 hw_tc 6 eth_type 88f7 in_hw in_hw_count 1 filter parent ffff: protocol LLDP pref 49150 flower chain 0 filter parent ffff: protocol LLDP pref 49150 flower chain 0 handle 0x1 hw_tc 5 eth_type 88cc in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49151 flower chain 0 filter parent ffff: protocol 802.1Q pref 49151 flower chain 0 handle 0x1 hw_tc 2 vlan_prio 2 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49152 flower chain 0 filter parent ffff: protocol 802.1Q pref 49152 flower chain 0 handle 0x1 hw_tc 1 vlan_prio 1 in_hw in_hw_count 1 # Delete tc filters $ tc filter del dev $IFDEVNAME parent ffff: pref 49149 $ tc filter del dev $IFDEVNAME parent ffff: pref 49150 $ tc filter del dev $IFDEVNAME parent ffff: pref 49151 $ tc filter del dev $IFDEVNAME parent ffff: pref 49152 v1->v2 change: - change from __be16 to u16 etype - change ETHER_TYPE_FULL_MASK to use cpu_to_be16() macro Thanks, BL [1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=aeb7c75cb77478fdbf821628e9c95c4baa9adc63 Ong Boon Leong (1): net: stmmac: add tc flower filter for EtherType matching drivers/net/ethernet/stmicro/stmmac/stmmac.h | 3 + .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 121 ++++++++++++++++++ 2 files changed, 124 insertions(+)