From: Jeff Kirsher Date: Tue, 26 Mar 2019 15:05:13 -0700 Subject: [Intel-wired-lan] [PATCH] i40e: fix i40e_ptp_adjtime when given a negative delta In-Reply-To: <02874ECE860811409154E81DA85FBB589233261D@ORSMSX121.amr.corp.intel.com> References: <20190225192005.3233-1-jacob.e.keller@intel.com> <02874ECE860811409154E81DA85FBB589233261D@ORSMSX121.amr.corp.intel.com> Message-ID: <6e2c5943f48496b23d3659efe358736f05ef5560.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Mon, 2019-03-25 at 10:23 -0700, Keller, Jacob E wrote: > > -----Original Message----- > > From: Arnd Bergmann [mailto:arnd at arndb.de] > > Sent: Monday, March 25, 2019 9:45 AM > > To: Keller, Jacob E > > Cc: Intel Wired LAN ; Kirsher, > > Jeffrey T > > > > Subject: Re: [PATCH] i40e: fix i40e_ptp_adjtime when given a > > negative delta > > > > On Mon, Feb 25, 2019 at 8:46 PM Arnd Bergmann > > wrote: > > > On Mon, Feb 25, 2019 at 8:20 PM Jacob Keller < > > > jacob.e.keller at intel.com> wrote: > > > > Commit 0ac30ce43323 ("i40e: fix up 32 bit timespec references", > > > > 2017-07-26) claims to be cleaning up references to 32-bit > > > > timespecs. > > > > > > > > The actual contents of the commit make no sense, as it converts > > > > a call > > > > to timespec64_add into timespec64_add_ns. This would seem ok, > > > > if (a) the > > > > change was documented in the commit message, and (b) > > > > timespec64_add_ns > > > > supported negative numbers. > > > > > > > > timespec64_add_ns doesn't work with signed deltas, because the > > > > implementation is based around iter_div_u64_rem. This change > > > > resulted in > > > > a regression where i40e_ptp_adjtime would interpret small > > > > negative > > > > adjustments as large positive additions, resulting in incorrect > > > > behavior. > > > > > > > > This commit doesn't appear to fix anything, is not well > > > > explained, and > > > > introduces a bug, so lets just revert it. > > > > > > Ah, this is not the bug I was referring to but actually worse. > > > I was only worried about hogging the CPU while doing billions > > > of additions in a loop, and had not realized it also changes > > > the result. > > > > > > > Reverts: 0ac30ce43323 ("i40e: fix up 32 bit timespec > > > > references", 2017-07-26) > > > > Signed-off-by: Jacob Keller > > > > > > Reviewed-by: Arnd Bergmann > > > > Any update on this? Your patch doesn't seem to have made it in as > > a bugfix, or into linux-next yet. > > > > Arnd > > It's still marked as under review on patchworks. It was marked as > tested by Andrew Bowers, so I am not sure what else holdup is. > > Jeff? > > I think this patch could/should go through net because it's a bug > fix. I apologize, I got bogged down with ice driver patches. I will push the fix to Dave's net tree now. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: This is a digitally signed message part URL: