Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2140644rwl; Fri, 6 Jan 2023 02:25:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEbe1GNm3t80uqBoOobub5igtd/7u+uk43jmGdnjFf+v933HMbaf6rcACnN0Wp7ACpZVpr X-Received: by 2002:a17:907:8b17:b0:78d:f454:3856 with SMTP id sz23-20020a1709078b1700b0078df4543856mr48742836ejc.19.1673000731969; Fri, 06 Jan 2023 02:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673000731; cv=none; d=google.com; s=arc-20160816; b=hwlKrdw1zBrCpiJr82mg8J4I/SiYpUFpBhvGW8ng8yNYZ5F8oZW1fWsnn4cnHbXQle xepm9Ee85stqREaZQUU+YJx3uS13bvuuLo2VnvnE/+dkIJUz5+J2GQaD+CAiShbMTB94 j1ngv6QrSEyJ979hoABy7oUxR0XwFkdjHkL0Q8mq0NUcNgTiqTfpOhXJNQmnMLwGLHDs hr5HMDeTCv3Wp+PBgD7XwtOABBk2YOTBQNTYO2JEnAIL0vsRDp7I0pMqbXgM7+wj23Sh ygrAIaf+/uIjGVRLB/xOMAZtM3JJSzjNNRc4evG7apGvn+BlIU3xIhGwqCW6YXh7Yv1G mnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=jhE9KbWWwmtVwb5CgPixtWOBkC3Th9YVyVyC0czz0CA=; b=n84YBxXPn1BfnD+phUS7nBhhrWSAMzEqJjdYRtZewHpXu0vbOp/ChZUGcxSuzFxX+f u1IdCIBIgg8e6qV818HPc36I9zm7ClbNNc6ivuI+y9/sv0akiH8GSlywlP3quV0WNnYv YISlAVo5rlRffc6StyIyGeFzaCDGvTEXC+iy0+hTYKGr/yYMGQjOWakDvfvwRpC/Lnzj 7C+f/+FE/xrRzG7JVT+xhI8kryTHsQHvqkMTYdzkBsF36dNhTIDJSwwbDxHKviLQJKit lwCDm7ol46f8bujv+lJWY6GHaS42ww9aEqS2GBYk8OQ+08jwqTAN/QPkL3GzMxH4ORwN TpVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=LRqAJHUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a056402358a00b0048ba605a150si1438954edc.240.2023.01.06.02.25.18; Fri, 06 Jan 2023 02:25:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=LRqAJHUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232344AbjAFJ6H (ORCPT + 56 others); Fri, 6 Jan 2023 04:58:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjAFJ6E (ORCPT ); Fri, 6 Jan 2023 04:58:04 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CB0F6165; Fri, 6 Jan 2023 01:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1672999082; x=1704535082; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=VZqJLZm6Ci+sGx44e38EWK4CmsPPAKDhPQybyoFfhKE=; b=LRqAJHUCyuDFHI0GAG6LhL3Oeyfe1G0tmbAoMCfDPLJhVkadMOIOR0ET LCZ2H8T6h7/SdOJH8HeFF2gN6RcT5HoOY8IQxb4IPrrlPI2DQWpMDF/9y U9nxZiubBO0MzeLNymaSPFIedRYlbZ3KCWUaz9Td+8cCwsD6T6u2yfmj3 etn8hLTdthwNipHr4jLuvaPxdHuaQKTV0rifLK+sUmjtrfgs2JwOs2DL+ yyXz+G7k1vYMG2O4OCVz9y1Ux5f7/lR7tN9C07bu88bENwD6nSDhr6KyQ G6uem2/9KmFZSJOksXMEV9smpDAxfARspBUwVaT56ReMscsCL1Y9oYUoG g==; X-IronPort-AV: E=Sophos;i="5.96,304,1665471600"; d="scan'208";a="194571779" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Jan 2023 02:58:01 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 6 Jan 2023 02:57:58 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Fri, 6 Jan 2023 02:57:55 -0700 Message-ID: Subject: Re: [PATCH net-next v2 0/8] Add support for two classes of VCAP rules From: Steen Hegelund To: Michael Walle CC: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , Randy Dunlap , Casper Andersson , "Russell King" , Wan Jiabing , "Nathan Huckleberry" , , , , "Daniel Machon" , Horatiu Vultur , Lars Povlsen , Dan Carpenter Date: Fri, 6 Jan 2023 10:57:54 +0100 In-Reply-To: <35a9ff9fa0980e1e8542d338c6bf1e0c@walle.cc> References: <20230106085317.1720282-1-steen.hegelund@microchip.com> <35a9ff9fa0980e1e8542d338c6bf1e0c@walle.cc> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, On Fri, 2023-01-06 at 10:07 +0100, Michael Walle wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know th= e > content is safe >=20 > Hi Steen, >=20 > thanks for adding me on CC :) I was just about to reply on your v1. >=20 > Am 2023-01-06 09:53, schrieb Steen Hegelund: > > This adds support for two classes of VCAP rules: > >=20 > > - Permanent rules (added e.g. for PTP support) > > - TC user rules (added by the TC userspace tool) > >=20 > > For this to work the VCAP Loopups must be enabled from boot, so that > > the > > "internal" clients like PTP can add rules that are always active. > >=20 > > When the TC tool add a flower filter the VCAP rule corresponding to > > this > > filter will be disabled (kept in memory) until a TC matchall filter > > creates > > a link from chain 0 to the chain (lookup) where the flower filter was > > added. > >=20 > > When the flower filter is enabled it will be written to the appropriate > > VCAP lookup and become active in HW. > >=20 > > Likewise the flower filter will be disabled if there is no link from > > chain > > 0 to the chain of the filter (lookup), and when that happens the > > corresponding VCAP rule will be read from the VCAP instance and stored > > in > > memory until it is deleted or enabled again. >=20 > I've just done a very quick smoke test and looked at my lan9668 board > that the following error isn't printed anymore. No functional testing. > =C2=A0=C2=A0 vcap_val_rule:1678: keyset was not updated: -22 Good to hear. >=20 > And it is indeed gone. But I have a few questions regarding how these > patches are applied. They were first sent for net, but now due to > a remark that they are too invasive they are targeted at net-next. > But they have a Fixes: tag. Won't they be eventually backported to > later kernels in any case? What's the difference between net and > net-next then? I am not sure I can answer that. >=20 > Also patches 3-8 (the one with the fixes tags) don't apply without > patch 1-2 (which don't have fixes tags). IMHO they should be > reordered. Right. >=20 > Wouldn't it make more sense, to fix the regression via net (and > a Fixes: tag) and then make that stuff work without tc? Maybe > the fix is just reverting the commits. I have discussed this again with Horatiu and I have the following suggestio= n of how to proceed: 1) Create a small LAN966x specific patch for net (see below for the two pos= sible variants). 2) Continue with a net-next V3 without any 'Fixes' tags on top of the patch= in (1) when it becomes available in net-next. The LAN966x patch for net (with a Fixes tag) could contain either: a) No check on enabled lookup Removal of the check for enabled lookups: =20 - if (!ANA_VCAP_S2_CFG_ENA_GET(val)) - return -ENOENT; =20 This will remove the error that you have seen, but will still require a matchall rule to enable the PTP rules. This is compatible with the TC framework. =20 b) Always enable lookups Enable the lookups at startup. Remove the lookup enable check as above. =20 This will make the PTP rules (and any other rules) work even without the matchall rule to enable them. It its not ideal, but solves the problem = that you have been experiencing without the 'TC magic' =20 The V3 in net-next will provide the full solution. I expect that you might prefer the b) version. >=20 > -michael BR Steen