From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Sergey Temerkhanov <sergey.temerkhanov@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: netdev@vger.kernel.org, Simon Horman <horms@kernel.org>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 4/5] ice: Use ice_adapter for PTP shared data instead of auxdev
Date: Tue, 23 Jul 2024 15:09:08 -0700 [thread overview]
Message-ID: <d0d500cc-6eba-843d-1ca5-ca1e44bd003e@intel.com> (raw)
In-Reply-To: <20240718105253.72997-5-sergey.temerkhanov@intel.com>
On 7/18/2024 3:52 AM, Sergey Temerkhanov wrote:
> Use struct ice_adapter to hold shared PTP data and control PTP
> related actions instead of auxbus. This allows significant code
> simplification and faster access to the container fields used in
> the PTP support code.
>
> Move the PTP port list to the ice_adapter container to simplify
> the code and avoid race conditions which could occur due to the
> synchronous nature of the initialization/access and
> certain memory saving can be achieved by moving PTP data into
> the ice_adapter itself.
>
> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> ---
...
> @@ -2967,6 +2967,50 @@ void ice_ptp_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
> dev_err(ice_pf_to_dev(pf), "PTP reset failed %d\n", err);
> }
>
> +static inline bool ice_is_primary(struct ice_hw *hw)
no 'inline' for c files please.
> +{
> + return ice_is_e825c(hw) && ice_is_dual(hw) ?
> + !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_PRIMARY_M) : true;
> +}
> +
...
> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> @@ -468,6 +468,11 @@ static inline u64 ice_get_base_incval(struct ice_hw *hw)
> }
> }
>
> +static inline bool ice_is_dual(struct ice_hw *hw)
> +{
> + return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);
> +}
Please use tabs:
ERROR: code indent should use tabs where possible
#408: FILE: drivers/net/ethernet/intel/ice/ice_ptp_hw.h:473:
+ return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);$
WARNING: please, no spaces at the start of a line
#408: FILE: drivers/net/ethernet/intel/ice/ice_ptp_hw.h:473:
+ return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);$
Thanks,
Tony
> +
> #define PFTSYN_SEM_BYTES 4
>
> #define ICE_PTP_CLOCK_INDEX_0 0x00
WARNING: multiple messages have this Message-ID (diff)
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Sergey Temerkhanov <sergey.temerkhanov@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH iwl-next v4 4/5] ice: Use ice_adapter for PTP shared data instead of auxdev
Date: Tue, 23 Jul 2024 15:09:08 -0700 [thread overview]
Message-ID: <d0d500cc-6eba-843d-1ca5-ca1e44bd003e@intel.com> (raw)
In-Reply-To: <20240718105253.72997-5-sergey.temerkhanov@intel.com>
On 7/18/2024 3:52 AM, Sergey Temerkhanov wrote:
> Use struct ice_adapter to hold shared PTP data and control PTP
> related actions instead of auxbus. This allows significant code
> simplification and faster access to the container fields used in
> the PTP support code.
>
> Move the PTP port list to the ice_adapter container to simplify
> the code and avoid race conditions which could occur due to the
> synchronous nature of the initialization/access and
> certain memory saving can be achieved by moving PTP data into
> the ice_adapter itself.
>
> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> ---
...
> @@ -2967,6 +2967,50 @@ void ice_ptp_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type)
> dev_err(ice_pf_to_dev(pf), "PTP reset failed %d\n", err);
> }
>
> +static inline bool ice_is_primary(struct ice_hw *hw)
no 'inline' for c files please.
> +{
> + return ice_is_e825c(hw) && ice_is_dual(hw) ?
> + !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_PRIMARY_M) : true;
> +}
> +
...
> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
> @@ -468,6 +468,11 @@ static inline u64 ice_get_base_incval(struct ice_hw *hw)
> }
> }
>
> +static inline bool ice_is_dual(struct ice_hw *hw)
> +{
> + return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);
> +}
Please use tabs:
ERROR: code indent should use tabs where possible
#408: FILE: drivers/net/ethernet/intel/ice/ice_ptp_hw.h:473:
+ return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);$
WARNING: please, no spaces at the start of a line
#408: FILE: drivers/net/ethernet/intel/ice/ice_ptp_hw.h:473:
+ return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);$
Thanks,
Tony
> +
> #define PFTSYN_SEM_BYTES 4
>
> #define ICE_PTP_CLOCK_INDEX_0 0x00
next prev parent reply other threads:[~2024-07-23 22:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 10:52 [Intel-wired-lan] [PATCH iwl-next v4 0/5] Replace auxbus with ice_adapter in the PTP support code Sergey Temerkhanov
2024-07-18 10:52 ` Sergey Temerkhanov
2024-07-18 10:52 ` [Intel-wired-lan] [PATCH iwl-next v4 1/5] ice: Introduce ice_get_phy_model() wrapper Sergey Temerkhanov
2024-07-18 10:52 ` Sergey Temerkhanov
2024-07-18 10:52 ` [Intel-wired-lan] [PATCH iwl-next v4 2/5] ice: Add ice_get_ctrl_ptp() wrapper to simplify the code Sergey Temerkhanov
2024-07-18 10:52 ` Sergey Temerkhanov
2024-07-18 10:52 ` [Intel-wired-lan] [PATCH iwl-next v4 3/5] ice: Initial support for E825C hardware in ice_adapter Sergey Temerkhanov
2024-07-18 10:52 ` Sergey Temerkhanov
2024-07-18 12:56 ` [Intel-wired-lan] " Simon Horman
2024-07-18 12:56 ` Simon Horman
2024-07-23 23:15 ` [Intel-wired-lan] " Jacob Keller
2024-07-23 23:15 ` Jacob Keller
2024-07-18 10:52 ` [Intel-wired-lan] [PATCH iwl-next v4 4/5] ice: Use ice_adapter for PTP shared data instead of auxdev Sergey Temerkhanov
2024-07-18 10:52 ` Sergey Temerkhanov
2024-07-23 22:09 ` Tony Nguyen [this message]
2024-07-23 22:09 ` Tony Nguyen
2024-07-23 23:19 ` [Intel-wired-lan] " Jacob Keller
2024-07-23 23:19 ` Jacob Keller
2024-07-18 10:52 ` [Intel-wired-lan] [PATCH iwl-next v4 5/5] ice: Drop auxbus use for PTP to finalize ice_adapter move Sergey Temerkhanov
2024-07-18 10:52 ` Sergey Temerkhanov
2024-07-23 23:20 ` [Intel-wired-lan] " Jacob Keller
2024-07-23 23:20 ` Jacob Keller
2024-07-29 11:37 ` Przemek Kitszel
2024-07-29 11:37 ` Przemek Kitszel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0d500cc-6eba-843d-1ca5-ca1e44bd003e@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sergey.temerkhanov@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.