mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aaron Tomlin <atomlin@atomlin.com>
To: ecree.xilinx@gmail.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: sean@ashe.io, netdev@vger.kernel.org, linux-net-drivers@amd.com,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH] sfc: log active datapath firmware variant on ef10/x4
Date: Wed,  2 Sep 2026 22:14:37 -0400	[thread overview]
Message-ID: <20260903021437.174319-1-atomlin@atomlin.com> (raw)

EF10 and X4 architecture controllers support multiple datapath microcode
variants (e.g., low-latency, full-feature, packed-stream, and dpdk)
within the same firmware bundle.

During adapter probe in efx_ef10_init_datapath_caps(), the running RX
and TX DPCPU firmware IDs are queried via MC_CMD_GET_CAPABILITIES.
Log the active datapath variant name and numerical ID at probe time
using pci_info() so that the selected variant is immediately visible
in dmesg for verification and diagnostics.

Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
---
 drivers/net/ethernet/sfc/ef10.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 73bc064929f6..3b92e95532c5 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -105,6 +105,26 @@ static int efx_ef10_get_vf_index(struct efx_nic *efx)
 }
 #endif
 
+static const char *efx_ef10_dpcpu_fw_variant_name(u16 dpcpu_id)
+{
+	switch (dpcpu_id) {
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP:
+		return "full-feature";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_LOW_LATENCY:
+		return "low-latency";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_PACKED_STREAM:
+		return "packed-stream";
+	case MC_CMD_GET_CAPABILITIES_OUT_TXDP_HIGH_PACKET_RATE:
+		return "high-tx-rate";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_RULES_ENGINE:
+		return "rules-engine";
+	case MC_CMD_GET_CAPABILITIES_OUT_RXDP_DPDK:
+		return "dpdk";
+	default:
+		return "unknown";
+	}
+}
+
 static int efx_ef10_init_datapath_caps(struct efx_nic *efx)
 {
 	MCDI_DECLARE_BUF(outbuf, MC_CMD_GET_CAPABILITIES_V7_OUT_LEN);
@@ -144,6 +164,13 @@ static int efx_ef10_init_datapath_caps(struct efx_nic *efx)
 	nic_data->tx_dpcpu_fw_id =
 		MCDI_WORD(outbuf, GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID);
 
+	pci_info(efx->pci_dev,
+		 "Datapath firmware variant: rx=%s (0x%x) tx=%s (0x%x)\n",
+		 efx_ef10_dpcpu_fw_variant_name(nic_data->rx_dpcpu_fw_id),
+		 nic_data->rx_dpcpu_fw_id,
+		 efx_ef10_dpcpu_fw_variant_name(nic_data->tx_dpcpu_fw_id),
+		 nic_data->tx_dpcpu_fw_id);
+
 	if (!(nic_data->datapath_caps &
 	      (1 << MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_LBN))) {
 		netif_err(efx, probe, efx->net_dev,
-- 
2.55.0


                 reply	other threads:[~2026-09-03  2:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260903021437.174319-1-atomlin@atomlin.com \
    --to=atomlin@atomlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sean@ashe.io \
    /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

all inboxes | Powered by JetHome®