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 74004C4332F for ; Fri, 9 Dec 2022 15:35:36 +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=YPmKkmYzlm6U30L9qvjL6J2BEhi+Hy21u0yNjzTaLBw=; b=KslsBwb87o28MK qgCN3LvwYRve/67pN3QdTNnjNw+xK76WNU8+/ptcBCFAgJvBrEtYnqywwU3yxcVVgVsB7qGQpaw9r 5I6q+TV1oP6QyUJndOVF9mahdCtLvLb1TCk3yUT3hpJgKG6CkH+j6I8kxfVcs0Jy9KiZ/y0AuKQYf DubJ00+MYcXmF6vTAZQEdovtRrCFuQUQcxrdNoiHXURPaNa2kJkfM/wPojhFUHSjIV/Wjq2AIZhtQ vt6YJzZPitKp0aSwffcxHFOxswOyKcEafcQVdCB7jh6mroHunMvDxKDUKkdQI2lT7aWPWXo8K3753 KYxDqPwQQKMzZFtEg+mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fOG-0091bd-RE; Fri, 09 Dec 2022 15:34:21 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fHT-008yoc-E8 for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 15:27:20 +0000 Received: by mail-ej1-x62b.google.com with SMTP id fc4so12233165ejc.12 for ; Fri, 09 Dec 2022 07:27:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sellxn+qpRx1/DuL5IfjB8JPMxjkBaM822IJtvbC2DM=; b=Wi5SPhesEAkDMVGSMH37+tQIpLM2sfMQITss1JrwUE7sHDicrUPrcwLwkPZaM10yjQ KO+DQmAJWq74UjmUpY9O7Fs0ABlFLtwjH4/mQN5CbmOpIgSlbjcsZONxjM6ItwxkMDY2 jE1Osv6GPfkFf444xBmUhDNuYa9g4OTWnBHHuIsm5tz9B8+jUhAuQnTROUjYNkCraGAq D5h5pONYRa/OZpvLq1nCbdgJbRLt5ObnLpLneBeuBC2KxzIpsNe4b/el1lbA/0oDolER OEzirp3MWH/jiPNXrVCOdaWibhXRNprjE01ckq2ImKhr86/dl9LVawg29LYazSl6O7wM 3emg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sellxn+qpRx1/DuL5IfjB8JPMxjkBaM822IJtvbC2DM=; b=iynl8neG31oYW9KNj39ZU+yqW3aMHPgyeh+SdU4zH2acpGVoumzhqNptJe2IvXPbwT t+csm1/0S/yIKcCWjNxTit9Xx9ES5DYIfrVv1vqL0CtXlf6sdbVDFBngvdoJEsZuR8UN gVqKQZq/IRr6dWDWaavgyJGsr8p9O8u4iw/Ss/DglgrxplZsDtfReq5aQW7O025nMgD0 hTuNY8AAbEQj5rLw3d4qL9UeUiCckbK8V52tk9RgtA1f1DVBdRNZCDIpxWI0dhGjzd+/ ZAemdpH4VfoWeUO4j30U4JU4NflApBKX5wx99d8zIjCq8xFusRThv7mPHj/FExAg5YgE EFig== X-Gm-Message-State: ANoB5pkrt1U0aC11y01ZpCtL3IOn8XJecCvOY5LKeZ4TglNG8qy84Jrw LZmldBUbE80D3+/IgkyO6F8G1aezYHdARg== X-Google-Smtp-Source: AA0mqf7EdwDPavti3vcA1PVCgAbVhtFkKigiP8JIkUHd+q1ZCC/Q37/Q5ySGdI26K3dsM3C/+PRluQ== X-Received: by 2002:a17:906:60c9:b0:7c1:b65:14c1 with SMTP id f9-20020a17090660c900b007c10b6514c1mr5395638ejk.10.1670599635589; Fri, 09 Dec 2022 07:27:15 -0800 (PST) Received: from skbuf ([188.27.185.190]) by smtp.gmail.com with ESMTPSA id i11-20020a17090671cb00b007c0c1e18e28sm23868ejk.124.2022.12.09.07.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:27:15 -0800 (PST) Date: Fri, 9 Dec 2022 17:27:13 +0200 From: Vladimir Oltean To: Horatiu Vultur Cc: Michael Walle , Steen.Hegelund@microchip.com, UNGLinuxDriver@microchip.com, daniel.machon@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, lars.povlsen@microchip.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, richardcochran@gmail.com Subject: Re: [PATCH net-next v3 4/4] net: lan966x: Add ptp trap rules Message-ID: <20221209152713.qmbnovdookrmzvkx@skbuf> References: <20221209092904.asgka7zttvdtijub@soft-dev3-1> <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221209153010.f4r577ilnlein77e@soft-dev3-1> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_072719_521588_DCB07737 X-CRM114-Status: GOOD ( 16.50 ) 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 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? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel