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: <675c1a1b-49c9-4893-8f8c-92d33e2f6dd7@intel.com>
Date: Fri, 23 Aug 2024 11:52:56 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
CC: <netdev@...r.kernel.org>, <intel-wired-lan@...ts.osuosl.org>,
	<horms@...nel.org>, <anthony.l.nguyen@...el.com>, <kuba@...nel.org>,
	<alexandr.lobakin@...el.com>
Subject: Re: [PATCH iwl-next v10 02/14] ice: support Rx timestamp on flex
 descriptor



On 21.08.2024 15:29, Alexander Lobakin wrote:
> From: Wojciech Drewek <wojciech.drewek@...el.com>
> Date: Wed, 21 Aug 2024 14:15:27 +0200
> 
>> From: Simei Su <simei.su@...el.com>
>>
>> To support Rx timestamp offload, VIRTCHNL_OP_1588_PTP_CAPS is sent by
>> the VF to request PTP capability and responded by the PF what capability
>> is enabled for that VF.
>>
>> Hardware captures timestamps which contain only 32 bits of nominal
>> nanoseconds, as opposed to the 64bit timestamps that the stack expects.
>> To convert 32b to 64b, we need a current PHC time.
>> VIRTCHNL_OP_1588_PTP_GET_TIME is sent by the VF and responded by the
>> PF with the current PHC time.
> 
> [...]
> 
>> diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.h b/drivers/net/ethernet/intel/ice/ice_vf_lib.h
>> index be4266899690..b7c340bb7aa7 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_vf_lib.h
>> +++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.h
>> @@ -136,6 +136,8 @@ struct ice_vf {
>>  	const struct ice_virtchnl_ops *virtchnl_ops;
>>  	const struct ice_vf_ops *vf_ops;
>>  
>> +	u32 ptp_caps;
> 
> Hmm, there'll be a 4-byte hole here now.
> If you put this new field either after ::mbx_info or after ::link_up,
> the struct size won't change at all.

Sure thing

> 
>> +
>>  	/* devlink port data */
>>  	struct devlink_port devlink_port;
>>  
> 
> [...]
> 
>> diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
>> index 252fad21b04a..012ed2f5f9d0 100644
>> --- a/include/linux/avf/virtchnl.h
>> +++ b/include/linux/avf/virtchnl.h
>> @@ -304,6 +304,18 @@ struct virtchnl_txq_info {
>>  
>>  VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_txq_info);
>>  
>> +/* virtchnl_rxq_info_flags - definition of bits in the flags field of the
>> + *			     virtchnl_rxq_info structure.
>> + *
>> + * @VIRTCHNL_PTP_RX_TSTAMP: request to enable Rx timestamping
>> + *
>> + * Other flag bits are currently * reserved and they may be extended in the
> 
>                                     ^
> 
> Just curious, what is this?

No idea :), will be removed

> 
>> + * future.
>> + */
>> +enum virtchnl_rxq_info_flags {
>> +	VIRTCHNL_PTP_RX_TSTAMP = BIT(0),
>> +};
>> +
>>  /* VIRTCHNL_OP_CONFIG_RX_QUEUE
>>   * VF sends this message to set up parameters for one RX queue.
>>   * External data buffer contains one instance of virtchnl_rxq_info.
>> @@ -327,7 +339,8 @@ struct virtchnl_rxq_info {
>>  	u32 max_pkt_size;
>>  	u8 crc_disable;
>>  	u8 rxdid;
>> -	u8 pad1[2];
>> +	enum virtchnl_rxq_info_flags flags:8; /* see virtchnl_rxq_info_flags */
>> +	u8 pad1;
>>  	u64 dma_ring_addr;
>>  
>>  	/* see enum virtchnl_rx_hsplit; deprecated with AVF 1.0 */
> 
> Thanks,
> Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ