[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250428173521.1af2cc52@kernel.org>
Date: Mon, 28 Apr 2025 17:35:21 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
andrew+netdev@...n.ch, netdev@...r.kernel.org, Milena Olech
<milena.olech@...el.com>, przemyslaw.kitszel@...el.com,
jacob.e.keller@...el.com, richardcochran@...il.com, Josh Hay
<joshua.a.hay@...el.com>, Samuel Salin <Samuel.salin@...el.com>
Subject: Re: [PATCH net-next v2 10/11] idpf: add Tx timestamp flows
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.
Powered by blists - more mailing lists