From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 245F3C6379D for ; Tue, 24 Nov 2020 09:40:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFB2E2076B for ; Tue, 24 Nov 2020 09:40:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="h0lhW0PL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731393AbgKXJkG (ORCPT ); Tue, 24 Nov 2020 04:40:06 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:4725 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731388AbgKXJkC (ORCPT ); Tue, 24 Nov 2020 04:40:02 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 24 Nov 2020 01:40:02 -0800 Received: from [172.27.14.166] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 24 Nov 2020 09:39:52 +0000 Subject: Re: [PATCH iproute2-next v2] tc flower: use right ethertype in icmp/arp parsing To: David Ahern , Zahari Doychev , CC: , , References: <20201110075355.52075-1-zahari.doychev@linux.com> From: Roi Dayan Message-ID: <3ae696c9-b4dd-a2e5-77d5-c572e98a4000@nvidia.com> Date: Tue, 24 Nov 2020 11:39:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1606210802; bh=ZNFt8DS9khx9MR6Ir3B+cUVJVfYRDp6l7kIYKGG3XuM=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=h0lhW0PL1sWQK/3+geCs3oRwHVojLdkmBNskwSbbRD42KxXWRHQwVupazyDHj30RO 5ymsiLPqi4aVR2sHaFcC9rkc8PMEdH/g/MALqxRgQ/eKUHE06vlX6Qqlil4a/byJXy OP8IUoBVbVU4X2ERPBAGaa+MK84glRkh6y3qGuPWSjg/2Zu7q72SjGcJfs0VMaZ3oA WlD830Urz/YWBaLFyhNtoEEIiWm7eJkzMTvSlOc6TNnpzCOCJ871jF7RSX4E6fXd++ RA+JbZNYf+LU2qbf0G63RFT4+s0Wg86TzT9bb6/wQxtsOGcD0oUK+k4avZ/NHMsUlN dcndt2XQ6W0Zg== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2020-11-14 5:12 AM, David Ahern wrote: > On 11/10/20 12:53 AM, Zahari Doychev wrote: >> Currently the icmp and arp parsing functions are called with incorrect >> ethtype in case of vlan or cvlan filter options. In this case either >> cvlan_ethtype or vlan_ethtype has to be used. The ethtype is now updated >> each time a vlan ethtype is matched during parsing. >> >> Signed-off-by: Zahari Doychev >> --- >> tc/f_flower.c | 52 +++++++++++++++++++++++---------------------------- >> 1 file changed, 23 insertions(+), 29 deletions(-) >> > > Thanks, looks much better. > > applied to iproute2-next. > Hi, I didn't debug yet but with this commit I am failing to add a tc rule I always could before. also the error msg doesn't make sense. Example: # tc filter add dev enp8s0f0 protocol 802.1Q parent ffff: prio 1 flower\ skip_hw dst_mac e4:11:22:11:4a:51 src_mac e4:11:22:11:4a:50\ vlan_ethtype 0x800 vlan_id 100 vlan_prio 0 action vlan pop action\ mirred egress redirect dev enp8s0f0_0 Can't set "vlan_id" if ethertype isn't 802.1Q or 802.1AD I used protocol 802.1Q and vlan_ethtype 0x800. am i missing something? the rule should look different now? Thanks, Roi