Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3705969rwe; Mon, 17 Apr 2023 02:11:02 -0700 (PDT) X-Google-Smtp-Source: AKy350Yd+EhxtTPKhfCfAnccp7+QVcGLK9tsT8oluEjb9J/g+JnwHPPSOzA4JGa1rrWL50JZ6zyo X-Received: by 2002:a05:6a00:892:b0:627:6328:79f1 with SMTP id q18-20020a056a00089200b00627632879f1mr19563932pfj.34.1681722661778; Mon, 17 Apr 2023 02:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681722661; cv=none; d=google.com; s=arc-20160816; b=qvfcd4NVqq14BsnRtL7MgwIWNkOksP7HVfriEKQhc6/BR/IMVWZ1D+BnEXVFr1M7Hc 6GZQV4kdv5ubBSab9xsqsesEFsI18LYbDfm+Y3XMNwzD+kQp/0X/MgzVxFPf5hXvVpNi un0Mng7iNYbZH7o9LVTXY7QJ7iohaGDrM8wtR/0G1RD3tjyfIz1wlwzjK/tuFuTHa9wf kR/tEDdgdf8MNZ+wV035Cioc76ZK3UgTZkN/enAVlZ0Ykb5EEFlAi7jsdPXtG6S9y5BF gpNaDBZ0eF7Bg9/19YOH2mQt33tGW6P6ZS67tMKDREpl0+jB+7eGTC1rr+Skt9yQX1M7 nDLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=uW/CUB3JI+wYacL2+SLauWBkDs5C9qvYfzJSV6WNNbk=; b=Ik1a6PV96VpaArPHPXs/7AJd45pxDyGNBxb9UlkEncrKDfOEO5c6Nuk4DOFc0WOEzT yY2Hn3Gj899ByfLKCQ+ub0h/6aX9RbPuuENxPneNRuxfxlYMC3Jcd2qek3BW/3yTUYWv gnaa1VHHZy/SawwBsOTelX85xIiypqeRev4mQJui9Ouc+re/O5+w3sO5NHxK65uq4bg0 GzLUN1wnqFIFEOVMqwOB/0j7IVGibs7/4fYD8U69MC5yr8kGZTEk+sJZgyCkJj8ww80C lTaNdvYdMgpH0E/2CJ3GRwrb9Lxxwlu0Lb+8JZc6bFY0SvlTjlnap/bz+kPc6xFAsRjj QMyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zgsun1SG; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020aa79f01000000b00633c4ed6061si11301386pfr.125.2023.04.17.02.10.47; Mon, 17 Apr 2023 02:11:01 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=Zgsun1SG; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbjDQJKW (ORCPT + 99 others); Mon, 17 Apr 2023 05:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjDQJKU (ORCPT ); Mon, 17 Apr 2023 05:10:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1D7184; Mon, 17 Apr 2023 02:10:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC2076108F; Mon, 17 Apr 2023 09:10:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 30B5CC433A4; Mon, 17 Apr 2023 09:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681722618; bh=s1LfW34HbO3mT+PyzMnStn20sJg5U9nSWN5qtvT69JY=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=Zgsun1SGdjzkxtKRMjor6dPsQMVH+IXC7yenEe5lGj24688Zhc7n9O+Cza3YahPWi MjqIkDLLUQbNUHx2W6IYXKkxn3xeTIeeP3UdOG+YFEk3snG34HGn/LIQkm3AoSfaMI PZr3zuonPXsPjes60ngUCQqbKWUAQPsqQwvIdCu13fJKxxfRINOWjgiMW760wXsMkm QJck+6ptDLUch3dsoWU7cxHu30qTubjoxZj198VUA1n/GgNuKYTQVu7bPFuQOKm7vN QahiwiL9mqRfBqpsVXSX3iU1XLdTogh9QNitcmaBoo0xFxAfEHHOfYiPnG/NigW7Qk AbvDU5P09pqtA== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 1CD2AC41671; Mon, 17 Apr 2023 09:10:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net-next v2] net: lan966x: Fix lan966x_ifh_get From: patchwork-bot+netdevbpf@kernel.org Message-Id: <168172261811.15038.16817506134246083611.git-patchwork-notify@kernel.org> Date: Mon, 17 Apr 2023 09:10:18 +0000 References: <20230417072641.1656960-1-horatiu.vultur@microchip.com> In-Reply-To: <20230417072641.1656960-1-horatiu.vultur@microchip.com> To: Horatiu Vultur Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, UNGLinuxDriver@microchip.com, aleksander.lobakin@intel.com 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, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 17 Apr 2023 09:26:41 +0200 you wrote: > From time to time, it was observed that the nanosecond part of the > received timestamp, which is extracted from the IFH, it was actually > bigger than 1 second. So then when actually calculating the full > received timestamp, based on the nanosecond part from IFH and the second > part which is read from HW, it was actually wrong. > > The issue seems to be inside the function lan966x_ifh_get, which > extracts information from an IFH(which is an byte array) and returns the > value in a u64. When extracting the timestamp value from the IFH, which > starts at bit 192 and have the size of 32 bits, then if the most > significant bit was set in the timestamp, then this bit was extended > then the return value became 0xffffffff... . And the reason of this is > because constants without any postfix are treated as signed longs and > that is the reason why '1 << 31' becomes 0xffffffff80000000. > This is fixed by adding the postfix 'ULL' to 1. > > [...] Here is the summary with links: - [net-next,v2] net: lan966x: Fix lan966x_ifh_get https://git.kernel.org/netdev/net-next/c/99676a576641 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html