Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6782103rwb; Mon, 12 Dec 2022 06:24:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf6KooJqtmRSF/fisbotahAxtwOH+saK+GUQSjDQoZt0BsrnIjDHfBychZeYBf3ggeshDqJ4 X-Received: by 2002:a05:6a00:a17:b0:577:9807:2db8 with SMTP id p23-20020a056a000a1700b0057798072db8mr23241853pfh.3.1670855079809; Mon, 12 Dec 2022 06:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670855079; cv=none; d=google.com; s=arc-20160816; b=Iw25jivvLqf1ji1dO2cijpUCfUJNTYII+9EMYIC74Bv5VjD+1N+M8CQLQQsM/0BT9H GArPc2vkA25CSrrO64TT7dU9ohuLvvmDaiyJH0PjnpNFArv1F6nuR2U5UP3djFgS4Ol4 cXQXFG4vE+BglptC37VC5xkIASNPaWoPCWd88HuN+LQRuvDMm9vwxvnbDfkR5nFQz0uH qv+IqEZ3IX9B1bKSme57A4yWs5eaiuSiKG4JzvxcGD4JjE0rHt0q1vNii39+nqXJBY8v pjWgRjEAM4iZ9kz2BJOWWRGAdR2lxY6npKzgxtzN7R0ZZA+512MzIsjrBUw0xRR9Kru+ paEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Zm8XQnSlzDaAXFu6wt7//Z3Q4X9tjkgOr7UnaOejLyQ=; b=Ubr025uYnqS9gB4RBKnylrWsjUQX9OofcKAVZ/miMVjF33wlQR8WRPRwSCixaiIgBR 4NHNWmIrrrHSgM8pp1ojW//kqR/4PEtc0SA3WOQ5n3xa+q7PqfiMxJ1cMkq7rRlN5OCu l53mqMbsipZH+x89XRmpeniwzs6+yVCqGI1PVr7UgcT2NffDF7aI+AF0uAq1HrRsFU/V TeIcfDABhI0OQZR0HP9oCXJEykS1ozowH15cjLJ0uF+1j8Warh7OSmHhizabIbbYmPje AGdCjcallFdOi1+mS9UQKvHgZr5ZTbfPFHsV72f/g/41tLm9mZNux5g+ArKmTozMdi0Q CN2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=pl1+vsAM; 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 z26-20020aa79f9a000000b005738716f5d5si9418242pfr.257.2022.12.12.06.24.29; Mon, 12 Dec 2022 06:24:39 -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=pl1+vsAM; 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 S230315AbiLLOWQ (ORCPT + 75 others); Mon, 12 Dec 2022 09:22:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232519AbiLLOWJ (ORCPT ); Mon, 12 Dec 2022 09:22:09 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FF767644; Mon, 12 Dec 2022 06:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670854928; x=1702390928; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7a2DuvLenxyuI7AqD6mHvsidXY3Z0leJSqLMjOih4cw=; b=pl1+vsAMMs6/WcKrDFHue+AmtjhguDtJTVl4r9KGCucLIHT5xNxF9Meb kAiEp7lGelhVJDbsFu2C6Z+WZx76jC7HbMamab17Oi01OSijt0sav2Dhu hAz9QfPOSHEXp7qp+Ly9VTBQYljqFPZTuJYO+R6/uTVikwmxFtSPf9tVZ 9jq0RnGb6Cgog+uENiLQOdOk7nQPuvv/Z0+DrW+LiftkXPX3kHi/TqZZF iSTZwKOT1K1uDzT9UnAH0pYDhW21kQSVXiX8joqCOwH6zXV0CLOPCvhLl RN1aToSPBa0SGBueSkZcnX1w2DRY1P2JTKnpg4456Kg5QPACG8i0ATXYm w==; X-IronPort-AV: E=Sophos;i="5.96,238,1665471600"; d="scan'208";a="191236976" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Dec 2022 07:22:07 -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; Mon, 12 Dec 2022 07:22:04 -0700 Received: from localhost (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; Mon, 12 Dec 2022 07:22:04 -0700 Date: Mon, 12 Dec 2022 15:27:12 +0100 From: Horatiu Vultur To: Jakub Kicinski CC: Vladimir Oltean , Michael Walle , , , , , , , , , , , Subject: Re: [PATCH net-next v3 4/4] net: lan966x: Add ptp trap rules Message-ID: <20221212142712.majhp4yifg72y3b2@soft-dev3-1> References: <20221209125857.yhsqt4nj5kmavhmc@soft-dev3-1> <20221209125611.m5cp3depjigs7452@skbuf> <20221209142058.ww7aijhsr76y3h2t@soft-dev3-1> <20221209144328.m54ksmoeitmcjo5f@skbuf> <20221209145720.ahjmercylzqo5tla@soft-dev3-1> <20221209145637.nr6favnsofmwo45s@skbuf> <20221209153010.f4r577ilnlein77e@soft-dev3-1> <20221209152713.qmbnovdookrmzvkx@skbuf> <20221209150332.79a921fd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20221209150332.79a921fd@kernel.org> 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 The 12/09/2022 15:03, Jakub Kicinski wrote: > > On Fri, 9 Dec 2022 17:27:13 +0200 Vladimir Oltean wrote: > > > So for example, on a fresh started lan966x the user will add the following > > > rule: > > > tc filter add dev eth0 ingress chain 8000000 prio 1 handle 1 protocol > > > all flower skip_sw dst_mac 00:11:22:33:44:55/ff:ff:ff:ff:ff:ff action > > > trap action goto chain 8100000 > > > > > > He expects this rule not to be hit as there is no rule in chain 0. Now if > > > PTP is started and it would enable vcap, then suddenly this rule may be > > > hit. > > > > Is it too restrictive to only allow adding offloaded filters to a chain > > that has a valid goto towards it, coming (perhaps indirectly) from chain 0? > > Right, we fumbled the review and let the chain oddness in. > Until recently the driver worked without any rules in chain 0 :( > > Maybe adding and offload of the rules can be separated? > Only actually add the rules to the HW once the goto chain rule > has been added? Yes, we would like to do something like this. -- /Horatiu