From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7312E13FEE for ; Thu, 16 Oct 2025 08:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760602240; cv=none; b=qOcoC71Nw5El4mwjdwe7ZMdT9qUbeahpnAMRAbXDUktJRGnVYw7shg9JdUh1Y12CO7DyHUY17ZAtfFJ6tRQmQ+HBaGecww4Eot/AgbGH8fe8xRyFFPgGM4tZQj4RutgunzgzxLSsrWJxfREfK3oqStAcd2ApoLyMi1PrK0bkPCg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760602240; c=relaxed/simple; bh=GDlWWLetkqF/sSckV823LYVVIJ0WbMaRRMRJmqhDD00=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UhoqLWrqY2iOubiP5IKWkJ/sQCDEKxdBihTwDxLDGENvqxIDITZXFIeO84IXZpK20rZzmuDKfVibsdqoHLOy2QQE+YugbMvjIqlFSlegvmzTzCtoiS0ySFc7Ug0+2nYYcFtwOnexQnFwwk17AbVLjycKZepn6a99vyJ1bqDJR3Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IK5PENUK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IK5PENUK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06EA6C4CEFB; Thu, 16 Oct 2025 08:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760602240; bh=GDlWWLetkqF/sSckV823LYVVIJ0WbMaRRMRJmqhDD00=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IK5PENUKhPTGWcBGOioGzS0k9+6sbjZD4ES5qao9/QAYhbnTlKsICgROKmbEJg3jH AdX7FrnMIo4wRMmfWEAg8mxQCr52vXL6p0a5RI1JJtV37K5PZp0tZHHz8+eyef57jl oHMpjPVYSr/bywxqcbTsFG2w4m3Sbdm3lue/ugxWxvwqSpAnhcy0Ab235oETdIBoaj DFL/AAnu+HAKtFcjnGLiLs259C+x3Vu/jAyJXHJvfwuruwrggphtBfauh3F6UD/KPD obojFyK2IOUOeMXUmiiJmgEs5A/qvgB6/B5noQ3EMUt802il7prWIciKhoyyHoRz02 m1bJtzutw4ymw== Date: Thu, 16 Oct 2025 09:10:34 +0100 From: Simon Horman To: Vadim Fedorenko Cc: Shyam Sundar S K , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Egor Pomozov , Potnuri Bharat Teja , Dimitris Michailidis , MD Danish Anwar , Roger Quadros , Richard Cochran , Russell King , Vladimir Oltean , netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 5/7] cxgb4: convert to ndo_hwtstamp API Message-ID: References: <20251014224216.8163-1-vadim.fedorenko@linux.dev> <20251014224216.8163-6-vadim.fedorenko@linux.dev> <193627cf-a8c7-4428-a5d3-8813b1edc04d@linux.dev> <1639cc31-b57f-4370-8062-6a06252451f0@linux.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1639cc31-b57f-4370-8062-6a06252451f0@linux.dev> On Wed, Oct 15, 2025 at 09:05:16PM +0100, Vadim Fedorenko wrote: > On 15.10.2025 15:37, Simon Horman wrote: > > On Wed, Oct 15, 2025 at 11:33:02AM +0100, Vadim Fedorenko wrote: > > > On 15/10/2025 11:05, Simon Horman wrote: > > > > On Tue, Oct 14, 2025 at 10:42:14PM +0000, Vadim Fedorenko wrote: > > > > > Convert to use .ndo_hwtstamp_get()/.ndo_hwtstamp_set() callbacks. > > > > > > > > > > Though I'm not quite sure it worked properly before the conversion. > > > > > > > > > > Signed-off-by: Vadim Fedorenko > > > > > > > > Hi Vadim, > > > > > > > > There is quite a lot of change here. Probably it's not worth "fixing" > > > > the current code before migrating it. But I think it would be worth > > > > expanding a bit on the statement about not being sure it worked? > > > > > > Hi Simon! > > > > > > Well, let me try to explain the statement about not being sure it > > > worked. The original code was copying new configuration into netdev's > > > private structure before validating that the values are acceptable by > > > the hardware. In case of error, the driver was not restoring original > > > values, and after the call: > > > > > > ioctl(SIOCSHWTSTAMP, ) = -ERANGE > > > > > > the driver would have configuration which could not be reapplied and not > > > synced to the actual hardware config: > > > > > > ioctl(SIOCGHWTSTAMP) = > > > > > > The logic change in the patch is to just keep original configuration in > > > case of -ERANGE error. Otherwise the logic is not changed. > > > > Thanks Vadim, > > > > I see that now and it makes sense to me. > > I do think it would be worth mentioning in the patch description. > > Fair point, I'll update commit message for v3. Thanks, much appreciated.