[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10175186-abff-42a9-aebe-d8d0d1daaf5c@intel.com>
Date: Wed, 21 Aug 2024 15:29:27 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Wojciech Drewek <wojciech.drewek@...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
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.
> +
> /* 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?
> + * 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