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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv0u87c3QpkT5=pGOEtLBwuZtEhaN9Ez97jmXgPv7y3-ew@mail.gmail.com>
Date:   Tue, 7 Mar 2023 10:37:43 +0530
From:   Pavan Chebbi <pavan.chebbi@...adcom.com>
To:     Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc:     Vadim Fedorenko <vadfed@...a.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Andy Gospodarek <andrew.gospodarek@...adcom.com>,
        Michael Chan <michael.chan@...adcom.com>,
        Richard Cochran <richardcochran@...il.com>,
        netdev@...r.kernel.org
Subject: Re: [PATCH net] bnxt_en: reset PHC frequency in free-running mode

On Tue, Mar 7, 2023 at 12:43 AM Vadim Fedorenko
<vadim.fedorenko@...ux.dev> wrote:
>
> On 06/03/2023 17:11, Pavan Chebbi wrote:
> > On Mon, Mar 6, 2023 at 10:23 PM Vadim Fedorenko <vadfed@...a.com> wrote:
> >>
> >> @@ -932,13 +937,15 @@ int bnxt_ptp_init(struct bnxt *bp, bool phc_cfg)
> >>          atomic_set(&ptp->tx_avail, BNXT_MAX_TX_TS);
> >>          spin_lock_init(&ptp->ptp_lock);
> >>
> >> -       if (bp->fw_cap & BNXT_FW_CAP_PTP_RTC) {
> >> +       if (BNXT_PTP_RTC(ptp->bp)) {
> >>                  bnxt_ptp_timecounter_init(bp, false);
> >>                  rc = bnxt_ptp_init_rtc(bp, phc_cfg);
> >>                  if (rc)
> >>                          goto out;
> >>          } else {
> >>                  bnxt_ptp_timecounter_init(bp, true);
> >> +               if (bp->fw_cap & BNXT_FW_CAP_PTP_RTC)
> >> +                       bnxt_ptp_adjfreq_rtc(bp, 0);

I am not sure if the intended objective of resetting the PHC is going
to be achieved with this. The FW will always apply the new ppb on the
base PHC frequency. I am not sure what you mean by "reset the hardware
frequency of PHC to zero" in the commit message. If you want PHC to
start counting from 0 on init, you may use bnxt_ptp_cfg_settime() with
0.
Also, the RTC flag may not be set on newer firmwares running on MH
systems. I see no harm in resetting the PHC unconditionally if we are
not in RTC mode.

> >
> > You meant bnxt_ptp_adjfine_rtc(), right.
> > Anyway, let me go through the patch in detail, while you may submit
> > corrections for the build.
> >
> Oh, yeah, right, artefact of rebasing. Will fix it in v2, thanks.
>
>
> >>          }
> >>
> >>          ptp->ptp_info = bnxt_ptp_caps;
> >> --
> >> 2.30.2
> >>
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ