lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 25 Aug 2022 21:59:47 +0000
From:   "Keller, Jacob E" <jacob.e.keller@...el.com>
To:     Gal Pressman <gal@...dia.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>,
        "Cui, Dexuan" <decui@...rosoft.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Shyam Sundar S K <Shyam-sundar.S-k@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "Siva Reddy Kallam" <siva.kallam@...adcom.com>,
        Prashant Sreedharan <prashant@...adcom.com>,
        Michael Chan <mchan@...adcom.com>,
        Yisen Zhuang <yisen.zhuang@...wei.com>,
        Salil Mehta <salil.mehta@...wei.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        Tariq Toukan <tariqt@...dia.com>,
        "Saeed Mahameed" <saeedm@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        "Bryan Whitehead" <bryan.whitehead@...rochip.com>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        "Alexandre Torgue" <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Richard Cochran <richardcochran@...il.com>,
        "Thampi, Vivek" <vithampi@...are.com>,
        "VMware PV-Drivers Reviewers" <pv-drivers@...are.com>,
        Jie Wang <wangjie125@...wei.com>,
        Guangbin Huang <huangguangbin2@...wei.com>,
        "Eran Ben Elisha" <eranbe@...dia.com>, Aya Levin <ayal@...dia.com>,
        Cai Huoqing <cai.huoqing@...ux.dev>,
        Biju Das <biju.das.jz@...renesas.com>,
        Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
        Phil Edworthy <phil.edworthy@...esas.com>,
        Jiasheng Jiang <jiasheng@...as.ac.cn>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Wan Jiabing <wanjiabing@...o.com>,
        Lv Ruyi <lv.ruyi@....com.cn>, Arnd Bergmann <arnd@...db.de>
Subject: RE: [net-next 09/14] ptp: mlx5: convert to .adjfine and
 adjust_by_scaled_ppm



> -----Original Message-----
> From: Gal Pressman <gal@...dia.com>
> Sent: Tuesday, August 23, 2022 8:31 AM
> To: Keller, Jacob E <jacob.e.keller@...el.com>; netdev@...r.kernel.org
> Cc: K. Y. Srinivasan <kys@...rosoft.com>; Haiyang Zhang
> <haiyangz@...rosoft.com>; Stephen Hemminger <sthemmin@...rosoft.com>;
> Wei Liu <wei.liu@...nel.org>; Cui, Dexuan <decui@...rosoft.com>; Tom
> Lendacky <thomas.lendacky@....com>; Shyam Sundar S K <Shyam-sundar.S-
> k@....com>; David S. Miller <davem@...emloft.net>; Eric Dumazet
> <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni
> <pabeni@...hat.com>; Siva Reddy Kallam <siva.kallam@...adcom.com>;
> Prashant Sreedharan <prashant@...adcom.com>; Michael Chan
> <mchan@...adcom.com>; Yisen Zhuang <yisen.zhuang@...wei.com>; Salil
> Mehta <salil.mehta@...wei.com>; Brandeburg, Jesse
> <jesse.brandeburg@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Tariq Toukan <tariqt@...dia.com>; Saeed
> Mahameed <saeedm@...dia.com>; Leon Romanovsky <leon@...nel.org>;
> Bryan Whitehead <bryan.whitehead@...rochip.com>; Sergey Shtylyov
> <s.shtylyov@....ru>; Giuseppe Cavallaro <peppe.cavallaro@...com>;
> Alexandre Torgue <alexandre.torgue@...s.st.com>; Jose Abreu
> <joabreu@...opsys.com>; Maxime Coquelin <mcoquelin.stm32@...il.com>;
> Richard Cochran <richardcochran@...il.com>; Thampi, Vivek
> <vithampi@...are.com>; VMware PV-Drivers Reviewers <pv-
> drivers@...are.com>; Jie Wang <wangjie125@...wei.com>; Guangbin Huang
> <huangguangbin2@...wei.com>; Eran Ben Elisha <eranbe@...dia.com>; Aya
> Levin <ayal@...dia.com>; Cai Huoqing <cai.huoqing@...ux.dev>; Biju Das
> <biju.das.jz@...renesas.com>; Lad Prabhakar <prabhakar.mahadev-
> lad.rj@...renesas.com>; Phil Edworthy <phil.edworthy@...esas.com>; Jiasheng
> Jiang <jiasheng@...as.ac.cn>; Gustavo A. R. Silva <gustavoars@...nel.org>; Linus
> Walleij <linus.walleij@...aro.org>; Wan Jiabing <wanjiabing@...o.com>; Lv Ruyi
> <lv.ruyi@....com.cn>; Arnd Bergmann <arnd@...db.de>
> Subject: Re: [net-next 09/14] ptp: mlx5: convert to .adjfine and
> adjust_by_scaled_ppm
> 
> On 19/08/2022 01:27, Jacob Keller wrote:
> > The mlx5 implementation of .adjfreq is implemented in terms of a
> > straight forward "base * ppb / 1 billion" calculation.
> >
> > Convert this to the .adjfine interface and use adjust_by_scaled_ppm for the
> > calculation  of the new mult value.
> >
> > Note that the mlx5_ptp_adjfreq_real_time function expects input in terms of
> > ppb, so use the scaled_ppm_to_ppb to convert before passing to this
> > function.
> >
> > Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> > Cc: Saeed Mahameed <saeedm@...dia.com>
> > Cc: Leon Romanovsky <leon@...nel.org>
> > Cc: Aya Levin <ayal@...dia.com>
> > ---
> >
> > I do not have this hardware, and have only compile tested the change.
> >
> >  .../ethernet/mellanox/mlx5/core/lib/clock.c   | 22 +++++--------------
> >  1 file changed, 6 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> > index 91e806c1aa21..34871ab659d9 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> > @@ -330,35 +330,25 @@ static int mlx5_ptp_adjfreq_real_time(struct
> mlx5_core_dev *mdev, s32 freq)
> >  	return mlx5_set_mtutc(mdev, in, sizeof(in));
> >  }
> >
> > -static int mlx5_ptp_adjfreq(struct ptp_clock_info *ptp, s32 delta)
> > +static int mlx5_ptp_adjfine(struct ptp_clock_info *ptp, long delta)
> 
> Small nit, please rename delta to scaled_ppm.
> I'll try to get this tested in our regression soon.

Will fix that in v2. Thanks for testing!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ