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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47BFCC433DF for ; Thu, 9 Jul 2020 12:54:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2258F2077D for ; Thu, 9 Jul 2020 12:54:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B4Szxu6g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbgGIMy4 (ORCPT ); Thu, 9 Jul 2020 08:54:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbgGIMyy (ORCPT ); Thu, 9 Jul 2020 08:54:54 -0400 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 580CCC061A0B for ; Thu, 9 Jul 2020 05:54:54 -0700 (PDT) Received: by mail-io1-xd44.google.com with SMTP id o5so2141563iow.8 for ; Thu, 09 Jul 2020 05:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=24/ET2HxWh0GkoLM7w5zuWzmjh5T8FbYz3qPSsOV6p4=; b=B4Szxu6gi8Ox/6Sz9y55Sc8TM15pcjTO2LNntTmHIUCkw3vMM7PWWchVNMxSVlE1X1 mtii6G5Y3nNtsk/fFW7pQtojJrPbWXGFKv4KgwRuy2x5qSkkFxC1g9q4Y/jVnUib9fFC 3ZdhpT58LOLJ3mdyZlr0MVo6ZmkWnhnVAZj0HtiIqcN1i6LMeh63+oaIHMupDs4UgB4Z NVLSPJ3IQIxO3o3uw3VZvH35AdvkkrjOEUCrgLS38izC7tc+Deqjq5AN9X0ajpVInXdG EO+2otnXgFJCUqzZ3xlRF+hFPIYGCHn5bbonxp/Aq2rwnZSwJ0+vjATmoxk3jtX75pmS n6Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=24/ET2HxWh0GkoLM7w5zuWzmjh5T8FbYz3qPSsOV6p4=; b=hJZFjAVwPA1MdDKubuxn4kdTOznbiitl8a7Z3tVtOViRuXz/+x3aV6rFqQQknUI1dx PwoPdFVET/5CNjUAHpOQ3GBRg+pyzFZVPzLIaNlpyNUn5FB8IfXjZSXwucOGjjrEv6sj BldBLGxde6H6ziB2J3LYG2SdgpnXEpBjXYXiRPXsL1vLkjWAHCRJz64QbH0NtM5Kzb9F iOJ55xz0Rk5qCv4drRMzR1hitv1C/cJ+Z9GtfdG64ZS4XfLDDfIcV8hZUQ5zbbL0zAj+ exWX+wGy6rSpujWrGzSwsCviUaF5VU9OQ6DknbPzqiMKdh45CWDsfz2GEcmiVpMUV1K/ hnEw== X-Gm-Message-State: AOAM530FtPgP8u6zTgDpUATRL66sVi9cj4Kxg6AasHx8BU0n6epmt7zH aqmboYZgkz8XSbHATjrJyvn08SoUz3QrrYBKRTg= X-Google-Smtp-Source: ABdhPJxdGP5htTaIrON9JwIg39qJq8qlCSSET5lrIhIZ5F3o+38EOBBjSMMxz5QbxpW368MnfeC3vA5gq1dwEPswFvs= X-Received: by 2002:a6b:197:: with SMTP id 145mr41907622iob.77.1594299293694; Thu, 09 Jul 2020 05:54:53 -0700 (PDT) MIME-Version: 1.0 References: <1594227018-4913-1-git-send-email-sundeep.lkml@gmail.com> <1594227018-4913-4-git-send-email-sundeep.lkml@gmail.com> <20200708104056.1ed85daf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200708104056.1ed85daf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: sundeep subbaraya Date: Thu, 9 Jul 2020 18:24:42 +0530 Message-ID: Subject: Re: [PATCH v2 net-next 3/3] octeontx2-pf: Add support for PTP clock To: Jakub Kicinski Cc: David Miller , richardcochran@gmail.com, netdev@vger.kernel.org, sgoutham@marvell.com, Aleksey Makarov , Subbaraya Sundeep Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Jakub, On Wed, Jul 8, 2020 at 11:10 PM Jakub Kicinski wrote: > > On Wed, 8 Jul 2020 22:20:18 +0530 sundeep.lkml@gmail.com wrote: > > From: Aleksey Makarov > > > > This patch adds PTP clock and uses it in Octeontx2 > > network device. PTP clock uses mailbox calls to > > access the hardware counter on the RVU side. > > > > Co-developed-by: Subbaraya Sundeep > > Signed-off-by: Subbaraya Sundeep > > Signed-off-by: Aleksey Makarov > > Signed-off-by: Sunil Goutham > > Please address the new sparse warnings as well: > > drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:130:42: warning: cast to restricted __be64 > Sure. There are some already existing in octeontx2/ for those I will fix and submit after this patch set. > > +static inline void otx2_set_rxtstamp(struct otx2_nic *pfvf, > > + struct sk_buff *skb, void *data) > > +{ > > Please don't use static inline in C files, compiler will know which > static functions to inline, and static inline covers up unused code. > Sure. Thanks, Sundeep > > + u64 tsns; > > + int err; > > + > > + if (!(pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED)) > > + return; > > + > > + /* The first 8 bytes is the timestamp */ > > + err = otx2_ptp_tstamp2time(pfvf, be64_to_cpu(*(u64 *)data), &tsns); > > + if (err) > > + return; > > + > > + skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(tsns); > > +}