All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Karol Kolacinski <karol.kolacinski@intel.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	intel-wired-lan@lists.osuosl.org, jesse.brandeburg@intel.com
Subject: Re: [Intel-wired-lan] [PATCH v5 iwl-next 1/6] ice: introduce PTP state machine
Date: Mon, 15 Jan 2024 10:32:40 +0000	[thread overview]
Message-ID: <20240115103240.GL392144@kernel.org> (raw)
In-Reply-To: <20240108124717.1845481-2-karol.kolacinski@intel.com>

On Mon, Jan 08, 2024 at 01:47:12PM +0100, Karol Kolacinski wrote:

Should there be a "From: Jacob" line here to
match the Signed-off-by below?

> Add PTP state machine so that the driver can correctly identify PTP
> state around resets.
> When the driver got information about ungraceful reset, PTP was not
> prepared for reset and it returned error. When this situation occurs,
> prepare PTP before rebuilding its structures.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

Hi Karol and Jacob,

FWIIW, The combination of both a Signed-off-by and Reviewed-by tag from
Jacob seems a little odd to me. If he authored the patch then I would have
gone with the following (along with the From line mentioned above):

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>

Otherwise, if he reviewed the patch I would have gone with:

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c

...

> @@ -2640,6 +2676,16 @@ void ice_ptp_reset(struct ice_pf *pf)
>  	int err, itr = 1;
>  	u64 time_diff;
>  
> +	if (ptp->state != ICE_PTP_RESETTING) {
> +		if (ptp->state == ICE_PTP_READY) {
> +			ice_ptp_prepare_for_reset(pf);
> +		} else {
> +			err = -EINVAL;
> +			dev_err(ice_pf_to_dev(pf), "PTP was not initialized\n");
> +			goto err;
> +		}
> +	}

nit: perhaps this following is slightly nicer?
     (completely untested!)

	if (ptp->state == ICE_PTP_READY) {
		ice_ptp_prepare_for_reset(pf);
	} else if (ptp->state != ICE_PTP_RESETTING) {
		err = -EINVAL;
		dev_err(ice_pf_to_dev(pf), "PTP was not initialized\n");
		goto err;
	}

> +
>  	if (test_bit(ICE_PFR_REQ, pf->state) ||
>  	    !ice_pf_src_tmr_owned(pf))
>  		goto pfr;

...

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Karol Kolacinski <karol.kolacinski@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	anthony.l.nguyen@intel.com, jesse.brandeburg@intel.com,
	Jacob Keller <jacob.e.keller@intel.com>
Subject: Re: [PATCH v5 iwl-next 1/6] ice: introduce PTP state machine
Date: Mon, 15 Jan 2024 10:32:40 +0000	[thread overview]
Message-ID: <20240115103240.GL392144@kernel.org> (raw)
In-Reply-To: <20240108124717.1845481-2-karol.kolacinski@intel.com>

On Mon, Jan 08, 2024 at 01:47:12PM +0100, Karol Kolacinski wrote:

Should there be a "From: Jacob" line here to
match the Signed-off-by below?

> Add PTP state machine so that the driver can correctly identify PTP
> state around resets.
> When the driver got information about ungraceful reset, PTP was not
> prepared for reset and it returned error. When this situation occurs,
> prepare PTP before rebuilding its structures.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

Hi Karol and Jacob,

FWIIW, The combination of both a Signed-off-by and Reviewed-by tag from
Jacob seems a little odd to me. If he authored the patch then I would have
gone with the following (along with the From line mentioned above):

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>

Otherwise, if he reviewed the patch I would have gone with:

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>

...

> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c

...

> @@ -2640,6 +2676,16 @@ void ice_ptp_reset(struct ice_pf *pf)
>  	int err, itr = 1;
>  	u64 time_diff;
>  
> +	if (ptp->state != ICE_PTP_RESETTING) {
> +		if (ptp->state == ICE_PTP_READY) {
> +			ice_ptp_prepare_for_reset(pf);
> +		} else {
> +			err = -EINVAL;
> +			dev_err(ice_pf_to_dev(pf), "PTP was not initialized\n");
> +			goto err;
> +		}
> +	}

nit: perhaps this following is slightly nicer?
     (completely untested!)

	if (ptp->state == ICE_PTP_READY) {
		ice_ptp_prepare_for_reset(pf);
	} else if (ptp->state != ICE_PTP_RESETTING) {
		err = -EINVAL;
		dev_err(ice_pf_to_dev(pf), "PTP was not initialized\n");
		goto err;
	}

> +
>  	if (test_bit(ICE_PFR_REQ, pf->state) ||
>  	    !ice_pf_src_tmr_owned(pf))
>  		goto pfr;

...

  parent reply	other threads:[~2024-01-15 10:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 12:47 [Intel-wired-lan] [PATCH v5 iwl-next 0/6] ice: fix timestamping in reset process Karol Kolacinski
2024-01-08 12:47 ` Karol Kolacinski
2024-01-08 12:47 ` [Intel-wired-lan] [PATCH v5 iwl-next 1/6] ice: introduce PTP state machine Karol Kolacinski
2024-01-08 12:47   ` Karol Kolacinski
2024-01-12 17:32   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-01-12 17:32     ` Pucha, HimasekharX Reddy
2024-01-15 10:32   ` Simon Horman [this message]
2024-01-15 10:32     ` Simon Horman
2024-01-17 22:07     ` [Intel-wired-lan] " Keller, Jacob E
2024-01-17 22:07       ` Keller, Jacob E
2024-01-19 16:55       ` [Intel-wired-lan] " Simon Horman
2024-01-19 16:55         ` Simon Horman
2024-01-08 12:47 ` [Intel-wired-lan] [PATCH v5 iwl-next 2/6] ice: pass reset type to PTP reset functions Karol Kolacinski
2024-01-08 12:47   ` Karol Kolacinski
2024-01-12 17:33   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-01-12 17:33     ` Pucha, HimasekharX Reddy
2024-01-08 12:47 ` [Intel-wired-lan] [PATCH v5 iwl-next 3/6] ice: rename verify_cached to has_ready_bitmap Karol Kolacinski
2024-01-08 12:47   ` Karol Kolacinski
2024-01-12 17:33   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-01-12 17:33     ` Pucha, HimasekharX Reddy
2024-01-15 10:36   ` Simon Horman
2024-01-15 10:36     ` Simon Horman
2024-01-17 22:10     ` [Intel-wired-lan] " Keller, Jacob E
2024-01-17 22:10       ` Keller, Jacob E
2024-01-08 12:47 ` [Intel-wired-lan] [PATCH v5 iwl-next 4/6] ice: rename ice_ptp_tx_cfg_intr Karol Kolacinski
2024-01-08 12:47   ` Karol Kolacinski
2024-01-12 17:33   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-01-12 17:33     ` Pucha, HimasekharX Reddy
2024-01-08 12:47 ` [Intel-wired-lan] [PATCH v5 iwl-next 5/6] ice: factor out ice_ptp_rebuild_owner() Karol Kolacinski
2024-01-08 12:47   ` Karol Kolacinski
2024-01-12 17:33   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-01-12 17:33     ` Pucha, HimasekharX Reddy
2024-01-15 10:39   ` Simon Horman
2024-01-15 10:39     ` Simon Horman
2024-01-18 17:36     ` [Intel-wired-lan] " Kolacinski, Karol
2024-01-18 17:36       ` Kolacinski, Karol
2024-01-08 12:47 ` [Intel-wired-lan] [PATCH v5 iwl-next 6/6] ice: stop destroying and reinitalizing Tx tracker during reset Karol Kolacinski
2024-01-08 12:47   ` Karol Kolacinski
2024-01-12 17:32   ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
2024-01-12 17:32     ` Pucha, HimasekharX Reddy

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=20240115103240.GL392144@kernel.org \
    --to=horms@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=karol.kolacinski@intel.com \
    --cc=netdev@vger.kernel.org \
    /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.