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 2A688C3A5A7 for ; Thu, 8 Dec 2022 13:01:05 +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=wGe+kssBNOH5rHdSDauevuW7tbr7fqAH10oAWRQwZv0=; b=K446mLDRPXhc+W dUzSRDYrAsjWBUxwJfSS9VTiTIG3IuTV7DdxC1HeTEDx+7YbHiXl0HiWkLyvvBSzQ4LQ5Ulo6ZYAg epBJ/oak3T5O7rrvbr2mWU45aBNgtF5EGuUrGftLlAXwX1ggpEkwNgVGBlmh1bO+oB/rjkerL8qWB WTV0CDZgXOCAtWA/KchuUwBpWUXeBbpvcE7y02a9dsnwXadm2Nw8KhWi6D8PqXqdfLT/mbmTVVZP9 4U15WuLaQpq3f3bGclKNWu5aw5IoMNX8CVQCHPQZZWkcXayrtA3Mzw6qSlpLAyy2V64B2hq1Bxd5y jyOd3xntn8U46h53vmFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3GVC-0007BH-T0; Thu, 08 Dec 2022 12:59:51 +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 1p3GV8-0006j4-Dq for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 12:59:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670504386; x=1702040386; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=+mdgGveD5F8/TOIbQl7PQKtjdVw3MnrmVuzHSyLSyiY=; b=Le5nl+ZhvMJGdQR68sbKMoosSUs5cXBNFLTZ9Vv0vCBG5psCrEDUFiyF gd/3lnRhRZ6rBNinS+nWcTPCclUf/WBNdHtkFXUu7rI8raFy4ejUoOPjp Xhk8jqQiiWRMyurkJabumoNaHoIDF1CMHfF02Q1GHxcuWvV+Oi/MkhK7y JjpUgvVSsV94vcSIHQ2eQnz66IlEtTSOPnKp9F4joFhXknYn1ASw+mmKK jj6KKQLzYU6Ke14wkpAXKJ8O+shHX9dQC5ROPjczF++xt4HfMzDfMVh34 cGZROF1/7LUiZb9iuEJtY5K4MBV8Nwa9SHRXbxiT0Q1IH/Kc5ukQk8PnD g==; X-IronPort-AV: E=Sophos;i="5.96,227,1665471600"; d="scan'208";a="192222046" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Dec 2022 05:59:37 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Thu, 8 Dec 2022 05:59:37 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 8 Dec 2022 05:59:37 -0700 Date: Thu, 8 Dec 2022 14:04:44 +0100 From: Horatiu Vultur To: Michael Walle CC: , , , , , , , , , , , , Subject: Re: [PATCH net-next v3 4/4] net: lan966x: Add ptp trap rules Message-ID: <20221208130444.xshazhpg4e2utvjs@soft-dev3-1> References: <20221203104348.1749811-5-horatiu.vultur@microchip.com> <20221208092511.4122746-1-michael@walle.cc> 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-20221208_045947_089511_3A0CAB29 X-CRM114-Status: GOOD ( 23.78 ) 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/08/2022 10:27, Michael Walle wrote: > > Am 2022-12-08 10:25, schrieb Michael Walle: > > Hi Horatiu, Hi Michael, > > > > > Currently lan966x, doesn't allow to run PTP over interfaces that are > > > part of the bridge. The reason is when the lan966x was receiving a > > > PTP frame (regardless if L2/IPv4/IPv6) the HW it would flood this > > > frame. > > > Now that it is possible to add VCAP rules to the HW, such to trap > > > these > > > frames to the CPU, it is possible to run PTP also over interfaces that > > > are part of the bridge. > > > > This gives me: > > > > # /etc/init.d/S65ptp4l start > > Starting linuxptp daemon: OK > > [ 44.136870] vcap_val_rule:1678: keyset was not updated: -22 > > [ 44.140196] vcap_val_rule:1678: keyset was not updated: -22 > > # > > > > # ptp4l -v > > 3.1.1 > > # uname -a > > Linux buildroot 6.1.0-rc8-next-20221208+ #924 SMP Thu Dec 8 10:08:58 > > CET 2022 armv7l GNU/Linux > > > > I don't know whats going on, but I'm happy to help with debugging with > > some > > guidance. > > Oh, and linuxptp is running on eth0, no bridges are set up. linuxptp > is started with "/usr/sbin/ptp4l -f /etc/linuxptp.cfg" > > # cat /etc/linuxptp.cfg > # LinuxPTP configuration file for synchronizing the system clock to > # a remote PTP master in slave-only mode. > # > # By default synchronize time in slave-only mode using UDP and hardware > time > # stamps on eth0. If the difference to master is >1.0 second correct by > # stepping the clock instead of adjusting the frequency. > # > # If you change the configuration don't forget to update the phc2sys > # parameters accordingly in linuxptp-system-clock.service (systemd) > # or the linuxptp SysV init script. > > [global] > slaveOnly 1 > delay_mechanism Auto > network_transport UDPv4 > time_stamping hardware > step_threshold 1.0 > > [eth0] Thanks for trying this! 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 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. > > -michael -- /Horatiu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel