Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1656172ybj; Wed, 6 May 2020 02:47:56 -0700 (PDT) X-Google-Smtp-Source: APiQypLOEhGnWENjcU4kLMHUSCjMxDsh9LIwLM0fsbtwehFBci0xUDWq227RKMsU+P3EYeWLHXrC X-Received: by 2002:aa7:cfc3:: with SMTP id r3mr6312260edy.342.1588758475975; Wed, 06 May 2020 02:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588758475; cv=none; d=google.com; s=arc-20160816; b=FWcT3ch7CeUyw4BkarseaRbI7pq+J9h0uxbUhPa7YtL4xJX10eUYWJxPdd9Z9N0ZaS t8Ai9rguxQlrM/RKsQSmFuVoxmjhmbYTc3qbJJbQic18tWeoXbPs+S0kegUHvCgGLbae QJZnXd8c2UvXschupw9C9cjELOMgqjjsJ8JWZ/zWTHpuUOE8Na4TWjBwtj+yhxrY1K3L 2dDLapwkmtTq6im0ALgiw1E6t1v9Suwp1k8aKRUf5UUhMaa13Zbqnp4kRu20khnhhfzi Ko0CssROPNy1uAuVeKqTcXmNxAt80DLIZ3ggpAQzkMPhKKrgH2OfDmMexepz2xruBERk KN2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:dkim-signature; bh=EC/OeQ8y7B8lC3bYU8DOLVmmg//wAJ3VG1CbqyXc+h4=; b=kDh1Fr2+HhkVh+dNO+t/zZYLYhwca0JzQf5zTaHPve1HAHVurfhF3BzQiEgXNJ64wq ofKcDzaCBul8bxqOUwUrvGZDsUKwodkm1bydB+sXs9hTe2vg863FgsEtcVV6Nps+4dda pm74ZM/qvmwAlTKSTwwmInPPEyUKidILb4rRx8tOecqX1J4wf4zaKNKdFI9sYCvsqwO8 o5pEvRQKOc2ac8HFYl42FwDVi8UjDnnWRcSiaCaViGD9oDZqoIxo8cFUBR1y1I0zi57a +iGYKLZ3+JAgk664Cb+ZIkeivIXS4AEir45UDvRFDWgVJUw3YGRX+TT+/P+PFX13mGWA yKRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=SrAiDA2t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si722782edq.510.2020.05.06.02.47.33; Wed, 06 May 2020 02:47:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=SrAiDA2t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729141AbgEFJoI (ORCPT + 99 others); Wed, 6 May 2020 05:44:08 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:47044 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728663AbgEFJoH (ORCPT ); Wed, 6 May 2020 05:44:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1588758247; x=1620294247; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zuKmMeWgZ/UFqq1rP7zWa/wg5C9p4yCyko5/mVu0JcE=; b=SrAiDA2tnZpefq9ardbX68VMzxjTy9GT5bV5cSbc2FBt49ZvseAwN5fG HTaX30y/lgLNyZAEFqZeFRNIWwKqKecWgzqjNwSYHDdCA2rnP3j3aZKPg Ij6y5DJTwil04A92ydLaZNzAvxeE/LERBSpe2H7/o7oYcap6p65GSPP0R DfTVbppjIK7y66UWhm/i7NKWqj58xncwIOIH7KXFZnhDr//MzzEhXYzwZ 9GNpBWGqbmCCIk9b21vtNv4G4OdKP/13MXJLd884QqtefAT8/9vI0HcQH XLjH2Z73wxSFyhxVOxvMEowZQ7s+niOjNcvvAkzFyTHlJvRW+vxQdjL/6 w==; IronPort-SDR: 8diXjE1BHUCwR7ruJb2Js1oQxx0NR1FxldPu2olFVYsbtwhEjA2IX5vVtD7hMdpcje4QuVxrya U0qvMjPIrnkOLvfsY6HIz8V+ounKPbUlIq7AazdCN/BCU8WCG6e/mAWNoQ7o0e9bNRtGeLE/2b Vizg3pTMDwOApMBNkDnoxyRNp8d7LJQ6JoWisGN3QkwnO3hr/NcYANbuFN9FgmyROeuHlaeWQ4 SsFqn/3nkkU/TJeV2vVeNpaDg4KnGww+ZJgonrQ0Ictd0jQZdk+LL/EIDPKxYVmm0vThUr9MEQ zmw= X-IronPort-AV: E=Sophos;i="5.73,358,1583218800"; d="scan'208";a="75696370" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 May 2020 02:43:46 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 6 May 2020 02:43:46 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 6 May 2020 02:43:46 -0700 Date: Wed, 6 May 2020 11:43:45 +0200 From: "Allan W. Nielsen" To: Xiaoliang Yang CC: , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v1 net-next 4/6] net: mscc: ocelot: VCAP IS1 support Message-ID: <20200506094345.n4zdgjvctwiz4pkh@ws.localdomain> References: <20200506074900.28529-1-xiaoliang.yang_1@nxp.com> <20200506074900.28529-5-xiaoliang.yang_1@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Disposition: inline In-Reply-To: <20200506074900.28529-5-xiaoliang.yang_1@nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xiaoliang, On 06.05.2020 15:48, Xiaoliang Yang wrote: >VCAP IS1 is a VCAP module which can filter MAC, IP, VLAN, protocol, and >TCP/UDP ports keys, and do Qos and VLAN retag actions. >This patch added VCAP IS1 support in ocelot ace driver, which can supports >vlan modify action of tc filter. >Usage: > tc qdisc add dev swp0 ingress > tc filter add dev swp0 protocol 802.1Q parent ffff: flower \ > skip_sw vlan_id 1 vlan_prio 1 action vlan modify id 2 priority 2 I skimmed skimmed through the patch serie, and the way I understood it is that you look at the action, and if it is a VLAN operation, then you put it in IS1 and if it is one of the other then put it in IS2. This is how the HW is designed - I'm aware of that. But how will this work if you have 2 rules, 1 modifying the VLAN and another rule dropping certain packets? The SW model have these two rules in the same table, and can stop process at the first match. SW will do the action of the first frame matching. The HW will how-ever do both, as they are in independent TCAMs. If we want to enable all the TCAM lookups in Ocelot/Felix, then we need to find a way where we will get the same results when doing the operation in HW and in SW. /Allan