netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Alexander Duyck <alexander.duyck@gmail.com>, <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>
Subject: Re: [net PATCH v2 7/8] fbnic: Pull fbnic_fw_xmit_cap_msg use out of interrupt context
Date: Tue, 6 May 2025 11:56:59 -0700	[thread overview]
Message-ID: <ffb6bdbb-64f6-4be2-984e-3c8be185f62c@intel.com> (raw)
In-Reply-To: <174654721876.499179.9839651602256668493.stgit@ahduyck-xeon-server.home.arpa>



On 5/6/2025 9:00 AM, Alexander Duyck wrote:
> From: Alexander Duyck <alexanderduyck@fb.com>
> 
> This change pulls the call to fbnic_fw_xmit_cap_msg out of
> fbnic_mbx_init_desc_ring and instead places it in the polling function for
> getting the Tx ready. Doing that we can avoid the potential issue with an
> interrupt coming in later from the firmware that causes it to get fired in
> interrupt context.
> 
> Fixes: 20d2e88cc746 ("eth: fbnic: Add initial messaging to notify FW of our presence")
> Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>


Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

> @@ -393,15 +375,6 @@ static void fbnic_mbx_init_desc_ring(struct fbnic_dev *fbd, int mbx_idx)
>  		/* Enable DMA reads from the device */
>  		wr32(fbd, FBNIC_PUL_OB_TLP_HDR_AR_CFG,
>  		     FBNIC_PUL_OB_TLP_HDR_AR_CFG_BME);
> -
> -		/* Force version to 1 if we successfully requested an update
> -		 * from the firmware. This should be overwritten once we get
> -		 * the actual version from the firmware in the capabilities
> -		 * request message.
> -		 */
> -		if (!fbnic_fw_xmit_cap_msg(fbd) &&
> -		    !fbd->fw_cap.running.mgmt.version)
> -			fbd->fw_cap.running.mgmt.version = 1;

...

>  
> +	/* Request an update from the firmware. This should overwrite
> +	 * mgmt.version once we get the actual version from the firmware
> +	 * in the capabilities request message.
> +	 */
> +	err = fbnic_fw_xmit_simple_msg(fbd, FBNIC_TLV_MSG_ID_HOST_CAP_REQ);
> +	if (err)
> +		goto clean_mbx;
> +
> +	/* Use "1" to indicate we entered the state waiting for a response */
> +	fbd->fw_cap.running.mgmt.version = 1;
> +

Curious about the comment rewording here. I guess the extra information
about forcing and the value being updated to the actual version later
isn't as relevant in the new location?

  reply	other threads:[~2025-05-06 18:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 15:59 [net PATCH v2 0/8] fbnic: FW IPC Mailbox fixes Alexander Duyck
2025-05-06 15:59 ` [net PATCH v2 1/8] fbnic: Fix initialization of mailbox descriptor rings Alexander Duyck
2025-05-06 18:44   ` Jacob Keller
2025-05-06 15:59 ` [net PATCH v2 2/8] fbnic: Gate AXI read/write enabling on FW mailbox Alexander Duyck
2025-05-06 18:45   ` Jacob Keller
2025-05-06 15:59 ` [net PATCH v2 3/8] fbnic: Add additional handling of IRQs Alexander Duyck
2025-05-06 18:47   ` Jacob Keller
2025-05-06 15:59 ` [net PATCH v2 4/8] fbnic: Actually flush_tx instead of stalling out Alexander Duyck
2025-05-06 18:52   ` Jacob Keller
2025-05-06 20:31     ` Alexander Duyck
2025-05-06 22:03       ` Jacob Keller
2025-05-06 16:00 ` [net PATCH v2 5/8] fbnic: Cleanup handling of completions Alexander Duyck
2025-05-06 18:53   ` Jacob Keller
2025-05-06 16:00 ` [net PATCH v2 6/8] fbnic: Improve responsiveness of fbnic_mbx_poll_tx_ready Alexander Duyck
2025-05-06 18:54   ` Jacob Keller
2025-05-06 16:00 ` [net PATCH v2 7/8] fbnic: Pull fbnic_fw_xmit_cap_msg use out of interrupt context Alexander Duyck
2025-05-06 18:56   ` Jacob Keller [this message]
2025-05-06 20:14     ` Alexander Duyck
2025-05-06 16:00 ` [net PATCH v2 8/8] fbnic: Do not allow mailbox to toggle to ready outside fbnic_mbx_poll_tx_ready Alexander Duyck
2025-05-06 18:57   ` Jacob Keller
2025-05-08  1:41 ` [net PATCH v2 0/8] fbnic: FW IPC Mailbox fixes Jakub Kicinski
2025-05-08  9:50 ` patchwork-bot+netdevbpf

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=ffb6bdbb-64f6-4be2-984e-3c8be185f62c@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).