netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	Milena Olech <milena.olech@intel.com>,
	przemyslaw.kitszel@intel.com, jacob.e.keller@intel.com,
	richardcochran@gmail.com, Josh Hay <joshua.a.hay@intel.com>,
	Samuel Salin <Samuel.salin@intel.com>
Subject: Re: [PATCH net-next v2 10/11] idpf: add Tx timestamp flows
Date: Mon, 28 Apr 2025 17:35:21 -0700	[thread overview]
Message-ID: <20250428173521.1af2cc52@kernel.org> (raw)
In-Reply-To: <20250425215227.3170837-11-anthony.l.nguyen@intel.com>

On Fri, 25 Apr 2025 14:52:24 -0700 Tony Nguyen wrote:
> +int idpf_ptp_get_tx_tstamp(struct idpf_vport *vport)
> +{
> +	struct virtchnl2_ptp_get_vport_tx_tstamp_latches *send_tx_tstamp_msg;
> +	struct idpf_ptp_vport_tx_tstamp_caps *tx_tstamp_caps;
> +	struct idpf_vc_xn_params xn_params = {
> +		.vc_op = VIRTCHNL2_OP_PTP_GET_VPORT_TX_TSTAMP,
> +		.timeout_ms = IDPF_VC_XN_DEFAULT_TIMEOUT_MSEC,
> +		.async = true,
> +		.async_handler = idpf_ptp_get_tx_tstamp_async_handler,
> +	};
> +	struct idpf_ptp_tx_tstamp *ptp_tx_tstamp;
> +	int reply_sz, size, msg_size;
> +	struct list_head *head;
> +	bool state_upd;
> +	u16 id = 0;
> +
> +	tx_tstamp_caps = vport->tx_tstamp_caps;
> +	head = &tx_tstamp_caps->latches_in_use;
> +
> +	size = struct_size(send_tx_tstamp_msg, tstamp_latches,
> +			   tx_tstamp_caps->num_entries);
> +	send_tx_tstamp_msg = kzalloc(size, GFP_KERNEL);
> +	if (!send_tx_tstamp_msg)
> +		return -ENOMEM;
> +
> +	spin_lock(&tx_tstamp_caps->latches_lock);

Looks like this function is called from a work but it takes 
the latches_lock in non-BH mode? Elsewhere the lock is taken
in BH mode. Not sure what the context for the async handler is.

  reply	other threads:[~2025-04-29  0:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 21:52 [PATCH net-next v2 00/11][pull request] idpf: add initial PTP support Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 01/11] idpf: change the method for mailbox workqueue allocation Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 02/11] idpf: add initial PTP support Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 03/11] virtchnl: add PTP virtchnl definitions Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 04/11] idpf: move virtchnl structures to the header file Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 05/11] idpf: negotiate PTP capabilities and get PTP clock Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 06/11] idpf: add mailbox access to read PTP clock time Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 07/11] idpf: add cross timestamping Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 08/11] idpf: add PTP clock configuration Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 09/11] idpf: add Tx timestamp capabilities negotiation Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 10/11] idpf: add Tx timestamp flows Tony Nguyen
2025-04-29  0:35   ` Jakub Kicinski [this message]
2025-05-05 17:08     ` Olech, Milena
2025-05-05 19:00       ` Jakub Kicinski
2025-04-29  0:37   ` Jakub Kicinski
2025-04-29 20:06     ` Jacob Keller
2025-04-25 21:52 ` [PATCH net-next v2 11/11] idpf: add support for Rx timestamping Tony Nguyen
2025-04-29  0:39 ` [PATCH net-next v2 00/11][pull request] idpf: add initial PTP support Jakub Kicinski
2025-04-29 21:41   ` Tony Nguyen
2025-04-29 21:52     ` Jakub Kicinski
2025-05-05 17:20       ` Olech, Milena
2025-05-05 19:02         ` Jakub Kicinski
2025-05-06 14:50           ` Olech, Milena

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=20250428173521.1af2cc52@kernel.org \
    --to=kuba@kernel.org \
    --cc=Samuel.salin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=joshua.a.hay@intel.com \
    --cc=milena.olech@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).