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 8DB55C4332F for ; Fri, 9 Dec 2022 12:54:57 +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=xVmjZJO/UUmO0jfiCTI7SKKCT7ERzmYpYGYQ7f6Fp54=; b=VwJ/VyS3Rcn2K+ 9IW2k+691NHDlEoqj2NCW8OuXAb2qLDsofHFPyXwei7F/y9Utq46jWPaSXWGgxT9nz/uQDxRLjaVt ijEnEDTdNv9OejCEOEfdkSWC1iF3nV73iio0lVayxHx+nWU+0w7R+SkS7sDsz/fypFDAM0htG0DV5 vQOz1bloFk7zTqeCfVwJIH3pIPsNlxoZ3+Z/jIEhgbLvIbWsBi7Gwcq3JamjK6zhyB7WPrv0MhKrc VgC5yzB5jN+0N707DRc+0t82vVIuoKGdd85UU6oU3vEblGPUDNNCClECkSi2n/ZoiLpaaLqZQNCLA MlWK0JsFyMtmJ0boJjrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3ct7-007l0P-SZ; Fri, 09 Dec 2022 12:54:01 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3ct1-007krh-54 for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 12:53:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670590435; x=1702126435; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=pQLpFDzbw7TKoL4vHHookBKgAqmAD1Lnc7h67IPEi3Y=; b=x8PgboPF55v9dnJkxjuTZ8U3i8fCaDyP5RB/JM92AHb5tdoAQ9jPb58N PbqopbnpCn0XwEi835tVf4vgt4KM2SkWrvOjyl5/CLKvxwAW6UE7YOpki TfP//bfVHUd3+KBQO48auQ7PB27TyhDUMQfctqUMGZ61OrL88sjgYF2G9 rvrF9Op6b8nsm+YkClcSxOCZj0arUkvV2m3zDNUWP4pa80IKL7Wi4G9x6 tDWk42PvDieHgRqpVeZC30+DjpKju/MpO/LKD3s0LVsczEe1vZbi24b9j aCT1DgYP+7I95v0H/09BaGdSlUezjoCjGyLf9vGTR0q/tOqeY3W5nAMVY w==; X-IronPort-AV: E=Sophos;i="5.96,230,1665471600"; d="scan'208";a="203303507" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Dec 2022 05:53:50 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) 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.12; Fri, 9 Dec 2022 05:53:50 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 9 Dec 2022 05:53:50 -0700 Date: Fri, 9 Dec 2022 13:58:57 +0100 From: Horatiu Vultur To: Michael Walle CC: , , , , , , , , , , , , Subject: Re: [PATCH net-next v3 4/4] net: lan966x: Add ptp trap rules Message-ID: <20221209125857.yhsqt4nj5kmavhmc@soft-dev3-1> References: <20221203104348.1749811-5-horatiu.vultur@microchip.com> <20221208092511.4122746-1-michael@walle.cc> <20221208130444.xshazhpg4e2utvjs@soft-dev3-1> <20221209092904.asgka7zttvdtijub@soft-dev3-1> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_045355_224147_FD0A789A X-CRM114-Status: GOOD ( 40.26 ) 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 13:10, Michael Walle wrote: > > Hi, Hi Michael, > > > > > The issue is because you have not enabled the TCAM lookups per > > > > port. They can be enabled using this commands: > > > > > > > > tc qdisc add dev eth0 clsact > > > > > > This gives me the following error, might be a missing kconfig option: > > > > > > # tc qdisc add dev eth0 clsact > > > RTNETLINK answers: Operation not supported > > > > Yes that should be the case, I think you are missing: > > CONFIG_NET_SCHED > > But may be others when you try to add the next rule. > > I guess I'd need to update my kernel config sometime. At the > moment I just have a basic one, as there is still so much stuff > missing for the lan9668. So I haven't come around testing anything > else. As I said, I just noticed because my rootfs happens to have > linuxptp started by default. I understand. > > > > > tc filter add dev eth0 ingress prio 5 handle 5 matchall skip_sw action > > > > goto chain 8000000 > > > > > > > > This will enable the lookup and then you should be able to start again > > > > the ptp4l. Sorry for not mention this, at least I should have written > > > > it > > > > somewhere that this is required. > > > > > > > > I was not sure if lan966x should or not enable tcam lookups > > > > automatically when a ptp trap action is added. I am open to suggestion > > > > here. > > > > > > IMHO, from a user point of view this should just work. For a user > > > there is no connection between running linuxptp and some filtering > > > stuff with 'tc'. > > > > > > Also, if the answer to my question above is yes, and ptp should > > > have worked on eth0 before, this is a regression then. > > > > OK, I can see your point. > > With the following diff, you should see the same behaviour as before: > > Ok, I can say, I don't see the error message anymore. Haven't tested > PTP though. I'd need to setup it up first. Good, at least no more warnings and should not be any regression there. > > Does it also work out of the box with the following patch if > the interface is part of a bridge or do you still have to do > the tc magic from above? You will still need to enable the TCAM using the tc command to have it working when the interface is part of the bridge. > > -michael > > > --- > > diff --git > > a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c > > b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c > > index 904f5a3f636d3..538f4b76cf97a 100644 > > --- a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c > > +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c > > @@ -91,8 +91,6 @@ lan966x_vcap_is2_get_port_keysets(struct net_device > > *dev, int lookup, > > > > /* Check if the port keyset selection is enabled */ > > val = lan_rd(lan966x, ANA_VCAP_S2_CFG(port->chip_port)); > > - if (!ANA_VCAP_S2_CFG_ENA_GET(val)) > > - return -ENOENT; > > > > /* Collect all keysets for the port in a list */ > > if (l3_proto == ETH_P_ALL) > > --- > > > > > > > > -michael -- /Horatiu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel