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 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 23AE9C4332F for ; Mon, 12 Dec 2022 14:17:09 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rbTwF3+xg07M8W4fMjxWMlSvZ9gWeWlLSudvTJhayzY=; b=HQOjxZuYA/b3ED WIzGPtELgcqguc3nshRDOAT+6BUW8iv/so3Xaea7RrARX8JgGA1V29yFLYmeOR7wmM38lpCf5doTB 1e5dvGRQ+xBjR71nJcTcpDDEyRqnaDhp6JmNZpD4s6fVs5GGWsovTTU8EXCR+HFYl3pERRBSDh8tl H5mrSbMv5IX5q7AOPL4ALLUomIOKN2OL3VXZs+dJG44leACdTF2uWSLwEgwqilB4yKWfPhGLHt6LP OzXc1wA6kBh2+zdgYtPexzqN42Pb3d2SvL56Jbi0oFHzermwajbezZZXmJSn9/+4nm06uf/HDJxTO 3Avs1hsraKwl7KE225/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4jbF-00H9V4-8Z; Mon, 12 Dec 2022 14:16:09 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4jb8-00H9SO-RP for linux-arm-kernel@lists.infradead.org; Mon, 12 Dec 2022 14:16:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670854562; x=1702390562; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=LiT7T/L83R8Piurzl2HyKJ/SptmTCfBC/qecg42VBGM=; b=Vkb5ZI6OSvGVkr+POcJu4ifU3SGpdSW9tLPLbbyabhbp11JPrZ7fKSnm 5Ll0QEDsD6OBPpaN+O7xEIipOCKrruHc+GHxsaPQAfPd3Jd9SlZXBG75H wLJ6tYHJjMjUdtaXntdQGEUFs02+TQKgeMRwbTrWAE6SWm0e7gU2Wy5WL pWj8Qf6X5CYlYgjdqDgTgvMl2ntBlGjWWbjBKPkC0AR8udBuaORbvS/iy uvkNy1yaDw08vSNvByIk+N5dE40C2K6npIMTJOt/mnXaL36MFw9hPEOPc sRAsbnsxQAfuMmJHuOOKmVPwHTxKwK1FFD2vFWFpXYnifuTIf42w/4EqK Q==; X-IronPort-AV: E=Sophos;i="5.96,238,1665471600"; d="scan'208";a="127698932" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Dec 2022 07:15:42 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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:15:42 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Mon, 12 Dec 2022 07:15:42 -0700 Date: Mon, 12 Dec 2022 15:20:50 +0100 From: Horatiu Vultur To: Vladimir Oltean CC: Michael Walle , , , , , , , , , , , , Subject: Re: [PATCH net-next v3 4/4] net: lan966x: Add ptp trap rules Message-ID: <20221212142050.frjlp3nfko5tos7i@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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221209152713.qmbnovdookrmzvkx@skbuf> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221212_061602_992948_377507DF X-CRM114-Status: GOOD ( 21.58 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 12/09/2022 17:27, Vladimir Oltean wrote: > Sorry for late reply! > On Fri, Dec 09, 2022 at 04:30:10PM +0100, Horatiu Vultur wrote: > > For example this 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 > > > > This will not be hit until you add this rule: > > tc filter add dev eth0 ingress prio 1 handle 2 matchall skip_sw action goto chain 8000000 > > > > Because this rule will enable the HW. Just to aligned to a SW > > implementation of the tc, we don't enable the vcap until there is a rule > > in chain 0 that has an action to go to chain 8000000 were it resides > > IS2 rules. > > > > 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? We were thinking to do something like this. With a small difference, to allow the user to add filters to a chain, but offload them in HW only when there is a valid goto towards. Instead of checking if there is a goto to that chain. But I think we need to spend a little bit more time on this. Any suggestion is more than welcome. -- /Horatiu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel