| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/11/18 05:20 | flow | patch-triage |
12mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch series exclusively modifies the Meta Platforms Host Network Interface (fbnic) driver under drivers/net/ethernet/meta/fbnic/. This driver requires vendor-specific physical ASIC/PCIe hardware that is not emulated in standard QEMU/KVM virtualized fuzzing environments. Consequently, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/11/18 05:20 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 3dae7fb0a4b60c5e8ab546ed0383c790984d310c\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Nov 18 05:20:47 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_csr.h b/drivers/net/ethernet/meta/fbnic/fbnic_csr.h\nindex c371ac9f78c182..dc234f4d24f663 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_csr.h\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_csr.h\n@@ -422,7 +422,8 @@ enum {\n #define FBNIC_TCE_TXB_NTWRK_DWRR_CTRL_EXT \\\n \t\t\t\t\t0x0404E\t\t/* 0x10138 */\n #define FBNIC_TCE_TXB_BMC_DWRR_CTRL_EXT\t0x0404F\t\t/* 0x1013c */\n-#define FBNIC_CSR_END_TCE\t\t0x04050\t/* CSR section delimiter */\n+#define FBNIC_TCE_PTP_INFLIGHT\t\t0x040A7\t\t/* 0x1029c */\n+#define FBNIC_CSR_END_TCE\t\t0x040B4\t/* CSR section delimiter */\n \n /* TCE RAM registers */\n #define FBNIC_CSR_START_TCE_RAM\t\t0x04200\t/* CSR section delimiter */\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c b/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c\nindex f9e879be254dac..65bea571c0cc1a 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c\n@@ -3,7 +3,6 @@\n \n #include \u003clinux/debugfs.h\u003e\n #include \u003clinux/pci.h\u003e\n-#include \u003clinux/rtnetlink.h\u003e\n #include \u003clinux/seq_file.h\u003e\n \n #include \"fbnic.h\"\n@@ -607,7 +606,6 @@ static int fbnic_dbg_pcie_stats_show(struct seq_file *s, void *v)\n {\n \tstruct fbnic_dev *fbd = s-\u003eprivate;\n \n-\trtnl_lock();\n \tfbnic_get_hw_stats(fbd);\n \n \tseq_printf(s, \"ob_rd_tlp: %llu\\n\", fbd-\u003ehw_stats.pcie.ob_rd_tlp.value);\n@@ -626,7 +624,6 @@ static int fbnic_dbg_pcie_stats_show(struct seq_file *s, void *v)\n \t\t fbd-\u003ehw_stats.pcie.ob_rd_no_cpl_cred.value);\n \tseq_printf(s, \"ob_rd_no_np_cred: %llu\\n\",\n \t\t fbd-\u003ehw_stats.pcie.ob_rd_no_np_cred.value);\n-\trtnl_unlock();\n \n \treturn 0;\n }\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c\nindex 0b653c4c20a72a..f63cf322451018 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c\n@@ -414,6 +414,11 @@ static int fbnic_fw_reporter_dump(struct devlink_health_reporter *reporter,\n \t\t\t\t \"Firmware core dump returned size 0\");\n \t\treturn -EIO;\n \t}\n+\tif (size \u003e FBNIC_FW_COREDUMP_MAX_SIZE) {\n+\t\tNL_SET_ERR_MSG_MOD(extack,\n+\t\t\t\t \"Firmware core dump size is too large\");\n+\t\treturn -EIO;\n+\t}\n \n \t/* Read the dump, we can only transfer TLV_MAX_DATA at a time */\n \tindex_count = DIV_ROUND_UP(size, TLV_MAX_DATA);\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c\nindex e774740fcb5d81..b300017b53d4a4 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c\n@@ -1867,12 +1867,14 @@ fbnic_get_pause_stats(struct net_device *netdev,\n \n \tmac_stats = \u0026fbd-\u003ehw_stats.mac;\n \n+\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n \tfbd-\u003emac-\u003eget_pause_stats(fbd, false, \u0026mac_stats-\u003epause);\n \n \tpause_stats-\u003etx_pause_frames = mac_stats-\u003epause.tx_pause_frames.value;\n \tpause_stats-\u003erx_pause_frames = mac_stats-\u003epause.rx_pause_frames.value;\n \ttx_ps_events = mac_stats-\u003epause.tx_pause_storm_events.value;\n \tpause_stats-\u003etx_pause_storm_events = tx_ps_events;\n+\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n }\n \n static void\n@@ -1928,6 +1930,7 @@ fbnic_get_eth_mac_stats(struct net_device *netdev,\n \tmac_stats = \u0026fbd-\u003ehw_stats.mac;\n \tmac = fbd-\u003emac;\n \n+\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n \tmac-\u003eget_eth_mac_stats(fbd, false, \u0026mac_stats-\u003eeth_mac);\n \n \tfbnic_set_counter(\u0026eth_mac_stats-\u003eFramesTransmittedOK,\n@@ -1956,6 +1959,7 @@ fbnic_get_eth_mac_stats(struct net_device *netdev,\n \t\t\t \u0026mac_stats-\u003eeth_mac.BroadcastFramesReceivedOK);\n \tfbnic_set_counter(\u0026eth_mac_stats-\u003eFrameTooLongErrors,\n \t\t\t \u0026mac_stats-\u003eeth_mac.FrameTooLongErrors);\n+\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n }\n \n static void\n@@ -1968,12 +1972,14 @@ fbnic_get_eth_ctrl_stats(struct net_device *netdev,\n \n \tmac_stats = \u0026fbd-\u003ehw_stats.mac;\n \n+\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n \tfbd-\u003emac-\u003eget_eth_ctrl_stats(fbd, false, \u0026mac_stats-\u003eeth_ctrl);\n \n \teth_ctrl_stats-\u003eMACControlFramesReceived =\n \t\tmac_stats-\u003eeth_ctrl.MACControlFramesReceived.value;\n \teth_ctrl_stats-\u003eMACControlFramesTransmitted =\n \t\tmac_stats-\u003eeth_ctrl.MACControlFramesTransmitted.value;\n+\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n }\n \n static const struct ethtool_rmon_hist_range fbnic_rmon_ranges[] = {\n@@ -2003,6 +2009,7 @@ fbnic_get_rmon_stats(struct net_device *netdev,\n \n \tmac_stats = \u0026fbd-\u003ehw_stats.mac;\n \n+\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n \tfbd-\u003emac-\u003eget_rmon_stats(fbd, false, \u0026mac_stats-\u003ermon);\n \n \trmon_stats-\u003eundersize_pkts =\n@@ -2018,6 +2025,7 @@ fbnic_get_rmon_stats(struct net_device *netdev,\n \t\trmon_stats-\u003ehist[i] = mac_stats-\u003ermon.hist[i].value;\n \t\trmon_stats-\u003ehist_tx[i] = mac_stats-\u003ermon.hist_tx[i].value;\n \t}\n+\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n \n \t*ranges = fbnic_rmon_ranges;\n }\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c\nindex e00d626f643847..96cfe0b4cd8dd7 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c\n@@ -382,7 +382,7 @@ static void fbnic_fw_release_cmpl_data(struct kref *kref)\n \n \tcmpl_data = container_of(kref, struct fbnic_fw_completion,\n \t\t\t\t ref_count);\n-\tkfree(cmpl_data);\n+\tkvfree(cmpl_data);\n }\n \n static struct fbnic_fw_completion *\n@@ -538,8 +538,8 @@ static bool fbnic_mbx_event(struct fbnic_dev *fbd)\n */\n int fbnic_fw_xmit_ownership_msg(struct fbnic_dev *fbd, bool take_ownership)\n {\n-\tunsigned long req_time = jiffies;\n \tstruct fbnic_tlv_msg *msg;\n+\tunsigned long req_time;\n \tint err = 0;\n \n \tif (!fbnic_fw_present(fbd))\n@@ -556,8 +556,10 @@ int fbnic_fw_xmit_ownership_msg(struct fbnic_dev *fbd, bool take_ownership)\n \t}\n \n \t/* Initialize heartbeat, set last response to 1 second in the past\n-\t * so that we will trigger a timeout if the firmware doesn't respond\n+\t * so that we will trigger a timeout if the firmware doesn't respond.\n+\t * Take the time after the allocation, as for the heartbeat request.\n \t */\n+\treq_time = jiffies;\n \tfbd-\u003elast_heartbeat_response = req_time - HZ;\n \tfbd-\u003elast_heartbeat_request = req_time;\n \n@@ -793,8 +795,8 @@ static int fbnic_fw_parse_heartbeat_resp(void *opaque,\n \n static int fbnic_fw_xmit_heartbeat_message(struct fbnic_dev *fbd)\n {\n-\tunsigned long req_time = jiffies;\n \tstruct fbnic_tlv_msg *msg;\n+\tunsigned long req_time;\n \tint err = 0;\n \n \tif (!fbnic_fw_present(fbd))\n@@ -804,6 +806,12 @@ static int fbnic_fw_xmit_heartbeat_message(struct fbnic_dev *fbd)\n \tif (!msg)\n \t\treturn -ENOMEM;\n \n+\t/* Stamp the request after the allocation, which can stall in\n+\t * reclaim, but before posting it, so the response can never be\n+\t * recorded as older than the request.\n+\t */\n+\treq_time = jiffies;\n+\n \terr = fbnic_mbx_map_tlv_msg(fbd, msg);\n \tif (err)\n \t\tgoto free_message;\n@@ -2100,7 +2108,8 @@ struct fbnic_fw_completion *__fbnic_fw_alloc_cmpl(u32 msg_type,\n {\n \tstruct fbnic_fw_completion *cmpl;\n \n-\tcmpl = kzalloc(sizeof(*cmpl) + priv_size, GFP_KERNEL);\n+\t/* Can be large, and the device never accesses it, so allow vmalloc */\n+\tcmpl = kvzalloc(sizeof(*cmpl) + priv_size, GFP_KERNEL);\n \tif (!cmpl)\n \t\treturn NULL;\n \ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h\nindex f47669129c9de8..52f69274889ea7 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h\n@@ -40,6 +40,11 @@ struct fbnic_fw_mbx {\n #define FBNIC_FW_MAX_LOG_HISTORY\t\t14\n #define FBNIC_MBX_RX_TO_SEC\t\t\t10\n \n+/* The FW keeps its core dump, header included, in a 256K region of its\n+ * QSPI flash, so no valid dump is larger than that.\n+ */\n+#define FBNIC_FW_COREDUMP_MAX_SIZE\tSZ_256K\n+\n struct fbnic_fw_ver {\n \tu32 version;\n \tchar commit[FBNIC_FW_CAP_RESP_COMMIT_MAX_SIZE];\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c\nindex 8b9b2076beecd4..966c2d0fb27aa0 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c\n@@ -1,8 +1,6 @@\n // SPDX-License-Identifier: GPL-2.0\n /* Copyright (c) Meta Platforms, Inc. and affiliates. */\n \n-#include \u003clinux/rtnetlink.h\u003e\n-\n #include \"fbnic.h\"\n \n static void fbnic_hw_stat_rst32(struct fbnic_dev *fbd, u32 reg,\n@@ -22,6 +20,10 @@ static void fbnic_hw_stat_rd32(struct fbnic_dev *fbd, u32 reg,\n \tu32 new_reg_value;\n \n \tnew_reg_value = rd32(fbd, reg);\n+\t/* A failed read disables CSR access and returns all ones */\n+\tif (!fbnic_present(fbd))\n+\t\treturn;\n+\n \tstat-\u003evalue += new_reg_value - stat-\u003eu.old_reg_value_32;\n \tstat-\u003eu.old_reg_value_32 = new_reg_value;\n }\n@@ -68,6 +70,10 @@ static void fbnic_hw_stat_rd64(struct fbnic_dev *fbd, u32 reg, s32 offset,\n \tu64 new_reg_value;\n \n \tnew_reg_value = fbnic_stat_rd64(fbd, reg, offset);\n+\t/* A failed read disables CSR access and returns all ones */\n+\tif (!fbnic_present(fbd))\n+\t\treturn;\n+\n \tstat-\u003evalue += new_reg_value - stat-\u003eu.old_reg_value_64;\n \tstat-\u003eu.old_reg_value_64 = new_reg_value;\n }\n@@ -541,9 +547,10 @@ static void fbnic_reset_hw_mac_stats(struct fbnic_dev *fbd,\n \tmac-\u003eget_rmon_stats(fbd, true, \u0026mac_stats-\u003ermon);\n }\n \n-void fbnic_reset_hw_stats(struct fbnic_dev *fbd)\n+void __fbnic_reset_hw_stats(struct fbnic_dev *fbd)\n {\n-\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n+\tlockdep_assert_held(\u0026fbd-\u003ehw_stats.lock);\n+\n \tfbnic_reset_phy_stats(fbd, \u0026fbd-\u003ehw_stats.phy);\n \tfbnic_reset_tmi_stats(fbd, \u0026fbd-\u003ehw_stats.tmi);\n \tfbnic_reset_tti_stats(fbd, \u0026fbd-\u003ehw_stats.tti);\n@@ -551,19 +558,16 @@ void fbnic_reset_hw_stats(struct fbnic_dev *fbd)\n \tfbnic_reset_rxb_stats(fbd, \u0026fbd-\u003ehw_stats.rxb);\n \tfbnic_reset_hw_rxq_stats(fbd, fbd-\u003ehw_stats.hw_q);\n \tfbnic_reset_pcie_stats_asic(fbd, \u0026fbd-\u003ehw_stats.pcie);\n-\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n-\n-\t/* Once registered, the only other access to MAC stats is via the\n-\t * ethtool API which is protected by the rtnl_lock. The call to\n-\t * fbnic_reset_hw_stats() during PCI recovery is also protected\n-\t * by the rtnl_lock hence, we don't need the spinlock to access\n-\t * the MAC stats.\n-\t */\n-\tif (fbd-\u003enetdev)\n-\t\tASSERT_RTNL();\n \tfbnic_reset_hw_mac_stats(fbd, \u0026fbd-\u003ehw_stats.mac);\n }\n \n+void fbnic_reset_hw_stats(struct fbnic_dev *fbd)\n+{\n+\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n+\t__fbnic_reset_hw_stats(fbd);\n+\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n+}\n+\n void fbnic_init_hw_stats(struct fbnic_dev *fbd)\n {\n \tspin_lock_init(\u0026fbd-\u003ehw_stats.lock);\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h\nindex caea4be46762af..5eb1e8b29ef9d6 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h\n@@ -154,6 +154,7 @@ struct fbnic_hw_stats {\n \n u64 fbnic_stat_rd64(struct fbnic_dev *fbd, u32 reg, u32 offset);\n \n+void __fbnic_reset_hw_stats(struct fbnic_dev *fbd);\n void fbnic_reset_hw_stats(struct fbnic_dev *fbd);\n void fbnic_init_hw_stats(struct fbnic_dev *fbd);\n void fbnic_get_hw_q_stats(struct fbnic_dev *fbd,\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c\nindex 16271c717a5aaa..2aacbf0a6af40f 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c\n@@ -405,6 +405,10 @@ static void __fbnic_mac_stat_rd64(struct fbnic_dev *fbd, bool reset, u32 reg,\n \tu64 new_reg_value;\n \n \tnew_reg_value = fbnic_stat_rd64(fbd, reg, 1);\n+\t/* A failed read disables CSR access and returns all ones */\n+\tif (!fbnic_present(fbd))\n+\t\treturn;\n+\n \tif (!reset)\n \t\tstat-\u003evalue += new_reg_value - stat-\u003eu.old_reg_value_64;\n \tstat-\u003eu.old_reg_value_64 = new_reg_value;\n@@ -417,6 +421,10 @@ static void fbnic_mac_stat_rd32(struct fbnic_dev *fbd, bool reset, u32 reg,\n \tu32 new_reg_value;\n \n \tnew_reg_value = rd32(fbd, reg);\n+\t/* A failed read disables CSR access and returns all ones */\n+\tif (!fbnic_present(fbd))\n+\t\treturn;\n+\n \tif (!reset)\n \t\tstat-\u003evalue += new_reg_value - stat-\u003eu.old_reg_value_32;\n \tstat-\u003eu.old_reg_value_32 = new_reg_value;\ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c\nindex 09ae797b1f0dc6..cb0191b6520496 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c\n@@ -350,13 +350,13 @@ static int fbnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t */\n \tfbnic_fw_log_enable(fbd, true);\n \n+\t/* Capture snapshot of hardware stats so netdev can calculate delta */\n+\tfbnic_init_hw_stats(fbd);\n+\n \tfbnic_devlink_register(fbd);\n \tfbnic_devlink_otp_check(fbd, \"error detected during probe\");\n \tfbnic_dbg_fbd_init(fbd);\n \n-\t/* Capture snapshot of hardware stats so netdev can calculate delta */\n-\tfbnic_init_hw_stats(fbd);\n-\n \tfbnic_hwmon_register(fbd);\n \n \tif (!fbd-\u003edsn) {\n@@ -498,10 +498,16 @@ static int __fbnic_pm_resume(struct device *dev)\n \tstruct fbnic_net *fbn;\n \tint err;\n \n-\t/* Restore MMIO access */\n+\t/* Restore MMIO access and rebase the HW stats in one step, so that\n+\t * no stats read can take its delta from counters the reset cleared\n+\t * against the values read before it.\n+\t */\n \tiomap_table = pcim_iomap_table(to_pci_dev(dev));\n+\tspin_lock(\u0026fbd-\u003ehw_stats.lock);\n \tfbd-\u003euc_addr0 = iomap_table[0];\n \tfbd-\u003euc_addr4 = iomap_table[4];\n+\t__fbnic_reset_hw_stats(fbd);\n+\tspin_unlock(\u0026fbd-\u003ehw_stats.lock);\n \n \t/* Rerequest the IRQs */\n \terr = fbnic_alloc_irqs(fbd);\n@@ -582,8 +588,6 @@ static void __fbnic_pm_attach(struct device *dev)\n \trtnl_lock();\n \tnetdev_lock(netdev);\n \n-\tfbnic_reset_hw_stats(fbd);\n-\n \tif (netif_running(netdev))\n \t\tfbnic_up(fbn);\n \ndiff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c\nindex 07d4b2e923627b..c75c5683b724e8 100644\n--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c\n+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c\n@@ -2398,38 +2398,85 @@ static void fbnic_idle_dump(struct fbnic_dev *fbd,\n \t\t\t\t fbnic_rd32(fbd, regs[i].reg_base + j));\n }\n \n-int fbnic_wait_all_queues_idle(struct fbnic_dev *fbd, bool may_fail)\n+/* The poll timeout only accounts for the delay between polls, not for\n+ * the time spent in the poll itself, and each poll is a series of\n+ * non-posted PCIe register reads that take on the order of a\n+ * microsecond each. Space the polls out so that the reads stay a small\n+ * part of each interval and the timeout stays close to wall time.\n+ */\n+#define FBNIC_IDLE_POLL_US\t20\n+#define FBNIC_IDLE_TIMEOUT_US\t500000\n+\n+static bool fbnic_tx_idle(struct fbnic_dev *fbd,\n+\t\t\t const struct fbnic_idle_regs *regs,\n+\t\t\t unsigned int nregs)\n+{\n+\tu32 inflight;\n+\n+\tif (!fbnic_all_idle(fbd, regs, nregs))\n+\t\treturn false;\n+\n+\t/* The QM idle bits do not cover the TMI completion path, so a\n+\t * timestamp request can still be waiting on its completion. The\n+\t * count is bounded by the timestamp requests the Tx path can hold,\n+\t * so all ones is a failed read, as for the idle bits, not a count.\n+\t */\n+\tinflight = fbnic_rd32(fbd, FBNIC_TCE_PTP_INFLIGHT);\n+\n+\treturn !inflight || !~inflight;\n+}\n+\n+static int fbnic_wait_tx_idle(struct fbnic_dev *fbd)\n {\n \tstatic const struct fbnic_idle_regs tx[] = {\n \t\t{ FBNIC_QM_TWQ_IDLE(0),\tFBNIC_QM_TWQ_IDLE_CNT, },\n \t\t{ FBNIC_QM_TQS_IDLE(0),\tFBNIC_QM_TQS_IDLE_CNT, },\n \t\t{ FBNIC_QM_TDE_IDLE(0),\tFBNIC_QM_TDE_IDLE_CNT, },\n \t\t{ FBNIC_QM_TCQ_IDLE(0),\tFBNIC_QM_TCQ_IDLE_CNT, },\n-\t}, rx[] = {\n-\t\t{ FBNIC_QM_HPQ_IDLE(0),\tFBNIC_QM_HPQ_IDLE_CNT, },\n-\t\t{ FBNIC_QM_PPQ_IDLE(0),\tFBNIC_QM_PPQ_IDLE_CNT, },\n-\t\t{ FBNIC_QM_RCQ_IDLE(0),\tFBNIC_QM_RCQ_IDLE_CNT, },\n \t};\n \tbool idle;\n \tint err;\n \n-\terr = read_poll_timeout_atomic(fbnic_all_idle, idle, idle, 2, 500000,\n-\t\t\t\t false, fbd, tx, ARRAY_SIZE(tx));\n+\terr = read_poll_timeout_atomic(fbnic_tx_idle, idle, idle,\n+\t\t\t\t FBNIC_IDLE_POLL_US,\n+\t\t\t\t FBNIC_IDLE_TIMEOUT_US, false,\n+\t\t\t\t fbd, tx, ARRAY_SIZE(tx));\n \tif (err == -ETIMEDOUT) {\n \t\tfbnic_tx_flush(fbd);\n-\t\terr = read_poll_timeout_atomic(fbnic_all_idle, idle, idle,\n-\t\t\t\t\t 2, 500000, false,\n+\t\terr = read_poll_timeout_atomic(fbnic_tx_idle, idle, idle,\n+\t\t\t\t\t FBNIC_IDLE_POLL_US,\n+\t\t\t\t\t FBNIC_IDLE_TIMEOUT_US, false,\n \t\t\t\t\t fbd, tx, ARRAY_SIZE(tx));\n \t\tfbnic_tx_flush_off(fbd);\n \t}\n \tif (err) {\n \t\tfbnic_idle_dump(fbd, tx, ARRAY_SIZE(tx), \"Tx\", err);\n-\t\tif (may_fail)\n-\t\t\treturn err;\n+\t\tnetdev_err(fbd-\u003enetdev, \"0x%04x: %08x\\n\",\n+\t\t\t FBNIC_TCE_PTP_INFLIGHT,\n+\t\t\t fbnic_rd32(fbd, FBNIC_TCE_PTP_INFLIGHT));\n \t}\n \n-\terr = read_poll_timeout_atomic(fbnic_all_idle, idle, idle, 2, 500000,\n-\t\t\t\t false, fbd, rx, ARRAY_SIZE(rx));\n+\treturn err;\n+}\n+\n+int fbnic_wait_all_queues_idle(struct fbnic_dev *fbd, bool may_fail)\n+{\n+\tstatic const struct fbnic_idle_regs rx[] = {\n+\t\t{ FBNIC_QM_HPQ_IDLE(0),\tFBNIC_QM_HPQ_IDLE_CNT, },\n+\t\t{ FBNIC_QM_PPQ_IDLE(0),\tFBNIC_QM_PPQ_IDLE_CNT, },\n+\t\t{ FBNIC_QM_RCQ_IDLE(0),\tFBNIC_QM_RCQ_IDLE_CNT, },\n+\t};\n+\tbool idle;\n+\tint err;\n+\n+\terr = fbnic_wait_tx_idle(fbd);\n+\tif (err \u0026\u0026 may_fail)\n+\t\treturn err;\n+\n+\terr = read_poll_timeout_atomic(fbnic_all_idle, idle, idle,\n+\t\t\t\t FBNIC_IDLE_POLL_US,\n+\t\t\t\t FBNIC_IDLE_TIMEOUT_US, false,\n+\t\t\t\t fbd, rx, ARRAY_SIZE(rx));\n \tif (err)\n \t\tfbnic_idle_dump(fbd, rx, ARRAY_SIZE(rx), \"Rx\", err);\n \treturn err;\n"
} |
| 2/1 | 2026/11/18 05:20 | agent | patch-evaluator |
12mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch series exclusively modifies the Meta Platforms Host Network Interface (fbnic) driver under drivers/net/ethernet/meta/fbnic/. This driver requires vendor-specific physical ASIC/PCIe hardware that is not emulated in standard QEMU/KVM virtualized fuzzing environments. Consequently, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 3dae7fb0a4b60c5e8ab546ed0383c790984d310c
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Nov 18 05:20:47 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_csr.h b/drivers/net/ethernet/meta/fbnic/fbnic_csr.h
index c371ac9f78c182..dc234f4d24f663 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_csr.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_csr.h
@@ -422,7 +422,8 @@ enum {
#define FBNIC_TCE_TXB_NTWRK_DWRR_CTRL_EXT \
0x0404E /* 0x10138 */
#define FBNIC_TCE_TXB_BMC_DWRR_CTRL_EXT 0x0404F /* 0x1013c */
-#define FBNIC_CSR_END_TCE 0x04050 /* CSR section delimiter */
+#define FBNIC_TCE_PTP_INFLIGHT 0x040A7 /* 0x1029c */
+#define FBNIC_CSR_END_TCE 0x040B4 /* CSR section delimiter */
/* TCE RAM registers */
#define FBNIC_CSR_START_TCE_RAM 0x04200 /* CSR section delimiter */
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c b/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c
index f9e879be254dac..65bea571c0cc1a 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c
@@ -3,7 +3,6 @@
#include <linux/debugfs.h>
#include <linux/pci.h>
-#include <linux/rtnetlink.h>
#include <linux/seq_file.h>
#include "fbnic.h"
@@ -607,7 +606,6 @@ static int fbnic_dbg_pcie_stats_show(struct seq_file *s, void *v)
{
struct fbnic_dev *fbd = s->private;
- rtnl_lock();
fbnic_get_hw_stats(fbd);
seq_printf(s, "ob_rd_tlp: %llu\n", fbd->hw_stats.pcie.ob_rd_tlp.value);
@@ -626,7 +624,6 @@ static int fbnic_dbg_pcie_stats_show(struct seq_file *s, void *v)
fbd->hw_stats.pcie.ob_rd_no_cpl_cred.value);
seq_printf(s, "ob_rd_no_np_cred: %llu\n",
fbd->hw_stats.pcie.ob_rd_no_np_cred.value);
- rtnl_unlock();
return 0;
}
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
index 0b653c4c20a72a..f63cf322451018 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
@@ -414,6 +414,11 @@ static int fbnic_fw_reporter_dump(struct devlink_health_reporter *reporter,
"Firmware core dump returned size 0");
return -EIO;
}
+ if (size > FBNIC_FW_COREDUMP_MAX_SIZE) {
+ NL_SET_ERR_MSG_MOD(extack,
+ "Firmware core dump size is too large");
+ return -EIO;
+ }
/* Read the dump, we can only transfer TLV_MAX_DATA at a time */
index_count = DIV_ROUND_UP(size, TLV_MAX_DATA);
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
index e774740fcb5d81..b300017b53d4a4 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
@@ -1867,12 +1867,14 @@ fbnic_get_pause_stats(struct net_device *netdev,
mac_stats = &fbd->hw_stats.mac;
+ spin_lock(&fbd->hw_stats.lock);
fbd->mac->get_pause_stats(fbd, false, &mac_stats->pause);
pause_stats->tx_pause_frames = mac_stats->pause.tx_pause_frames.value;
pause_stats->rx_pause_frames = mac_stats->pause.rx_pause_frames.value;
tx_ps_events = mac_stats->pause.tx_pause_storm_events.value;
pause_stats->tx_pause_storm_events = tx_ps_events;
+ spin_unlock(&fbd->hw_stats.lock);
}
static void
@@ -1928,6 +1930,7 @@ fbnic_get_eth_mac_stats(struct net_device *netdev,
mac_stats = &fbd->hw_stats.mac;
mac = fbd->mac;
+ spin_lock(&fbd->hw_stats.lock);
mac->get_eth_mac_stats(fbd, false, &mac_stats->eth_mac);
fbnic_set_counter(ð_mac_stats->FramesTransmittedOK,
@@ -1956,6 +1959,7 @@ fbnic_get_eth_mac_stats(struct net_device *netdev,
&mac_stats->eth_mac.BroadcastFramesReceivedOK);
fbnic_set_counter(ð_mac_stats->FrameTooLongErrors,
&mac_stats->eth_mac.FrameTooLongErrors);
+ spin_unlock(&fbd->hw_stats.lock);
}
static void
@@ -1968,12 +1972,14 @@ fbnic_get_eth_ctrl_stats(struct net_device *netdev,
mac_stats = &fbd->hw_stats.mac;
+ spin_lock(&fbd->hw_stats.lock);
fbd->mac->get_eth_ctrl_stats(fbd, false, &mac_stats->eth_ctrl);
eth_ctrl_stats->MACControlFramesReceived =
mac_stats->eth_ctrl.MACControlFramesReceived.value;
eth_ctrl_stats->MACControlFramesTransmitted =
mac_stats->eth_ctrl.MACControlFramesTransmitted.value;
+ spin_unlock(&fbd->hw_stats.lock);
}
static const struct ethtool_rmon_hist_range fbnic_rmon_ranges[] = {
@@ -2003,6 +2009,7 @@ fbnic_get_rmon_stats(struct net_device *netdev,
mac_stats = &fbd->hw_stats.mac;
+ spin_lock(&fbd->hw_stats.lock);
fbd->mac->get_rmon_stats(fbd, false, &mac_stats->rmon);
rmon_stats->undersize_pkts =
@@ -2018,6 +2025,7 @@ fbnic_get_rmon_stats(struct net_device *netdev,
rmon_stats->hist[i] = mac_stats->rmon.hist[i].value;
rmon_stats->hist_tx[i] = mac_stats->rmon.hist_tx[i].value;
}
+ spin_unlock(&fbd->hw_stats.lock);
*ranges = fbnic_rmon_ranges;
}
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
index e00d626f643847..96cfe0b4cd8dd7 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
@@ -382,7 +382,7 @@ static void fbnic_fw_release_cmpl_data(struct kref *kref)
cmpl_data = container_of(kref, struct fbnic_fw_completion,
ref_count);
- kfree(cmpl_data);
+ kvfree(cmpl_data);
}
static struct fbnic_fw_completion *
@@ -538,8 +538,8 @@ static bool fbnic_mbx_event(struct fbnic_dev *fbd)
*/
int fbnic_fw_xmit_ownership_msg(struct fbnic_dev *fbd, bool take_ownership)
{
- unsigned long req_time = jiffies;
struct fbnic_tlv_msg *msg;
+ unsigned long req_time;
int err = 0;
if (!fbnic_fw_present(fbd))
@@ -556,8 +556,10 @@ int fbnic_fw_xmit_ownership_msg(struct fbnic_dev *fbd, bool take_ownership)
}
/* Initialize heartbeat, set last response to 1 second in the past
- * so that we will trigger a timeout if the firmware doesn't respond
+ * so that we will trigger a timeout if the firmware doesn't respond.
+ * Take the time after the allocation, as for the heartbeat request.
*/
+ req_time = jiffies;
fbd->last_heartbeat_response = req_time - HZ;
fbd->last_heartbeat_request = req_time;
@@ -793,8 +795,8 @@ static int fbnic_fw_parse_heartbeat_resp(void *opaque,
static int fbnic_fw_xmit_heartbeat_message(struct fbnic_dev *fbd)
{
- unsigned long req_time = jiffies;
struct fbnic_tlv_msg *msg;
+ unsigned long req_time;
int err = 0;
if (!fbnic_fw_present(fbd))
@@ -804,6 +806,12 @@ static int fbnic_fw_xmit_heartbeat_message(struct fbnic_dev *fbd)
if (!msg)
return -ENOMEM;
+ /* Stamp the request after the allocation, which can stall in
+ * reclaim, but before posting it, so the response can never be
+ * recorded as older than the request.
+ */
+ req_time = jiffies;
+
err = fbnic_mbx_map_tlv_msg(fbd, msg);
if (err)
goto free_message;
@@ -2100,7 +2108,8 @@ struct fbnic_fw_completion *__fbnic_fw_alloc_cmpl(u32 msg_type,
{
struct fbnic_fw_completion *cmpl;
- cmpl = kzalloc(sizeof(*cmpl) + priv_size, GFP_KERNEL);
+ /* Can be large, and the device never accesses it, so allow vmalloc */
+ cmpl = kvzalloc(sizeof(*cmpl) + priv_size, GFP_KERNEL);
if (!cmpl)
return NULL;
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
index f47669129c9de8..52f69274889ea7 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.h
@@ -40,6 +40,11 @@ struct fbnic_fw_mbx {
#define FBNIC_FW_MAX_LOG_HISTORY 14
#define FBNIC_MBX_RX_TO_SEC 10
+/* The FW keeps its core dump, header included, in a 256K region of its
+ * QSPI flash, so no valid dump is larger than that.
+ */
+#define FBNIC_FW_COREDUMP_MAX_SIZE SZ_256K
+
struct fbnic_fw_ver {
u32 version;
char commit[FBNIC_FW_CAP_RESP_COMMIT_MAX_SIZE];
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c
index 8b9b2076beecd4..966c2d0fb27aa0 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) Meta Platforms, Inc. and affiliates. */
-#include <linux/rtnetlink.h>
-
#include "fbnic.h"
static void fbnic_hw_stat_rst32(struct fbnic_dev *fbd, u32 reg,
@@ -22,6 +20,10 @@ static void fbnic_hw_stat_rd32(struct fbnic_dev *fbd, u32 reg,
u32 new_reg_value;
new_reg_value = rd32(fbd, reg);
+ /* A failed read disables CSR access and returns all ones */
+ if (!fbnic_present(fbd))
+ return;
+
stat->value += new_reg_value - stat->u.old_reg_value_32;
stat->u.old_reg_value_32 = new_reg_value;
}
@@ -68,6 +70,10 @@ static void fbnic_hw_stat_rd64(struct fbnic_dev *fbd, u32 reg, s32 offset,
u64 new_reg_value;
new_reg_value = fbnic_stat_rd64(fbd, reg, offset);
+ /* A failed read disables CSR access and returns all ones */
+ if (!fbnic_present(fbd))
+ return;
+
stat->value += new_reg_value - stat->u.old_reg_value_64;
stat->u.old_reg_value_64 = new_reg_value;
}
@@ -541,9 +547,10 @@ static void fbnic_reset_hw_mac_stats(struct fbnic_dev *fbd,
mac->get_rmon_stats(fbd, true, &mac_stats->rmon);
}
-void fbnic_reset_hw_stats(struct fbnic_dev *fbd)
+void __fbnic_reset_hw_stats(struct fbnic_dev *fbd)
{
- spin_lock(&fbd->hw_stats.lock);
+ lockdep_assert_held(&fbd->hw_stats.lock);
+
fbnic_reset_phy_stats(fbd, &fbd->hw_stats.phy);
fbnic_reset_tmi_stats(fbd, &fbd->hw_stats.tmi);
fbnic_reset_tti_stats(fbd, &fbd->hw_stats.tti);
@@ -551,19 +558,16 @@ void fbnic_reset_hw_stats(struct fbnic_dev *fbd)
fbnic_reset_rxb_stats(fbd, &fbd->hw_stats.rxb);
fbnic_reset_hw_rxq_stats(fbd, fbd->hw_stats.hw_q);
fbnic_reset_pcie_stats_asic(fbd, &fbd->hw_stats.pcie);
- spin_unlock(&fbd->hw_stats.lock);
-
- /* Once registered, the only other access to MAC stats is via the
- * ethtool API which is protected by the rtnl_lock. The call to
- * fbnic_reset_hw_stats() during PCI recovery is also protected
- * by the rtnl_lock hence, we don't need the spinlock to access
- * the MAC stats.
- */
- if (fbd->netdev)
- ASSERT_RTNL();
fbnic_reset_hw_mac_stats(fbd, &fbd->hw_stats.mac);
}
+void fbnic_reset_hw_stats(struct fbnic_dev *fbd)
+{
+ spin_lock(&fbd->hw_stats.lock);
+ __fbnic_reset_hw_stats(fbd);
+ spin_unlock(&fbd->hw_stats.lock);
+}
+
void fbnic_init_hw_stats(struct fbnic_dev *fbd)
{
spin_lock_init(&fbd->hw_stats.lock);
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h
index caea4be46762af..5eb1e8b29ef9d6 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h
@@ -154,6 +154,7 @@ struct fbnic_hw_stats {
u64 fbnic_stat_rd64(struct fbnic_dev *fbd, u32 reg, u32 offset);
+void __fbnic_reset_hw_stats(struct fbnic_dev *fbd);
void fbnic_reset_hw_stats(struct fbnic_dev *fbd);
void fbnic_init_hw_stats(struct fbnic_dev *fbd);
void fbnic_get_hw_q_stats(struct fbnic_dev *fbd,
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
index 16271c717a5aaa..2aacbf0a6af40f 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_mac.c
@@ -405,6 +405,10 @@ static void __fbnic_mac_stat_rd64(struct fbnic_dev *fbd, bool reset, u32 reg,
u64 new_reg_value;
new_reg_value = fbnic_stat_rd64(fbd, reg, 1);
+ /* A failed read disables CSR access and returns all ones */
+ if (!fbnic_present(fbd))
+ return;
+
if (!reset)
stat->value += new_reg_value - stat->u.old_reg_value_64;
stat->u.old_reg_value_64 = new_reg_value;
@@ -417,6 +421,10 @@ static void fbnic_mac_stat_rd32(struct fbnic_dev *fbd, bool reset, u32 reg,
u32 new_reg_value;
new_reg_value = rd32(fbd, reg);
+ /* A failed read disables CSR access and returns all ones */
+ if (!fbnic_present(fbd))
+ return;
+
if (!reset)
stat->value += new_reg_value - stat->u.old_reg_value_32;
stat->u.old_reg_value_32 = new_reg_value;
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
index 09ae797b1f0dc6..cb0191b6520496 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
@@ -350,13 +350,13 @@ static int fbnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
fbnic_fw_log_enable(fbd, true);
+ /* Capture snapshot of hardware stats so netdev can calculate delta */
+ fbnic_init_hw_stats(fbd);
+
fbnic_devlink_register(fbd);
fbnic_devlink_otp_check(fbd, "error detected during probe");
fbnic_dbg_fbd_init(fbd);
- /* Capture snapshot of hardware stats so netdev can calculate delta */
- fbnic_init_hw_stats(fbd);
-
fbnic_hwmon_register(fbd);
if (!fbd->dsn) {
@@ -498,10 +498,16 @@ static int __fbnic_pm_resume(struct device *dev)
struct fbnic_net *fbn;
int err;
- /* Restore MMIO access */
+ /* Restore MMIO access and rebase the HW stats in one step, so that
+ * no stats read can take its delta from counters the reset cleared
+ * against the values read before it.
+ */
iomap_table = pcim_iomap_table(to_pci_dev(dev));
+ spin_lock(&fbd->hw_stats.lock);
fbd->uc_addr0 = iomap_table[0];
fbd->uc_addr4 = iomap_table[4];
+ __fbnic_reset_hw_stats(fbd);
+ spin_unlock(&fbd->hw_stats.lock);
/* Rerequest the IRQs */
err = fbnic_alloc_irqs(fbd);
@@ -582,8 +588,6 @@ static void __fbnic_pm_attach(struct device *dev)
rtnl_lock();
netdev_lock(netdev);
- fbnic_reset_hw_stats(fbd);
-
if (netif_running(netdev))
fbnic_up(fbn);
diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
index 07d4b2e923627b..c75c5683b724e8 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
@@ -2398,38 +2398,85 @@ static void fbnic_idle_dump(struct fbnic_dev *fbd,
fbnic_rd32(fbd, regs[i].reg_base + j));
}
-int fbnic_wait_all_queues_idle(struct fbnic_dev *fbd, bool may_fail)
+/* The poll timeout only accounts for the delay between polls, not for
+ * the time spent in the poll itself, and each poll is a series of
+ * non-posted PCIe register reads that take on the order of a
+ * microsecond each. Space the polls out so that the reads stay a small
+ * part of each interval and the timeout stays close to wall time.
+ */
+#define FBNIC_IDLE_POLL_US 20
+#define FBNIC_IDLE_TIMEOUT_US 500000
+
+static bool fbnic_tx_idle(struct fbnic_dev *fbd,
+ const struct fbnic_idle_regs *regs,
+ unsigned int nregs)
+{
+ u32 inflight;
+
+ if (!fbnic_all_idle(fbd, regs, nregs))
+ return false;
+
+ /* The QM idle bits do not cover the TMI completion path, so a
+ * timestamp request can still be waiting on its completion. The
+ * count is bounded by the timestamp requests the Tx path can hold,
+ * so all ones is a failed read, as for the idle bits, not a count.
+ */
+ inflight = fbnic_rd32(fbd, FBNIC_TCE_PTP_INFLIGHT);
+
+ return !inflight || !~inflight;
+}
+
+static int fbnic_wait_tx_idle(struct fbnic_dev *fbd)
{
static const struct fbnic_idle_regs tx[] = {
{ FBNIC_QM_TWQ_IDLE(0), FBNIC_QM_TWQ_IDLE_CNT, },
{ FBNIC_QM_TQS_IDLE(0), FBNIC_QM_TQS_IDLE_CNT, },
{ FBNIC_QM_TDE_IDLE(0), FBNIC_QM_TDE_IDLE_CNT, },
{ FBNIC_QM_TCQ_IDLE(0), FBNIC_QM_TCQ_IDLE_CNT, },
- }, rx[] = {
- { FBNIC_QM_HPQ_IDLE(0), FBNIC_QM_HPQ_IDLE_CNT, },
- { FBNIC_QM_PPQ_IDLE(0), FBNIC_QM_PPQ_IDLE_CNT, },
- { FBNIC_QM_RCQ_IDLE(0), FBNIC_QM_RCQ_IDLE_CNT, },
};
bool idle;
int err;
- err = read_poll_timeout_atomic(fbnic_all_idle, idle, idle, 2, 500000,
- false, fbd, tx, ARRAY_SIZE(tx));
+ err = read_poll_timeout_atomic(fbnic_tx_idle, idle, idle,
+ FBNIC_IDLE_POLL_US,
+ FBNIC_IDLE_TIMEOUT_US, false,
+ fbd, tx, ARRAY_SIZE(tx));
if (err == -ETIMEDOUT) {
fbnic_tx_flush(fbd);
- err = read_poll_timeout_atomic(fbnic_all_idle, idle, idle,
- 2, 500000, false,
+ err = read_poll_timeout_atomic(fbnic_tx_idle, idle, idle,
+ FBNIC_IDLE_POLL_US,
+ FBNIC_IDLE_TIMEOUT_US, false,
fbd, tx, ARRAY_SIZE(tx));
fbnic_tx_flush_off(fbd);
}
if (err) {
fbnic_idle_dump(fbd, tx, ARRAY_SIZE(tx), "Tx", err);
- if (may_fail)
- return err;
+ netdev_err(fbd->netdev, "0x%04x: %08x\n",
+ FBNIC_TCE_PTP_INFLIGHT,
+ fbnic_rd32(fbd, FBNIC_TCE_PTP_INFLIGHT));
}
- err = read_poll_timeout_atomic(fbnic_all_idle, idle, idle, 2, 500000,
- false, fbd, rx, ARRAY_SIZE(rx));
+ return err;
+}
+
+int fbnic_wait_all_queues_idle(struct fbnic_dev *fbd, bool may_fail)
+{
+ static const struct fbnic_idle_regs rx[] = {
+ { FBNIC_QM_HPQ_IDLE(0), FBNIC_QM_HPQ_IDLE_CNT, },
+ { FBNIC_QM_PPQ_IDLE(0), FBNIC_QM_PPQ_IDLE_CNT, },
+ { FBNIC_QM_RCQ_IDLE(0), FBNIC_QM_RCQ_IDLE_CNT, },
+ };
+ bool idle;
+ int err;
+
+ err = fbnic_wait_tx_idle(fbd);
+ if (err && may_fail)
+ return err;
+
+ err = read_poll_timeout_atomic(fbnic_all_idle, idle, idle,
+ FBNIC_IDLE_POLL_US,
+ FBNIC_IDLE_TIMEOUT_US, false,
+ fbd, rx, ARRAY_SIZE(rx));
if (err)
fbnic_idle_dump(fbd, rx, ARRAY_SIZE(rx), "Rx", err);
return err;
|
| 3/2 | 2026/11/18 05:20 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10481 output: 18 thoughts: 82 Thoughts: **Analyzing a Network Driver Patch** Okay, so this patch is touching the `drivers/net/ethernet/meta/fbnic/` directory. Right, `fbnic`. Need to figure out what that is in this context. Let's see... Is this a hardware driver, or is it some kind of emulated or virtual network interface? Ah, right. It's Meta's `fbnic` driver. And it's for Meta's own ASIC Host Network Interface, their custom NIC. Specifically, that ASIC developed in-house by Meta. So, it's definitely hardware-related. Now, to get a better understanding of how this code fits into the larger picture, I should check the Kconfig files for anything related to `FBNIC`. That should give some context regarding configuration options and dependencies. That's the next step. |
| 4/2 | 2026/11/18 05:21 | tool | grepper |
0mArgs:{
"Expression": "config FBNIC"
}Results: {
"Output": "drivers/net/ethernet/meta/Kconfig=18=if NET_VENDOR_META\ndrivers/net/ethernet/meta/Kconfig-19-\ndrivers/net/ethernet/meta/Kconfig:20:config FBNIC\ndrivers/net/ethernet/meta/Kconfig-21-\ttristate \"Meta Platforms Host Network Interface\"\n"
} |
| 5/2 | 2026/11/18 05:21 | llm | patch-evaluator |
1mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10858 output: 37 thoughts: 17 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience, presented in the first person: **Diving into `drivers/net/ethernet/meta/Kconfig`** Alright, let's get down to brass tacks. I need to take a look at the `drivers/net/ethernet/meta/Kconfig` file. I'm expecting this to be the central configuration file for a *meta* driver, which suggests it likely handles the overarching options and dependencies related to a family or architecture of Ethernet drivers. My initial hunch is that it won't contain the nitty-gritty details of individual PHY or MAC registers, but rather the high-level framework: the `CONFIG_` symbols that enable or disable a particular Ethernet family, maybe define common features like VLAN support, or manage dependencies on underlying hardware abstraction layers (HALs). I'll be looking for the typical Kconfig constructs: `config` blocks defining configuration options, `menuconfig` blocks to group related options logically, `depends on` statements to understand conditional dependencies on hardware or other software components, and `select` statements that automatically enable dependent options. I'll also be scanning for `default` values that help set reasonable defaults. My first questions will be: * What are the top-level configuration symbols? Are they very broad or focused? * What does the dependency structure look like? What other modules or drivers does this meta-driver rely upon? * How are different Ethernet controllers or device families distinguished? Are there separate configuration sections for each, or is it done more abstractly? * Are there any interesting defaults or 'tricks' in the configuration that I should be aware of? Essentially, I'm trying to quickly establish the *scope* and *structure* of this Ethernet meta-driver configuration and how it interacts with the rest of the network stack. I'm looking for clues about how to extend or customize it and the design principles at play. |
| 6/2 | 2026/11/18 05:23 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/meta/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# Meta Platforms network device configuration\n 4:\t#\n 5:\t\n 6:\tconfig NET_VENDOR_META\n 7:\t\tbool \"Meta Platforms devices\"\n 8:\t\tdefault y\n 9:\t\thelp\n 10:\t\t If you have a network (Ethernet) card designed by Meta, say Y.\n 11:\t\t That's Meta as in the parent company of Facebook.\n 12:\t\n 13:\t\t Note that the answer to this question doesn't directly affect the\n 14:\t\t kernel: saying N will just cause the configurator to skip all\n 15:\t\t the questions about Meta cards. If you say Y, you will be asked for\n 16:\t\t your specific card in the following questions.\n 17:\t\n 18:\tif NET_VENDOR_META\n 19:\t\n 20:\tconfig FBNIC\n 21:\t\ttristate \"Meta Platforms Host Network Interface\"\n 22:\t\tdepends on 64BIT || COMPILE_TEST\n 23:\t\tdepends on !S390\n 24:\t\tdepends on MAX_SKB_FRAGS \u003c 22\n 25:\t\tdepends on PCI_MSI\n 26:\t\tdepends on PTP_1588_CLOCK_OPTIONAL\n 27:\t\tselect NET_DEVLINK\n 28:\t\tselect PAGE_POOL\n 29:\t\tselect PCS_XPCS\n 30:\t\tselect PHYLINK\n 31:\t\tselect PLDMFW\n 32:\t\thelp\n 33:\t\t This driver supports Meta Platforms Host Network Interface.\n 34:\t\n 35:\t\t To compile this driver as a module, choose M here. The module\n 36:\t\t will be called fbnic. MSI-X interrupt support is required.\n 37:\t\n 38:\tconfig MPNIC\n 39:\t\ttristate \"Meta Platforms Network Interface Controller\"\n 40:\t\tdepends on 64BIT || COMPILE_TEST\n"
} |
| 7/2 | 2026/11/18 05:23 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11858 output: 36 thoughts: 116 Thoughts: **Analyzing the Structural Unreachability of Hardware in the Context of `fbnic`** Okay, let's dive into this. The instructions are flagging "structurally unreachable hardware," and the examples they give – vendor-specific PCIe switches, SmartNICs, and GPU drivers like `mlxsw`, `pds_core`, `qed`, `ionic`, and `amdgpu` – immediately make me think about the constraints. They're specifically pointing to components that rely on physical ASIC/PCIe cards that aren't emulated in the usual QEMU environment. Now, `fbnic` just popped into my head. I know that's a PCI driver. More specifically, it's the driver for Meta's custom networking ASIC. The critical question, the one I *have* to answer, is whether `fbnic` is strictly tied to a physical PCIe device. Is its functionality purely dependent on the actual presence of that physical hardware, or are there layers of abstraction that might allow some degree of emulation or simulation? Time to dig into `fbnic_pci.c`. The code itself holds the key. I need to understand what it's actually doing and where those hardware dependencies are hardwired. If it's a direct interface to physical registers and the like, we're probably looking at a "structurally unreachable" situation. But if it presents an abstracted layer, my assessment might need to be different. |
| 8/2 | 2026/11/18 05:23 | tool | grepper |
0mArgs:{
"Expression": "pci_register_driver",
"PathPrefixes": [
"drivers/net/ethernet/meta/"
]
}Results: {
"Output": "drivers/net/ethernet/meta/fbnic/fbnic_pci.c=681=static int __init fbnic_init_module(void)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-686-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:687:\terr = pci_register_driver(\u0026fbnic_driver);\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-688-\tif (err) {\n"
} |
| 9/2 | 2026/11/18 05:23 | llm | patch-evaluator |
4mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12458 output: 34 thoughts: 23 Thoughts: Here's a summary of my thought process: **Diving into the fbnic_pci Module** Okay, time to get to the heart of this. My initial instinct is to go directly to the source. Let's see... I think the relevant PCI initialization and configuration is handled in `fbnic_pci.c`. The first place to check within that file would be the `fbnic_pci_tbl` data structure. That's usually where you'll find the device ID table, which will map PCI device identifiers to the appropriate driver implementations. This is the logical starting point for understanding how the driver identifies and handles the specific hardware it supports. Let's see what that table tells us. |
| 10/2 | 2026/11/18 05:28 | tool | grepper |
0mArgs:{
"Expression": "fbnic_driver",
"PathPrefixes": [
"drivers/net/ethernet/meta/"
]
}Results: {
"Output": "drivers/net/ethernet/meta/fbnic/fbnic.h=172=static inline bool fbnic_init_failure(struct fbnic_dev *fbd)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-176-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:177:extern char fbnic_driver_name[];\ndrivers/net/ethernet/meta/fbnic/fbnic.h-178-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_debugfs.c=667=void fbnic_dbg_init(void)\ndrivers/net/ethernet/meta/fbnic/fbnic_debugfs.c-668-{\ndrivers/net/ethernet/meta/fbnic/fbnic_debugfs.c:669:\tfbnic_dbg_root = debugfs_create_dir(fbnic_driver_name, NULL);\ndrivers/net/ethernet/meta/fbnic/fbnic_debugfs.c-670-}\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-15-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:16:char fbnic_driver_name[] = DRV_NAME;\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-17-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c=271=static int fbnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-295-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:296:\terr = pcim_iomap_regions(pdev, info-\u003ebar_mask, fbnic_driver_name);\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-297-\tif (err) {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c=657=static const struct pci_error_handlers fbnic_err_handler = {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-662-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:663:static struct pci_driver fbnic_driver = {\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:664:\t.name\t\t= fbnic_driver_name,\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-665-\t.id_table\t= fbnic_pci_tbl,\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c=681=static int __init fbnic_init_module(void)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-686-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:687:\terr = pci_register_driver(\u0026fbnic_driver);\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-688-\tif (err) {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-692-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:693:\tpr_info(DRV_SUMMARY \" (%s)\", fbnic_driver.name);\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-694-out:\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c=704=static void __exit fbnic_exit_module(void)\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-705-{\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:706:\tpci_unregister_driver(\u0026fbnic_driver);\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-707-\n"
} |
| 11/2 | 2026/11/18 05:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 13735 output: 37 thoughts: 16 Thoughts: Okay, let's dive into this. Here's my thought process on what I'm looking at: **Understanding `fbnic_pci_tbl`** Alright, I'm encountering `fbnic_pci_tbl`. I need to figure out exactly what this thing is, what purpose it serves, and why it's important. Given the naming convention with the `fbnic` prefix, my initial assumption is that it's likely related to the framebuffer network interface card. The suffix `pci_tbl` strongly suggests a table of some sort, probably something related to PCI device information. This could be anything from device IDs and vendor IDs for a specific network hardware, configuration details, or device-specific parameters. Let's see what the documentation and/or code has to say about it. I have some digging to do. |
| 12/2 | 2026/11/18 05:29 | tool | grepper |
0mArgs:{
"Expression": "fbnic_pci_tbl",
"PathPrefixes": [
"drivers/net/ethernet/meta/"
]
}Results: {
"Output": "drivers/net/ethernet/meta/fbnic/fbnic_pci.c=26=static const struct fbnic_info *fbnic_info_tbl[] = {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-29-\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:30:static const struct pci_device_id fbnic_pci_tbl[] = {\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-31-\t{ PCI_DEVICE_DATA(META, FBNIC_ASIC, fbnic_board_asic) },\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-34-};\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:35:MODULE_DEVICE_TABLE(pci, fbnic_pci_tbl);\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-36-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c=219=static void fbnic_service_task(struct work_struct *work)\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-262- * @pdev: PCI device information struct\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:263: * @ent: entry in fbnic_pci_tbl\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-264- *\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c=663=static struct pci_driver fbnic_driver = {\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-664-\t.name\t\t= fbnic_driver_name,\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:665:\t.id_table\t= fbnic_pci_tbl,\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c-666-\t.probe\t\t= fbnic_probe,\n"
} |
| 13/2 | 2026/11/18 05:29 | llm | patch-evaluator |
1mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 14523 output: 17 thoughts: 213 Thoughts: **Analyzing the fbnic ASIC and QEMU Emulation** Okay, so I'm looking at this `PCI_DEVICE_DATA(META, FBNIC_ASIC, fbnic_board_asic)` and my immediate thought is to check the vendor ID for Meta. Right, so Meta's vendor ID is something like `0x1d9b`, which clearly identifies this as a physical ASIC network card, the Meta Platforms Host Network Interface, or `fbnic`. The real question is whether QEMU even *attempts* to emulate this specific hardware. My experience tells me QEMU focuses on standard NICs – the e1000s, rtl8139s, virtio-net, and the usual suspects. Definitely not anything as specialized as Meta's `fbnic` ASIC. So, QEMU is highly unlikely to be emulating this ASIC. Hold on, I need to take a step back and think laterally. Even if QEMU *doesn't* directly emulate the `fbnic` ASIC, is there any way to interact with it through a virtual or software bus? Perhaps a mock device, a platform device, some sort of network device simulation? Let's not assume a lack of emulation means a complete dead end. I need to see if the kernel exposes any virtual interface that might relate to `fbnic`. Time to grep the kernel source for instances of "fbnic". |
| 14/2 | 2026/11/18 05:31 | tool | grepper |
0mArgs:{
"Expression": "fbnic_"
}Results: {
"Output": "\nFull output is too long, showing 200 out of 8683 lines.\nUse more precise expression or PathPrefixes if possible.\n\nNumber of matching lines per file (30 files in total):\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:1\ndrivers/net/ethernet/meta/fbnic/Makefile:18\ndrivers/net/ethernet/meta/fbnic/fbnic.h:84\ndrivers/net/ethernet/meta/fbnic/fbnic_csr.c:23\ndrivers/net/ethernet/meta/fbnic/fbnic_csr.h:4\ndrivers/net/ethernet/meta/fbnic/fbnic_debugfs.c:122\ndrivers/net/ethernet/meta/fbnic/fbnic_devlink.c:89\ndrivers/net/ethernet/meta/fbnic/fbnic_ethtool.c:375\ndrivers/net/ethernet/meta/fbnic/fbnic_fw.c:343\ndrivers/net/ethernet/meta/fbnic/fbnic_fw.h:48\ndrivers/net/ethernet/meta/fbnic/fbnic_fw_log.c:17\ndrivers/net/ethernet/meta/fbnic/fbnic_fw_log.h:9\ndrivers/net/ethernet/meta/fbnic/fbnic_hw_stats.c:209\ndrivers/net/ethernet/meta/fbnic/fbnic_hw_stats.h:99\ndrivers/net/ethernet/meta/fbnic/fbnic_hwmon.c:17\ndrivers/net/ethernet/meta/fbnic/fbnic_irq.c:85\ndrivers/net/ethernet/meta/fbnic/fbnic_mac.c:143\ndrivers/net/ethernet/meta/fbnic/fbnic_mac.h:33\ndrivers/net/ethernet/meta/fbnic/fbnic_mdio.c:32\ndrivers/net/ethernet/meta/fbnic/fbnic_netdev.c:148\ndrivers/net/ethernet/meta/fbnic/fbnic_netdev.h:37\ndrivers/net/ethernet/meta/fbnic/fbnic_pci.c:172\ndrivers/net/ethernet/meta/fbnic/fbnic_phylink.c:50\ndrivers/net/ethernet/meta/fbnic/fbnic_rpc.c:151\ndrivers/net/ethernet/meta/fbnic/fbnic_rpc.h:34\ndrivers/net/ethernet/meta/fbnic/fbnic_time.c:68\ndrivers/net/ethernet/meta/fbnic/fbnic_tlv.c:110\ndrivers/net/ethernet/meta/fbnic/fbnic_tlv.h:45\ndrivers/net/ethernet/meta/fbnic/fbnic_txrx.c:543\ndrivers/net/ethernet/meta/fbnic/fbnic_txrx.h:48\n\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=11=image:\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-14- firmware actions, and retrieve firmware counters outside of the data path.\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:15: This is the firmware which fbnic_fw.c interacts with.\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-16-2. bootloader - The firmware which validate firmware security and control basic\n--\ndrivers/net/ethernet/meta/fbnic/Makefile=8=obj-$(CONFIG_FBNIC) += fbnic.o\ndrivers/net/ethernet/meta/fbnic/Makefile-9-\ndrivers/net/ethernet/meta/fbnic/Makefile:10:fbnic-y := fbnic_csr.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:11:\t fbnic_debugfs.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:12:\t fbnic_devlink.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:13:\t fbnic_ethtool.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:14:\t fbnic_fw.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:15:\t fbnic_fw_log.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:16:\t fbnic_hw_stats.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:17:\t fbnic_hwmon.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:18:\t fbnic_irq.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:19:\t fbnic_mac.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:20:\t fbnic_netdev.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:21:\t fbnic_pci.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:22:\t fbnic_phylink.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:23:\t fbnic_rpc.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:24:\t fbnic_mdio.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:25:\t fbnic_time.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:26:\t fbnic_tlv.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile:27:\t fbnic_txrx.o \\\ndrivers/net/ethernet/meta/fbnic/Makefile-28-# End of objects\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-12-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:13:#include \"fbnic_csr.h\"\ndrivers/net/ethernet/meta/fbnic/fbnic.h:14:#include \"fbnic_fw.h\"\ndrivers/net/ethernet/meta/fbnic/fbnic.h:15:#include \"fbnic_fw_log.h\"\ndrivers/net/ethernet/meta/fbnic/fbnic.h:16:#include \"fbnic_hw_stats.h\"\ndrivers/net/ethernet/meta/fbnic/fbnic.h:17:#include \"fbnic_mac.h\"\ndrivers/net/ethernet/meta/fbnic/fbnic.h:18:#include \"fbnic_rpc.h\"\ndrivers/net/ethernet/meta/fbnic/fbnic.h-19-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:20:struct fbnic_napi_vector;\ndrivers/net/ethernet/meta/fbnic/fbnic.h-21-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-24-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:25:struct fbnic_dev {\ndrivers/net/ethernet/meta/fbnic/fbnic.h-26-\tstruct device *dev;\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-34-\tu32 __iomem *uc_addr4;\ndrivers/net/ethernet/meta/fbnic/fbnic.h:35:\tconst struct fbnic_mac *mac;\ndrivers/net/ethernet/meta/fbnic/fbnic.h-36-\tunsigned int fw_msix_vector;\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-46-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:47:\tstruct fbnic_fw_mbx mbx[FBNIC_IPC_MBX_INDICES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h:48:\tstruct fbnic_fw_cap fw_cap;\ndrivers/net/ethernet/meta/fbnic/fbnic.h:49:\tstruct fbnic_fw_completion *cmpl_data[FBNIC_MBX_CMPL_SLOTS];\ndrivers/net/ethernet/meta/fbnic/fbnic.h-50-\t/* Lock protecting Tx Mailbox queue to prevent possible races */\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-63-\t/* Local copy of the devices TCAM */\ndrivers/net/ethernet/meta/fbnic/fbnic.h:64:\tstruct fbnic_act_tcam act_tcam[FBNIC_RPC_TCAM_ACT_NUM_ENTRIES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h:65:\tstruct fbnic_mac_addr mac_addr[FBNIC_RPC_TCAM_MACDA_NUM_ENTRIES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h-66-\tu8 mac_addr_boundary;\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-69-\t/* IP TCAM */\ndrivers/net/ethernet/meta/fbnic/fbnic.h:70:\tstruct fbnic_ip_addr ip_src[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h:71:\tstruct fbnic_ip_addr ip_dst[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h:72:\tstruct fbnic_ip_addr ipo_src[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h:73:\tstruct fbnic_ip_addr ipo_dst[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];\ndrivers/net/ethernet/meta/fbnic/fbnic.h-74-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-77-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:78:\t/* Lock protecting writes to @time_high, @time_offset of fbnic_netdev,\ndrivers/net/ethernet/meta/fbnic/fbnic.h-79-\t * and the HW time CSR machinery.\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-92-\t/* Local copy of hardware statistics */\ndrivers/net/ethernet/meta/fbnic/fbnic.h:93:\tstruct fbnic_hw_stats hw_stats;\ndrivers/net/ethernet/meta/fbnic/fbnic.h-94-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-98-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:99:\tstruct fbnic_fw_log fw_log;\ndrivers/net/ethernet/meta/fbnic/fbnic.h-100-\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h=113=enum {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-118-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:119:static inline bool fbnic_present(struct fbnic_dev *fbd)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-120-{\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-123-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:124:static inline void fbnic_wr32(struct fbnic_dev *fbd, u32 reg, u32 val)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-125-{\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-131-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:132:u32 fbnic_rd32(struct fbnic_dev *fbd, u32 reg);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-133-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:134:static inline void fbnic_wrfl(struct fbnic_dev *fbd)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-135-{\ndrivers/net/ethernet/meta/fbnic/fbnic.h:136:\tfbnic_rd32(fbd, FBNIC_MASTER_SPARE_0);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-137-}\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h=139=static inline void\ndrivers/net/ethernet/meta/fbnic/fbnic.h:140:fbnic_rmw32(struct fbnic_dev *fbd, u32 reg, u32 mask, u32 val)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-141-{\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-143-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:144:\tv = fbnic_rd32(fbd, reg);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-145-\tv \u0026= ~mask;\ndrivers/net/ethernet/meta/fbnic/fbnic.h-146-\tv |= val;\ndrivers/net/ethernet/meta/fbnic/fbnic.h:147:\tfbnic_wr32(fbd, reg, v);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-148-}\ndrivers/net/ethernet/meta/fbnic/fbnic.h-149-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:150:#define wr32(_f, _r, _v)\tfbnic_wr32(_f, _r, _v)\ndrivers/net/ethernet/meta/fbnic/fbnic.h:151:#define rd32(_f, _r)\t\tfbnic_rd32(_f, _r)\ndrivers/net/ethernet/meta/fbnic/fbnic.h:152:#define wrfl(_f)\t\tfbnic_wrfl(_f)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-153-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:154:bool fbnic_fw_present(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:155:u32 fbnic_fw_rd32(struct fbnic_dev *fbd, u32 reg);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:156:void fbnic_fw_wr32(struct fbnic_dev *fbd, u32 reg, u32 val);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-157-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:158:#define fw_rd32(_f, _r)\t\tfbnic_fw_rd32(_f, _r)\ndrivers/net/ethernet/meta/fbnic/fbnic.h:159:#define fw_wr32(_f, _r, _v)\tfbnic_fw_wr32(_f, _r, _v)\ndrivers/net/ethernet/meta/fbnic/fbnic.h:160:#define fw_wrfl(_f)\t\tfbnic_fw_rd32(_f, FBNIC_FW_ZERO_REG)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-161-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:162:static inline bool fbnic_bmc_present(struct fbnic_dev *fbd)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-163-{\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-166-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:167:static inline bool fbnic_bmc_all_multi(struct fbnic_dev *fbd)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-168-{\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-171-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:172:static inline bool fbnic_init_failure(struct fbnic_dev *fbd)\ndrivers/net/ethernet/meta/fbnic/fbnic.h-173-{\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-176-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:177:extern char fbnic_driver_name[];\ndrivers/net/ethernet/meta/fbnic/fbnic.h-178-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:179:void fbnic_devlink_free(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:180:struct fbnic_dev *fbnic_devlink_alloc(struct pci_dev *pdev);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:181:int fbnic_devlink_health_create(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:182:void fbnic_devlink_health_destroy(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:183:void fbnic_devlink_register(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:184:void fbnic_devlink_unregister(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-185-void __printf(2, 3)\ndrivers/net/ethernet/meta/fbnic/fbnic.h:186:fbnic_devlink_fw_report(struct fbnic_dev *fbd, const char *format, ...);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:187:void fbnic_devlink_otp_check(struct fbnic_dev *fbd, const char *msg);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-188-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:189:int fbnic_fw_request_mbx(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:190:void fbnic_fw_free_mbx(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-191-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:192:void fbnic_hwmon_register(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:193:void fbnic_hwmon_unregister(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-194-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:195:int fbnic_mac_request_irq(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:196:void fbnic_mac_free_irq(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-197-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:198:void fbnic_napi_name_irqs(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:199:int fbnic_napi_request_irq(struct fbnic_dev *fbd,\ndrivers/net/ethernet/meta/fbnic/fbnic.h:200:\t\t\t struct fbnic_napi_vector *nv);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:201:void fbnic_napi_free_irq(struct fbnic_dev *fbd,\ndrivers/net/ethernet/meta/fbnic/fbnic.h:202:\t\t\t struct fbnic_napi_vector *nv);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:203:void fbnic_synchronize_irq(struct fbnic_dev *fbd, int nr);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:204:int fbnic_request_irq(struct fbnic_dev *dev, int nr, irq_handler_t handler,\ndrivers/net/ethernet/meta/fbnic/fbnic.h-205-\t\t unsigned long flags, const char *name, void *data);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:206:void fbnic_free_irq(struct fbnic_dev *dev, int nr, void *data);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-207-\ndrivers/net/ethernet/meta/fbnic/fbnic.h-208-/**\ndrivers/net/ethernet/meta/fbnic/fbnic.h:209: * enum fbnic_msix_self_test_codes - return codes from self test routines\ndrivers/net/ethernet/meta/fbnic/fbnic.h-210- *\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-224- */\ndrivers/net/ethernet/meta/fbnic/fbnic.h:225:enum fbnic_msix_self_test_codes {\ndrivers/net/ethernet/meta/fbnic/fbnic.h-226-\tFBNIC_TEST_MSIX_SUCCESS = 0,\n--\ndrivers/net/ethernet/meta/fbnic/fbnic.h-236-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:237:enum fbnic_msix_self_test_codes fbnic_msix_test(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-238-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:239:void fbnic_free_irqs(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:240:int fbnic_alloc_irqs(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-241-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:242:void fbnic_get_fw_ver_commit_str(struct fbnic_dev *fbd, char *fw_version,\ndrivers/net/ethernet/meta/fbnic/fbnic.h-243-\t\t\t\t const size_t str_sz);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-244-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:245:void fbnic_dbg_fbd_init(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:246:void fbnic_dbg_fbd_exit(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:247:void fbnic_dbg_init(void);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:248:void fbnic_dbg_exit(void);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-249-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:250:void fbnic_rpc_reset_valid_entries(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-251-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:252:int fbnic_mdiobus_create(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-253-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:254:void fbnic_csr_get_regs(struct fbnic_dev *fbd, u32 *data, u32 *regs_version);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:255:int fbnic_csr_regs_len(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-256-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:257:void fbnic_config_txrx_usecs(struct fbnic_napi_vector *nv, u32 arm);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:258:void fbnic_config_rx_frames(struct fbnic_napi_vector *nv);\ndrivers/net/ethernet/meta/fbnic/fbnic.h:259:void fbnic_config_rx_cqe_nsecs(struct fbnic_dev *fbd);\ndrivers/net/ethernet/meta/fbnic/fbnic.h-260-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:261:enum fbnic_boards {\ndrivers/net/ethernet/meta/fbnic/fbnic.h:262:\tfbnic_board_asic\ndrivers/net/ethernet/meta/fbnic/fbnic.h-263-};\ndrivers/net/ethernet/meta/fbnic/fbnic.h-264-\ndrivers/net/ethernet/meta/fbnic/fbnic.h:265:struct fbnic_info {\ndrivers/net/ethernet/meta/fbnic/fbnic.h-266-\tunsigned int max_num_queues;\n\n"
} |
| 15/2 | 2026/11/18 05:31 | llm | patch-evaluator |
2mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21696 output: 25 thoughts: 567 Thoughts: **Analyzing the Structural Reachability of `fbnic` Code in Virtualized Environments** Okay, let's break this down. The critical point is that we need to confirm whether the changes made in this patch are actually testable in a standard virtualized environment like QEMU, or even Google Compute Engine. I'm focusing on the negative criteria outlined in Section 2, specifically the "Structurally unreachable hardware" aspect. We have a situation where the `fbnic` is a Meta-specific ASIC NIC (`PCI_DEVICE_DATA(META, FBNIC_ASIC, fbnic_board_asic)`), and it is clear that this device, just like those other listed examples (mlxsw, pds_core, qed, ionic, etc.), requires the actual physical Meta ASIC PCIe card. My concern is that no standard QEMU setup emulates this, meaning the `fbnic_probe` function will never get invoked. This means `fbnic_dev` won't be registered, no network device (`netdev`), no devlink health reporter, and no debugfs entries will be created or used. This, for all intents and purposes, renders any code modifications within the `drivers/net/ethernet/meta/fbnic/` directory effectively unreachable in a standard virtualized environment. Now, let's verify that assumption. A quick check of the modified files reveals that *every* change is contained within the `drivers/net/ethernet/meta/fbnic/` directory. We're looking at things like `fbnic_csr.h`, `fbnic_debugfs.c`, `fbnic_devlink.c`, the whole suite. There are no modifications to core network code, or any common kernel files, or even unrelated drivers. This strongly supports the idea that the entire scope of the patch is bound to the `fbnic` device and the Meta-specific hardware. Just to be absolutely certain, I'll go back and check the commit log and commit information to confirm the intent and scope of this patch. This will offer further assurance of my conclusion. |
| 16/2 | 2026/11/18 05:33 | tool | grepper |
0mArgs:{
"Expression": "fbnic",
"PathPrefixes": [
"Documentation/"
]
}Results: {
"Output": "Documentation/networking/device_drivers/ethernet/index.rst=8=Contents:\n--\nDocumentation/networking/device_drivers/ethernet/index.rst-47- mellanox/mlx5/index\nDocumentation/networking/device_drivers/ethernet/index.rst:48: meta/fbnic\nDocumentation/networking/device_drivers/ethernet/index.rst-49- microsoft/netvsc\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=7=Firmware Versions\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-9-\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:10:fbnic has three components stored on the flash which are provided in one PLDM\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-11-image:\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-14- firmware actions, and retrieve firmware counters outside of the data path.\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:15: This is the firmware which fbnic_fw.c interacts with.\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-16-2. bootloader - The firmware which validate firmware security and control basic\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-20-\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:21:fbnic stores two copies of these three components on flash. This allows fbnic\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-22-to fall back to an older version of firmware automatically in case firmware\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=34=Ringparams (ethtool -g / -G)\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-36-\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:37:fbnic has two submission (host -\u003e device) rings for every completion\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-38-(device -\u003e host) ring. The three ring objects together form a single\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=49=For Tx both submission rings can be used to submit packets, the completion\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:50:ring carries notifications for both. fbnic uses one of the submission\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-51-rings for normal traffic from the stack and the second one for XDP frames.\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=61=Upgrading Firmware\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-63-\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:64:fbnic supports updating firmware using signed PLDM images with devlink dev\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-65-flash. PLDM images are written into the flash. Flashing does not interrupt\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=156=PCIe\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-158-\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:159:The fbnic driver exposes PCIe hardware performance statistics through debugfs\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-160-(``pcie_stats``). These statistics provide insights into PCIe transaction\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst=183=XDP Length Error:\n--\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-185-\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst:186:For XDP programs without frags support, fbnic tries to make sure that MTU fits\nDocumentation/networking/device_drivers/ethernet/meta/fbnic.rst-187-into a single buffer. If an oversized frame is received and gets fragmented,\n"
} |
| 17/2 | 2026/11/18 05:33 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23786 output: 103 thoughts: 426 Thoughts: **Fuzzing Feasibility Assessment: fbnic Driver Modifications**
Okay, let's break this down. My initial concern was whether the debugfs modifications in `fbnic_debugfs.c` or elsewhere could create global debug nodes without a device, which would open a potential fuzzing avenue. Looking at `fbnic_dbg_init()`, it's clear that it creates the root debug directory, `fbnic_dbg_root`, using `debugfs_create_dir(fbnic_driver_name, NULL)`. However, all the device-specific debugfs entries, particularly the modified `fbnic_dbg_pcie_stats_show` function, are created within the per-device directory, which is initialized in `fbnic_dbg_fbd_init`. Critically, this function requires an instantiated `fbd` structure, which comes from the PCI probe.
The relevant modification, `debugfs_create_file("pcie_stats", 0400, fbd->dbg_dir, fbd, &fbnic_dbg_pcie_stats_fops)`, *absolutely* relies on the existence of the `fbd` structure and the corresponding PCIe device. This means that none of the modified code paths can be triggered without the physical presence of the Meta NIC hardware. It's structurally unreachable in any standard virtualized environment, which is also highlighted in section 2 of the provided context. The documentation specifically mentions that this type of hardware, including the `fbnic` driver, requires physical ASIC/PCIe cards, which aren't emulated in environments like QEMU or GCE.
Therefore, given the nature of the driver's dependencies, the modified code is unreachable from a fuzzing perspective.
I'm setting `WorthFuzzing = false`, with `EnableConfigs` and `FocusSymbols` empty. Now, to call `set-results`.
|
| 18/2 | 2026/11/18 05:33 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch series exclusively modifies the Meta Platforms Host Network Interface (fbnic) driver under drivers/net/ethernet/meta/fbnic/. This driver requires vendor-specific physical ASIC/PCIe hardware that is not emulated in standard QEMU/KVM virtualized fuzzing environments. Consequently, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch series exclusively modifies the Meta Platforms Host Network Interface (fbnic) driver under drivers/net/ethernet/meta/fbnic/. This driver requires vendor-specific physical ASIC/PCIe hardware that is not emulated in standard QEMU/KVM virtualized fuzzing environments. Consequently, the modified code is structurally unreachable for fuzzing.",
"WorthFuzzing": false
} |
| 19/1 | 2026/11/18 05:33 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|