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] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR11MB46577FE6D7147429D20CEFBF9B4C2@DM6PR11MB4657.namprd11.prod.outlook.com>
Date: Tue, 22 Oct 2024 14:52:38 +0000
From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>
To: Simon Horman <horms@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
	<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"richardcochran@...il.com" <richardcochran@...il.com>, "Loktionov, Aleksandr"
	<aleksandr.loktionov@...el.com>
Subject: RE: [PATCH net-next 2/2] ice: ptp: add control over HW timestamp
 latch point

>From: Simon Horman <horms@...nel.org>
>Sent: Tuesday, October 22, 2024 3:40 PM
>
>On Mon, Oct 21, 2024 at 04:19:55PM +0200, Arkadiusz Kubalewski wrote:
>> Allow user to control the latch point of ptp HW timestamps in E825
>> devices.
>>
>> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
>> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
>> ---
>>  drivers/net/ethernet/intel/ice/ice_ptp.c    | 46 +++++++++++++++++
>>  drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 57
>> +++++++++++++++++++++  drivers/net/ethernet/intel/ice/ice_ptp_hw.h |
>> 2 +
>>  3 files changed, 105 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c
>> b/drivers/net/ethernet/intel/ice/ice_ptp.c
>> index a999fface272..47444412ed9a 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
>> @@ -2509,6 +2509,50 @@ static int ice_ptp_parse_sdp_entries(struct ice_pf
>> *pf, __le16 *entries,
>>  	return 0;
>>  }
>>
>> +/**
>> + * ice_get_ts_point - get the tx timestamp latch point
>> + * @info: the driver's PTP info structure
>> + * @point: return the configured tx timestamp latch point
>> + *
>> + * Return: 0 on success, negative on failure.
>> + */
>> +static int
>> +ice_get_ts_point(struct ptp_clock_info *info, enum ptp_ts_point
>> +*point) {
>> +	struct ice_pf *pf = ptp_info_to_pf(info);
>> +	struct ice_hw *hw = &pf->hw;
>> +	bool sfd_ena;
>> +	int ret;
>> +
>> +	ice_ptp_lock(hw);
>> +	ret = ice_ptp_hw_ts_point_get(hw, &sfd_ena);
>> +	ice_ptp_unlock(hw);
>> +	if (!ret)
>> +		*point = sfd_ena ? PTP_TS_POINT_SFD : PTP_TS_POINT_POST_SFD;
>> +
>> +	return ret;
>> +}
>> +
>> +/**
>> + * ice_set_ts_point - set the tx timestamp latch point
>> + * @info: the driver's PTP info structure
>> + * @point: requested tx timestamp latch point
>
>nit: Please include documentation of the return value,
>     as was done for ice_get_ts_point.
>
>     Flagged by ./scripts/kernel-doc -none -Warn
>

Sure, will do.

Thank you!
Arkadiusz

>> + */
>> +static int
>> +ice_set_ts_point(struct ptp_clock_info *info, enum ptp_ts_point
>> +point) {
>> +	bool sfd_ena = point == PTP_TS_POINT_SFD ? true : false;
>> +	struct ice_pf *pf = ptp_info_to_pf(info);
>> +	struct ice_hw *hw = &pf->hw;
>> +	int ret;
>> +
>> +	ice_ptp_lock(hw);
>> +	ret = ice_ptp_hw_ts_point_set(hw, sfd_ena);
>> +	ice_ptp_unlock(hw);
>> +
>> +	return ret;
>> +}
>> +
>>  /**
>>   * ice_ptp_set_funcs_e82x - Set specialized functions for E82X support
>>   * @pf: Board private structure
>
>...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ