| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/06 10:38 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Marvell OcteonTX2 network driver, which requires specific physical PCIe hardware not emulated in standard QEMU or GCE environments. Thus, it cannot be fuzzed.",
"WorthFuzzing": false
} |
| 1/1 | 2026/08/06 10:38 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit e3a20c17b2cb8d098d101c44325068780a026516\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Aug 6 10:38:48 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c\nindex b81c47ea023be..22f64c1ede91a 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c\n@@ -331,8 +331,12 @@ static bool is_valid_txschq(struct rvu *rvu, int blkaddr,\n \t\t\treturn true;\n \t}\n \n-\tif (map_func != pcifunc)\n+\tif (map_func != pcifunc) {\n+\t\tdev_err_ratelimited(rvu-\u003edev,\n+\t\t\t\t \"pcifunc %x map pcifunc %x not equal, lvl=%u schq=%u\\n\",\n+\t\t\t\t pcifunc, map_func, lvl, schq);\n \t\treturn false;\n+\t}\n \n \treturn true;\n }\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c\nindex ca73a94db7943..b4889ef8fab92 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c\n@@ -614,6 +614,149 @@ void otx2_get_mac_from_af(struct net_device *netdev)\n }\n EXPORT_SYMBOL(otx2_get_mac_from_af);\n \n+static int\n+otx2_nix_tmq_reg_write(struct otx2_nic *pfvf, int cnt,\n+\t\t u64 reg_addr[MAX_REGS_PER_MBOX_MSG],\n+\t\t u64 reg_val[MAX_REGS_PER_MBOX_MSG])\n+{\n+\tstruct mbox *mbox = \u0026pfvf-\u003embox;\n+\tstruct nix_txschq_config *req;\n+\tint i, err;\n+\n+\tmutex_lock(\u0026mbox-\u003elock);\n+\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);\n+\tif (!req) {\n+\t\tmutex_unlock(\u0026mbox-\u003elock);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\treq-\u003elvl = NIX_TXSCH_LVL_MDQ;\n+\treq-\u003enum_regs = cnt;\n+\n+\tfor (i = 0; i \u003c cnt; i++) {\n+\t\treq-\u003ereg[i] = reg_addr[i];\n+\t\treq-\u003eregval[i] = reg_val[i];\n+\t}\n+\n+\terr = otx2_sync_mbox_msg(mbox);\n+\tmutex_unlock(\u0026mbox-\u003elock);\n+\n+\treturn err;\n+}\n+\n+int otx2_nix_tm_clear_queue_shaper(struct otx2_nic *pfvf)\n+{\n+\tu64 reg_addr[MAX_REGS_PER_MBOX_MSG];\n+\tu64 reg_val[MAX_REGS_PER_MBOX_MSG];\n+\tDECLARE_BITMAP(slots, 2048);\n+\tint err, smq, q, cnt = 0;\n+\n+\tbitmap_zero(slots, 2048);\n+\n+\tfor (q = 0; q \u003c pfvf-\u003ehw.non_qos_queues; q++) {\n+\t\tsmq = otx2_get_smq_idx(pfvf, q);\n+\t\tif (test_bit(smq, slots))\n+\t\t\tcontinue;\n+\n+\t\treg_addr[cnt] = NIX_AF_MDQX_PIR(smq);\n+\t\treg_val[cnt] = 0;\n+\t\tcnt++;\n+\n+\t\treg_addr[cnt] = NIX_AF_MDQX_CIR(smq);\n+\t\treg_val[cnt] = 0;\n+\t\tcnt++;\n+\n+\t\tset_bit(smq, slots);\n+\n+\t\tif (cnt \u003c MAX_REGS_PER_MBOX_MSG - 1)\n+\t\t\tcontinue;\n+\n+\t\terr = otx2_nix_tmq_reg_write(pfvf, cnt,\n+\t\t\t\t\t reg_addr, reg_val);\n+\t\tif (err)\n+\t\t\tgoto fail;\n+\t\tcnt = 0;\n+\t}\n+\n+\tif (cnt) {\n+\t\terr = otx2_nix_tmq_reg_write(pfvf, cnt,\n+\t\t\t\t\t reg_addr, reg_val);\n+\t\tif (err)\n+\t\t\tgoto fail;\n+\t}\n+\n+\treturn 0;\n+fail:\n+\treturn err;\n+}\n+\n+int otx2_nix_tm_set_queue_shaper(struct otx2_nic *pfvf,\n+\t\t\t\t int txq, u64 minrate, u64 maxrate)\n+{\n+\tstruct mbox *mbox = \u0026pfvf-\u003embox;\n+\tstruct nix_txschq_config *req;\n+\tint err, smq, n = 0;\n+\tu64 reg_addr[2];\n+\tu64 reg_val[2];\n+\tu64 rate;\n+\n+\tif (!maxrate \u0026\u0026 !minrate) {\n+\t\tsmq = otx2_get_smq_idx(pfvf, txq);\n+\t\treg_addr[0] = NIX_AF_MDQX_PIR(smq);\n+\t\treg_val[0] = 0;\n+\t\treg_addr[1] = NIX_AF_MDQX_CIR(smq);\n+\t\treg_val[1] = 0;\n+\t\treturn otx2_nix_tmq_reg_write(pfvf, 2, reg_addr, reg_val);\n+\t}\n+\n+\tsmq = otx2_get_smq_idx(pfvf, txq);\n+\n+\tmutex_lock(\u0026mbox-\u003elock);\n+\treq = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);\n+\tif (!req) {\n+\t\tmutex_unlock(\u0026mbox-\u003elock);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\treq-\u003elvl = NIX_TXSCH_LVL_MDQ;\n+\n+\t/* MQPRIO exposes only min/max rate, not burst. Pass burst 0 so\n+\t * otx2_get_egress_burst_cfg() programmes the largest burst the NIX\n+\t * encoding supports (CN10K_MAX_BURST_SIZE on CN10K). This differs\n+\t * from the 65536 byte default used in the HTB path, which is a\n+\t * kernel-side default when no explicit burst is configured, not a\n+\t * hardware cap.\n+\t *\n+\t * Sparse MDQ writes: PIR and CIR are programmed independently. If\n+\t * maxrate or minrate is zero, the matching register is not written.\n+\t * When the tc mqprio command omits min_rate or max_rate (or sets a\n+\t * per-TC rate to zero), the driver leaves the other MDQ shaper\n+\t * register untouched; any rate previously applied there remains in\n+\t * hardware until both inputs are zero (full clear) or the register\n+\t * is written again. Users reconfiguring shaping must supply both\n+\t * parameters or delete mqprio before applying a new rate profile.\n+\t */\n+\tif (maxrate) {\n+\t\treq-\u003ereg[n] = NIX_AF_MDQX_PIR(smq);\n+\t\trate = otx2_convert_rate(maxrate);\n+\t\treq-\u003eregval[n] = otx2_get_txschq_rate_regval(pfvf, rate, 0);\n+\t\tn++;\n+\t}\n+\n+\t/* CIR+PIR support is required and checked at mqprio setup. */\n+\tif (minrate) {\n+\t\treq-\u003ereg[n] = NIX_AF_MDQX_CIR(smq);\n+\t\trate = otx2_convert_rate(minrate);\n+\t\treq-\u003eregval[n] = otx2_get_txschq_rate_regval(pfvf, rate, 0);\n+\t\tn++;\n+\t}\n+\treq-\u003enum_regs = n;\n+\n+\terr = otx2_sync_mbox_msg(mbox);\n+\tmutex_unlock(\u0026mbox-\u003elock);\n+\treturn err;\n+}\n+\n int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for_pfc)\n {\n \tu16 (*schq_list)[MAX_TXSCHQ_PER_FUNC];\n@@ -650,7 +793,11 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for\n \t\t\t\t\t\t(u64)hw-\u003esmq_link_type);\n \t\treq-\u003enum_regs++;\n \t\t/* MDQ config */\n-\t\tparent = schq_list[NIX_TXSCH_LVL_TL4][prio];\n+\t\tif (pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED)\n+\t\t\tparent = schq_list[NIX_TXSCH_LVL_TL4][0];\n+\t\telse\n+\t\t\tparent = schq_list[NIX_TXSCH_LVL_TL4][prio];\n+\n \t\treq-\u003ereg[1] = NIX_AF_MDQX_PARENT(schq);\n \t\treq-\u003eregval[1] = parent \u003c\u003c 16;\n \t\treq-\u003enum_regs++;\n@@ -778,6 +925,9 @@ int otx2_txsch_alloc(struct otx2_nic *pfvf)\n \t\treq-\u003eschq[NIX_TXSCH_LVL_TL4] = chan_cnt;\n \t}\n \n+\tif (pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED)\n+\t\treq-\u003eschq[NIX_TXSCH_LVL_SMQ] = pfvf-\u003ehw.non_qos_queues;\n+\n \trc = otx2_sync_mbox_msg(\u0026pfvf-\u003embox);\n \tif (rc)\n \t\treturn rc;\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h\nindex eecee612b7b2c..df175fb149518 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h\n@@ -512,9 +512,14 @@ struct otx2_nic {\n #define OTX2_FLAG_REP_MODE_ENABLED\t\t BIT_ULL(18)\n #define OTX2_FLAG_PORT_UP\t\t\tBIT_ULL(19)\n #define OTX2_FLAG_IPSEC_OFFLOAD_ENABLED\t\tBIT_ULL(20)\n+#define OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED\tBIT_ULL(21)\n \tu64\t\t\tflags;\n \tu64\t\t\t*cq_op_addr;\n \n+\tu32\t\t\tmqprio_flags;\n+\tu64\t\t\t*mqprio_min_rate;\n+\tu64\t\t\t*mqprio_max_rate;\n+\n \tstruct bpf_prog\t\t*xdp_prog;\n \tstruct otx2_qset\tqset;\n \tstruct otx2_hw\t\thw;\n@@ -1246,6 +1251,11 @@ dma_addr_t otx2_dma_map_skb_frag(struct otx2_nic *pfvf,\n \t\t\t\t struct sk_buff *skb, int seg, int *len);\n void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg);\n int otx2_read_free_sqe(struct otx2_nic *pfvf, u16 qidx);\n+int otx2_nix_tm_set_queue_shaper(struct otx2_nic *pfvf, int txq,\n+\t\t\t\t u64 minrate, u64 maxrate);\n+int otx2_nix_tm_clear_queue_shaper(struct otx2_nic *pfvf);\n+int otx2_mqprio_down(struct otx2_nic *pfvf);\n+int otx2_mqprio_up(struct otx2_nic *pfvf);\n void otx2_queue_vf_work(struct mbox *mw, struct workqueue_struct *mbox_wq,\n \t\t\tint first, int mdevs, u64 intr);\n int otx2_del_mcam_flow_entry(struct otx2_nic *nic, u16 entry,\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c\nindex f110dfa423605..676f78d8fb344 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c\n@@ -413,6 +413,12 @@ static int otx2_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc)\n \tu8 old_pfc_en;\n \tint err;\n \n+\tif ((pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED) \u0026\u0026 pfc-\u003epfc_en) {\n+\t\tnetdev_err(dev,\n+\t\t\t \"PFC: cannot enable while mqprio bandwidth offload is active\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n \told_pfc_en = pfvf-\u003epfc_en;\n \tpfvf-\u003epfc_en = pfc-\u003epfc_en;\n \ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c\nindex a0340f3422bf9..3f494cfbfcee2 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c\n@@ -287,6 +287,17 @@ static int otx2_set_channels(struct net_device *dev,\n \t\treturn -EINVAL;\n \t}\n \n+\tif ((pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED) \u0026\u0026\n+\t (channel-\u003etx_count != pfvf-\u003ehw.tx_queues ||\n+\t channel-\u003erx_count != pfvf-\u003ehw.rx_queues)) {\n+\t\terr = otx2_mqprio_down(pfvf);\n+\t\tif (err)\n+\t\t\treturn err;\n+\n+\t\tnetdev_info(dev,\n+\t\t\t \"Removed mqprio bandwidth offload due to channel count change\\n\");\n+\t}\n+\n \tif (if_up)\n \t\tdev-\u003enetdev_ops-\u003endo_stop(dev);\n \ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c\nindex c995f29008590..a5e9908fa9b55 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c\n@@ -1980,6 +1980,10 @@ int otx2_open(struct net_device *netdev)\n \tif (err)\n \t\tgoto err_free_mem;\n \n+\terr = otx2_mqprio_up(pf);\n+\tif (err)\n+\t\tgoto err_free_hw;\n+\n \t/* Register NAPI handler */\n \tfor (qidx = 0; qidx \u003c pf-\u003ehw.cint_cnt; qidx++) {\n \t\tcq_poll = \u0026qset-\u003enapi[qidx];\n@@ -2140,6 +2144,7 @@ int otx2_open(struct net_device *netdev)\n \tfree_irq(vec, pf);\n err_disable_napi:\n \totx2_disable_napi(pf);\n+err_free_hw:\n \totx2_free_hw_resources(pf);\n err_free_mem:\n \totx2_free_queue_mem(qset);\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c\nindex 0b46ec29e64ea..f7d80d5980d79 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c\n@@ -16,6 +16,7 @@\n #include \u003cnet/tc_act/tc_mirred.h\u003e\n #include \u003cnet/tc_act/tc_vlan.h\u003e\n #include \u003cnet/ipv6.h\u003e\n+#include \u003cnet/pkt_sched.h\u003e\n \n #include \"cn10k.h\"\n #include \"otx2_common.h\"\n@@ -59,6 +60,9 @@ static void otx2_get_egress_burst_cfg(struct otx2_nic *nic, u32 burst,\n \t\telse\n \t\t\t*burst_mantissa = tmp / (1ULL \u003c\u003c (*burst_exp - 7));\n \t} else {\n+\t\t/* burst 0: largest encodable burst (CN10K_MAX_BURST_SIZE on\n+\t\t * CN10K), not a minimal burst.\n+\t\t */\n \t\t*burst_exp = MAX_BURST_EXPONENT;\n \t\t*burst_mantissa = max_mantissa;\n \t}\n@@ -1598,14 +1602,341 @@ static int otx2_setup_tc_block(struct net_device *netdev,\n \t\t\t\t\t nic, nic, ingress);\n }\n \n+/* Tear down mqprio bandwidth offload: clear per-queue shapers, TC\n+ * mappings, and the rate-limit flag. Used on explicit mqprio teardown\n+ * (tc qdisc del), not on internal stop/open cycles such as MTU change.\n+ */\n+static void otx2_mqprio_free_cache(struct otx2_nic *pfvf)\n+{\n+\tdevm_kfree(pfvf-\u003edev, pfvf-\u003emqprio_min_rate);\n+\tdevm_kfree(pfvf-\u003edev, pfvf-\u003emqprio_max_rate);\n+\tpfvf-\u003emqprio_min_rate = NULL;\n+\tpfvf-\u003emqprio_max_rate = NULL;\n+\tpfvf-\u003emqprio_flags = 0;\n+}\n+\n+static int otx2_mqprio_alloc_cache(struct otx2_nic *pfvf)\n+{\n+\tu16 num_txq = pfvf-\u003ehw.non_qos_queues;\n+\n+\totx2_mqprio_free_cache(pfvf);\n+\n+\tpfvf-\u003emqprio_min_rate = devm_kcalloc(pfvf-\u003edev, num_txq,\n+\t\t\t\t\t sizeof(*pfvf-\u003emqprio_min_rate),\n+\t\t\t\t\t GFP_KERNEL);\n+\tpfvf-\u003emqprio_max_rate = devm_kcalloc(pfvf-\u003edev, num_txq,\n+\t\t\t\t\t sizeof(*pfvf-\u003emqprio_max_rate),\n+\t\t\t\t\t GFP_KERNEL);\n+\tif (!pfvf-\u003emqprio_min_rate || !pfvf-\u003emqprio_max_rate) {\n+\t\totx2_mqprio_free_cache(pfvf);\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static bool otx2_txschq_is_allocated(struct otx2_nic *pfvf)\n+{\n+\tint lvl, idx;\n+\n+\tfor (lvl = 0; lvl \u003c NIX_TXSCH_LVL_CNT; lvl++) {\n+\t\tfor (idx = 0; idx \u003c pfvf-\u003ehw.txschq_cnt[lvl]; idx++) {\n+\t\t\tif (pfvf-\u003ehw.txschq_list[lvl][idx])\n+\t\t\t\treturn true;\n+\t\t}\n+\t}\n+\n+\treturn false;\n+}\n+\n+int otx2_mqprio_down(struct otx2_nic *pfvf)\n+{\n+\tstruct net_device *netdev = pfvf-\u003enetdev;\n+\tint err = 0;\n+\n+\tif (!(pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED))\n+\t\treturn 0;\n+\n+\tif (otx2_txschq_is_allocated(pfvf))\n+\t\terr = otx2_nix_tm_clear_queue_shaper(pfvf);\n+\n+\tpfvf-\u003eflags \u0026= ~OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED;\n+\tnetdev_set_num_tc(netdev, 0);\n+\totx2_mqprio_free_cache(pfvf);\n+\n+\treturn err;\n+}\n+\n+int otx2_mqprio_up(struct otx2_nic *pfvf)\n+{\n+\tstruct net_device *netdev = pfvf-\u003enetdev;\n+\tint txq, err;\n+\n+\tif (!(pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED))\n+\t\treturn 0;\n+\n+\tif (!pfvf-\u003emqprio_min_rate || !pfvf-\u003emqprio_max_rate)\n+\t\treturn 0;\n+\n+\tfor (txq = 0; txq \u003c pfvf-\u003ehw.non_qos_queues; txq++) {\n+\t\tu64 min_rate = 0, max_rate = 0;\n+\n+\t\tif (pfvf-\u003emqprio_flags \u0026 TC_MQPRIO_F_MIN_RATE)\n+\t\t\tmin_rate = pfvf-\u003emqprio_min_rate[txq];\n+\t\tif (pfvf-\u003emqprio_flags \u0026 TC_MQPRIO_F_MAX_RATE)\n+\t\t\tmax_rate = pfvf-\u003emqprio_max_rate[txq];\n+\n+\t\tif (!min_rate \u0026\u0026 !max_rate)\n+\t\t\tcontinue;\n+\n+\t\terr = otx2_nix_tm_set_queue_shaper(pfvf, txq, min_rate,\n+\t\t\t\t\t\t max_rate);\n+\t\tif (err) {\n+\t\t\tnetdev_err(netdev,\n+\t\t\t\t \"mqprio: failed to restore shaper for txq %d: %d\\n\",\n+\t\t\t\t txq, err);\n+\t\t\treturn err;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/* Restart the netdev to reprogram the TX scheduler hierarchy for mqprio\n+ * bandwidth offload. Both mqprio add and delete (when offload was active)\n+ * take this path via ndo_stop()/ndo_open() so VF-specific open logic (e.g.\n+ * LBK carrier on) runs correctly. The full stop/open cycle clears\n+ * carrier, stops all TX queues, tears down IRQs/NAPI and drops in-flight\n+ * traffic. If open fails, netif_close() clears IFF_UP and leaves the\n+ * interface administratively down.\n+ */\n+static int otx2_mqprio_restart_netdev(struct net_device *netdev, bool rate_limit)\n+{\n+\tstruct otx2_nic *pfvf = netdev_priv(netdev);\n+\tconst struct net_device_ops *ops = netdev-\u003enetdev_ops;\n+\tint err;\n+\n+\tnetdev_info(netdev,\n+\t\t \"mqprio: restarting interface to reprogram TX scheduler; in-flight traffic will be dropped\\n\");\n+\n+\terr = ops-\u003endo_stop(netdev);\n+\tif (err)\n+\t\treturn err;\n+\n+\t/* Set before ndo_open() so otx2_txsch_alloc() widens SMQ allocation. */\n+\tif (rate_limit)\n+\t\tpfvf-\u003eflags |= OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED;\n+\n+\terr = ops-\u003endo_open(netdev);\n+\tif (err) {\n+\t\tint down_err;\n+\n+\t\tnetdev_err(netdev,\n+\t\t\t \"Failed to restart device after mqprio change: %d\\n\",\n+\t\t\t err);\n+\t\tdown_err = otx2_mqprio_down(pfvf);\n+\t\tif (down_err)\n+\t\t\tnetdev_err(netdev,\n+\t\t\t\t \"mqprio: failed to clear shapers after restart error: %d\\n\",\n+\t\t\t\t down_err);\n+\t\t/* Caller holds netdev/RTNL lock; dev_close() would deadlock. */\n+\t\tnetif_close(netdev);\n+\t}\n+\n+\treturn err;\n+}\n+\n+static u64 otx2_mqprio_per_queue_rate(u64 rate, u32 qcount)\n+{\n+\tif (!rate || qcount \u003c= 1)\n+\t\treturn rate;\n+\n+\treturn div_u64(rate, qcount);\n+}\n+\n+static int otx2_teardown_tc_mqprio(struct otx2_nic *pfvf,\n+\t\t\t\t struct tc_mqprio_qopt_offload *mqprio)\n+{\n+\tbool had_mqprio = !!(pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED);\n+\tstruct tc_mqprio_qopt *qopt = \u0026mqprio-\u003eqopt;\n+\tstruct net_device *netdev = pfvf-\u003enetdev;\n+\tbool if_up = netif_running(netdev);\n+\tint down_err, err;\n+\n+\tqopt-\u003ehw = 0;\n+\n+\t/* Skip the netdev restart when mqprio offload was not active. */\n+\tif (!had_mqprio)\n+\t\treturn 0;\n+\n+\tdown_err = otx2_mqprio_down(pfvf);\n+\n+\tif (if_up) {\n+\t\terr = otx2_mqprio_restart_netdev(netdev, false);\n+\t\tif (err)\n+\t\t\treturn err;\n+\t}\n+\n+\treturn down_err;\n+}\n+\n+static int otx2_setup_tc_mqprio(struct net_device *netdev,\n+\t\t\t\tstruct tc_mqprio_qopt_offload *mqprio)\n+{\n+\tstruct otx2_nic *pfvf = netdev_priv(netdev);\n+\tstruct tc_mqprio_qopt *qopt = \u0026mqprio-\u003eqopt;\n+\tbool if_up = netif_running(netdev);\n+\tint tc, txq, err, i;\n+\n+\tif (!if_up) {\n+\t\tnetdev_err(netdev, \"mqprio: setup requires interface UP\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\tif (!qopt-\u003ehw)\n+\t\treturn otx2_teardown_tc_mqprio(pfvf, mqprio);\n+\n+\tif (mqprio-\u003eshaper != TC_MQPRIO_SHAPER_BW_RATE) {\n+\t\tnetdev_err(netdev, \"Unsupported mqprio shaper %#x\\n\", mqprio-\u003eshaper);\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\tif (!test_bit(QOS_CIR_PIR_SUPPORT, \u0026pfvf-\u003ehw.cap_flag)) {\n+\t\tnetdev_err(netdev,\n+\t\t\t \"mqprio: bandwidth offload requires CIR+PIR support\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\tif (is_otx2_sdp_rep(pfvf-\u003epdev)) {\n+\t\tnetdev_err(netdev, \"mqprio: bandwidth offload not supported on SDP rep\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\tif (otx2_qos_htb_active(pfvf)) {\n+\t\tnetdev_err(netdev, \"mqprio: cannot enable offload while HTB is active\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\tif (pfvf-\u003epfc_en) {\n+\t\tnetdev_err(netdev,\n+\t\t\t \"mqprio: cannot enable offload while PFC is enabled\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\tif (qopt-\u003enum_tc \u003e pfvf-\u003ehw.non_qos_queues) {\n+\t\tnetdev_err(netdev, \"Number of TCs (%u) exceeds hw queues %u\\n\",\n+\t\t\t qopt-\u003enum_tc, pfvf-\u003ehw.non_qos_queues);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (pfvf-\u003ehw.non_qos_queues \u003e MAX_TXSCHQ_PER_FUNC) {\n+\t\tnetdev_err(netdev,\n+\t\t\t \"Number of queues (%u) exceeds max scheduler queues %u\\n\",\n+\t\t\t pfvf-\u003ehw.non_qos_queues, MAX_TXSCHQ_PER_FUNC);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tfor (tc = 0; tc \u003c qopt-\u003enum_tc; tc++) {\n+\t\tu64 min_rate = 0, max_rate = 0;\n+\n+\t\tif (mqprio-\u003eflags \u0026 TC_MQPRIO_F_MIN_RATE)\n+\t\t\tmin_rate = mqprio-\u003emin_rate[tc];\n+\t\tif (mqprio-\u003eflags \u0026 TC_MQPRIO_F_MAX_RATE)\n+\t\t\tmax_rate = mqprio-\u003emax_rate[tc];\n+\n+\t\tif (min_rate \u0026\u0026 max_rate \u0026\u0026 min_rate \u003e max_rate) {\n+\t\t\tnetdev_err(netdev,\n+\t\t\t\t \"min_rate %llu exceeds max_rate %llu for tc %d\\n\",\n+\t\t\t\t min_rate, max_rate, tc);\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\tfor (txq = qopt-\u003eoffset[tc];\n+\t\t txq \u003c qopt-\u003eoffset[tc] + qopt-\u003ecount[tc]; txq++) {\n+\t\t\tif (txq \u003e= netdev-\u003ereal_num_tx_queues)\n+\t\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n+\terr = otx2_mqprio_restart_netdev(pfvf-\u003enetdev, true);\n+\tif (err)\n+\t\treturn err;\n+\n+\terr = otx2_mqprio_alloc_cache(pfvf);\n+\tif (err)\n+\t\tgoto cleanup;\n+\n+\tpfvf-\u003emqprio_flags = mqprio-\u003eflags;\n+\n+\tfor (tc = 0; tc \u003c qopt-\u003enum_tc; tc++) {\n+\t\tu64 min_rate = 0, max_rate = 0;\n+\t\tu32 qcount = qopt-\u003ecount[tc];\n+\n+\t\t/* Rates omitted from tc mqprio are left at zero; see sparse\n+\t\t * MDQ write behaviour in otx2_nix_tm_set_queue_shaper().\n+\t\t */\n+\t\tif (mqprio-\u003eflags \u0026 TC_MQPRIO_F_MIN_RATE)\n+\t\t\tmin_rate = otx2_mqprio_per_queue_rate(mqprio-\u003emin_rate[tc],\n+\t\t\t\t\t\t\t qcount);\n+\t\tif (mqprio-\u003eflags \u0026 TC_MQPRIO_F_MAX_RATE)\n+\t\t\tmax_rate = otx2_mqprio_per_queue_rate(mqprio-\u003emax_rate[tc],\n+\t\t\t\t\t\t\t qcount);\n+\n+\t\tfor (txq = qopt-\u003eoffset[tc];\n+\t\t txq \u003c qopt-\u003eoffset[tc] + qcount; txq++) {\n+\t\t\tnetdev_dbg(netdev,\n+\t\t\t\t \"mqprio: tc %d txq %d min_rate %llu max_rate %llu\\n\",\n+\t\t\t\t tc, txq, min_rate, max_rate);\n+\n+\t\t\tpfvf-\u003emqprio_min_rate[txq] = min_rate;\n+\t\t\tpfvf-\u003emqprio_max_rate[txq] = max_rate;\n+\n+\t\t\terr = otx2_nix_tm_set_queue_shaper(pfvf, txq,\n+\t\t\t\t\t\t\t min_rate, max_rate);\n+\t\t\tif (err)\n+\t\t\t\tgoto cleanup;\n+\t\t}\n+\t}\n+\n+\tnetdev_set_num_tc(netdev, qopt-\u003enum_tc);\n+\tfor (i = 0; i \u003c qopt-\u003enum_tc; i++)\n+\t\tnetdev_set_tc_queue(netdev, i, qopt-\u003ecount[i], qopt-\u003eoffset[i]);\n+\n+\tqopt-\u003ehw = TC_MQPRIO_HW_OFFLOAD_TCS;\n+\n+\treturn 0;\n+\n+cleanup:\n+\totx2_teardown_tc_mqprio(pfvf, mqprio);\n+\treturn err;\n+}\n+\n+static int otx2_setup_tc_query_caps(void *type_data)\n+{\n+\tstruct tc_query_caps_base *base = type_data;\n+\tstruct tc_mqprio_caps *caps;\n+\n+\tif (base-\u003etype != TC_SETUP_QDISC_MQPRIO)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tcaps = base-\u003ecaps;\n+\tcaps-\u003evalidate_queue_counts = true;\n+\n+\treturn 0;\n+}\n+\n int otx2_setup_tc(struct net_device *netdev, enum tc_setup_type type,\n \t\t void *type_data)\n {\n \tswitch (type) {\n+\tcase TC_QUERY_CAPS:\n+\t\treturn otx2_setup_tc_query_caps(type_data);\n \tcase TC_SETUP_BLOCK:\n \t\treturn otx2_setup_tc_block(netdev, type_data);\n \tcase TC_SETUP_QDISC_HTB:\n \t\treturn otx2_setup_tc_htb(netdev, type_data);\n+\tcase TC_SETUP_QDISC_MQPRIO:\n+\t\treturn otx2_setup_tc_mqprio(netdev, type_data);\n \tdefault:\n \t\treturn -EOPNOTSUPP;\n \t}\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c\nindex 69c0911e28e91..0fa5c65d62213 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c\n@@ -118,6 +118,9 @@ static void otx2_config_sched_shaping(struct otx2_nic *pfvf,\n \t/* configure PIR */\n \tmaxrate = (node-\u003erate \u003e node-\u003eceil) ? node-\u003erate : node-\u003eceil;\n \n+\t/* 65536 is the kernel-side default burst when HTB does not supply an\n+\t * explicit value, not the NIX hardware maximum (CN10K_MAX_BURST_SIZE).\n+\t */\n \tcfg-\u003eregval[*num_regs] =\n \t\totx2_get_txschq_rate_regval(pfvf, maxrate, 65536);\n \t(*num_regs)++;\n@@ -1729,11 +1732,23 @@ void otx2_qos_config_txschq(struct otx2_nic *pfvf)\n \totx2_qos_root_destroy(pfvf);\n }\n \n+bool otx2_qos_htb_active(struct otx2_nic *pfvf)\n+{\n+\treturn otx2_sw_node_find(pfvf, OTX2_QOS_ROOT_CLASSID);\n+}\n+\n int otx2_setup_tc_htb(struct net_device *ndev, struct tc_htb_qopt_offload *htb)\n {\n \tstruct otx2_nic *pfvf = netdev_priv(ndev);\n \tint res;\n \n+\tif ((pfvf-\u003eflags \u0026 OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED) \u0026\u0026\n+\t htb-\u003ecommand != TC_HTB_DESTROY) {\n+\t\tNL_SET_ERR_MSG_MOD(htb-\u003eextack,\n+\t\t\t\t \"HTB offload cannot be used with mqprio bandwidth offload active\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n \tswitch (htb-\u003ecommand) {\n \tcase TC_HTB_CREATE:\n \t\treturn otx2_qos_root_add(pfvf, htb-\u003eparent_classid,\ndiff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.h b/drivers/net/ethernet/marvell/octeontx2/nic/qos.h\nindex 221bd0438f603..c777cc42eac9c 100644\n--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.h\n+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.h\n@@ -23,6 +23,7 @@ enum qos_smq_operations {\n u64 otx2_get_txschq_rate_regval(struct otx2_nic *nic, u64 maxrate, u32 burst);\n \n int otx2_setup_tc_htb(struct net_device *ndev, struct tc_htb_qopt_offload *htb);\n+bool otx2_qos_htb_active(struct otx2_nic *pfvf);\n int otx2_qos_get_qid(struct otx2_nic *pfvf);\n void otx2_qos_free_qid(struct otx2_nic *pfvf, int qidx);\n int otx2_qos_enable_sq(struct otx2_nic *pfvf, int qidx);\n"
} |
| 2/1 | 2026/08/06 10:38 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Marvell OcteonTX2 network driver, which requires specific physical PCIe hardware not emulated in standard QEMU or GCE environments. Thus, it cannot be fuzzed.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a '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: For your convenience, here is the diff of the changes:
commit e3a20c17b2cb8d098d101c44325068780a026516
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Aug 6 10:38:48 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index b81c47ea023be..22f64c1ede91a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -331,8 +331,12 @@ static bool is_valid_txschq(struct rvu *rvu, int blkaddr,
return true;
}
- if (map_func != pcifunc)
+ if (map_func != pcifunc) {
+ dev_err_ratelimited(rvu->dev,
+ "pcifunc %x map pcifunc %x not equal, lvl=%u schq=%u\n",
+ pcifunc, map_func, lvl, schq);
return false;
+ }
return true;
}
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index ca73a94db7943..b4889ef8fab92 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -614,6 +614,149 @@ void otx2_get_mac_from_af(struct net_device *netdev)
}
EXPORT_SYMBOL(otx2_get_mac_from_af);
+static int
+otx2_nix_tmq_reg_write(struct otx2_nic *pfvf, int cnt,
+ u64 reg_addr[MAX_REGS_PER_MBOX_MSG],
+ u64 reg_val[MAX_REGS_PER_MBOX_MSG])
+{
+ struct mbox *mbox = &pfvf->mbox;
+ struct nix_txschq_config *req;
+ int i, err;
+
+ mutex_lock(&mbox->lock);
+ req = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);
+ if (!req) {
+ mutex_unlock(&mbox->lock);
+ return -ENOMEM;
+ }
+
+ req->lvl = NIX_TXSCH_LVL_MDQ;
+ req->num_regs = cnt;
+
+ for (i = 0; i < cnt; i++) {
+ req->reg[i] = reg_addr[i];
+ req->regval[i] = reg_val[i];
+ }
+
+ err = otx2_sync_mbox_msg(mbox);
+ mutex_unlock(&mbox->lock);
+
+ return err;
+}
+
+int otx2_nix_tm_clear_queue_shaper(struct otx2_nic *pfvf)
+{
+ u64 reg_addr[MAX_REGS_PER_MBOX_MSG];
+ u64 reg_val[MAX_REGS_PER_MBOX_MSG];
+ DECLARE_BITMAP(slots, 2048);
+ int err, smq, q, cnt = 0;
+
+ bitmap_zero(slots, 2048);
+
+ for (q = 0; q < pfvf->hw.non_qos_queues; q++) {
+ smq = otx2_get_smq_idx(pfvf, q);
+ if (test_bit(smq, slots))
+ continue;
+
+ reg_addr[cnt] = NIX_AF_MDQX_PIR(smq);
+ reg_val[cnt] = 0;
+ cnt++;
+
+ reg_addr[cnt] = NIX_AF_MDQX_CIR(smq);
+ reg_val[cnt] = 0;
+ cnt++;
+
+ set_bit(smq, slots);
+
+ if (cnt < MAX_REGS_PER_MBOX_MSG - 1)
+ continue;
+
+ err = otx2_nix_tmq_reg_write(pfvf, cnt,
+ reg_addr, reg_val);
+ if (err)
+ goto fail;
+ cnt = 0;
+ }
+
+ if (cnt) {
+ err = otx2_nix_tmq_reg_write(pfvf, cnt,
+ reg_addr, reg_val);
+ if (err)
+ goto fail;
+ }
+
+ return 0;
+fail:
+ return err;
+}
+
+int otx2_nix_tm_set_queue_shaper(struct otx2_nic *pfvf,
+ int txq, u64 minrate, u64 maxrate)
+{
+ struct mbox *mbox = &pfvf->mbox;
+ struct nix_txschq_config *req;
+ int err, smq, n = 0;
+ u64 reg_addr[2];
+ u64 reg_val[2];
+ u64 rate;
+
+ if (!maxrate && !minrate) {
+ smq = otx2_get_smq_idx(pfvf, txq);
+ reg_addr[0] = NIX_AF_MDQX_PIR(smq);
+ reg_val[0] = 0;
+ reg_addr[1] = NIX_AF_MDQX_CIR(smq);
+ reg_val[1] = 0;
+ return otx2_nix_tmq_reg_write(pfvf, 2, reg_addr, reg_val);
+ }
+
+ smq = otx2_get_smq_idx(pfvf, txq);
+
+ mutex_lock(&mbox->lock);
+ req = otx2_mbox_alloc_msg_nix_txschq_cfg(mbox);
+ if (!req) {
+ mutex_unlock(&mbox->lock);
+ return -ENOMEM;
+ }
+
+ req->lvl = NIX_TXSCH_LVL_MDQ;
+
+ /* MQPRIO exposes only min/max rate, not burst. Pass burst 0 so
+ * otx2_get_egress_burst_cfg() programmes the largest burst the NIX
+ * encoding supports (CN10K_MAX_BURST_SIZE on CN10K). This differs
+ * from the 65536 byte default used in the HTB path, which is a
+ * kernel-side default when no explicit burst is configured, not a
+ * hardware cap.
+ *
+ * Sparse MDQ writes: PIR and CIR are programmed independently. If
+ * maxrate or minrate is zero, the matching register is not written.
+ * When the tc mqprio command omits min_rate or max_rate (or sets a
+ * per-TC rate to zero), the driver leaves the other MDQ shaper
+ * register untouched; any rate previously applied there remains in
+ * hardware until both inputs are zero (full clear) or the register
+ * is written again. Users reconfiguring shaping must supply both
+ * parameters or delete mqprio before applying a new rate profile.
+ */
+ if (maxrate) {
+ req->reg[n] = NIX_AF_MDQX_PIR(smq);
+ rate = otx2_convert_rate(maxrate);
+ req->regval[n] = otx2_get_txschq_rate_regval(pfvf, rate, 0);
+ n++;
+ }
+
+ /* CIR+PIR support is required and checked at mqprio setup. */
+ if (minrate) {
+ req->reg[n] = NIX_AF_MDQX_CIR(smq);
+ rate = otx2_convert_rate(minrate);
+ req->regval[n] = otx2_get_txschq_rate_regval(pfvf, rate, 0);
+ n++;
+ }
+ req->num_regs = n;
+
+ err = otx2_sync_mbox_msg(mbox);
+ mutex_unlock(&mbox->lock);
+ return err;
+}
+
int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for_pfc)
{
u16 (*schq_list)[MAX_TXSCHQ_PER_FUNC];
@@ -650,7 +793,11 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
(u64)hw->smq_link_type);
req->num_regs++;
/* MDQ config */
- parent = schq_list[NIX_TXSCH_LVL_TL4][prio];
+ if (pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED)
+ parent = schq_list[NIX_TXSCH_LVL_TL4][0];
+ else
+ parent = schq_list[NIX_TXSCH_LVL_TL4][prio];
+
req->reg[1] = NIX_AF_MDQX_PARENT(schq);
req->regval[1] = parent << 16;
req->num_regs++;
@@ -778,6 +925,9 @@ int otx2_txsch_alloc(struct otx2_nic *pfvf)
req->schq[NIX_TXSCH_LVL_TL4] = chan_cnt;
}
+ if (pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED)
+ req->schq[NIX_TXSCH_LVL_SMQ] = pfvf->hw.non_qos_queues;
+
rc = otx2_sync_mbox_msg(&pfvf->mbox);
if (rc)
return rc;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index eecee612b7b2c..df175fb149518 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -512,9 +512,14 @@ struct otx2_nic {
#define OTX2_FLAG_REP_MODE_ENABLED BIT_ULL(18)
#define OTX2_FLAG_PORT_UP BIT_ULL(19)
#define OTX2_FLAG_IPSEC_OFFLOAD_ENABLED BIT_ULL(20)
+#define OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED BIT_ULL(21)
u64 flags;
u64 *cq_op_addr;
+ u32 mqprio_flags;
+ u64 *mqprio_min_rate;
+ u64 *mqprio_max_rate;
+
struct bpf_prog *xdp_prog;
struct otx2_qset qset;
struct otx2_hw hw;
@@ -1246,6 +1251,11 @@ dma_addr_t otx2_dma_map_skb_frag(struct otx2_nic *pfvf,
struct sk_buff *skb, int seg, int *len);
void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg);
int otx2_read_free_sqe(struct otx2_nic *pfvf, u16 qidx);
+int otx2_nix_tm_set_queue_shaper(struct otx2_nic *pfvf, int txq,
+ u64 minrate, u64 maxrate);
+int otx2_nix_tm_clear_queue_shaper(struct otx2_nic *pfvf);
+int otx2_mqprio_down(struct otx2_nic *pfvf);
+int otx2_mqprio_up(struct otx2_nic *pfvf);
void otx2_queue_vf_work(struct mbox *mw, struct workqueue_struct *mbox_wq,
int first, int mdevs, u64 intr);
int otx2_del_mcam_flow_entry(struct otx2_nic *nic, u16 entry,
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
index f110dfa423605..676f78d8fb344 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c
@@ -413,6 +413,12 @@ static int otx2_dcbnl_ieee_setpfc(struct net_device *dev, struct ieee_pfc *pfc)
u8 old_pfc_en;
int err;
+ if ((pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED) && pfc->pfc_en) {
+ netdev_err(dev,
+ "PFC: cannot enable while mqprio bandwidth offload is active\n");
+ return -EOPNOTSUPP;
+ }
+
old_pfc_en = pfvf->pfc_en;
pfvf->pfc_en = pfc->pfc_en;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
index a0340f3422bf9..3f494cfbfcee2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -287,6 +287,17 @@ static int otx2_set_channels(struct net_device *dev,
return -EINVAL;
}
+ if ((pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED) &&
+ (channel->tx_count != pfvf->hw.tx_queues ||
+ channel->rx_count != pfvf->hw.rx_queues)) {
+ err = otx2_mqprio_down(pfvf);
+ if (err)
+ return err;
+
+ netdev_info(dev,
+ "Removed mqprio bandwidth offload due to channel count change\n");
+ }
+
if (if_up)
dev->netdev_ops->ndo_stop(dev);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index c995f29008590..a5e9908fa9b55 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1980,6 +1980,10 @@ int otx2_open(struct net_device *netdev)
if (err)
goto err_free_mem;
+ err = otx2_mqprio_up(pf);
+ if (err)
+ goto err_free_hw;
+
/* Register NAPI handler */
for (qidx = 0; qidx < pf->hw.cint_cnt; qidx++) {
cq_poll = &qset->napi[qidx];
@@ -2140,6 +2144,7 @@ int otx2_open(struct net_device *netdev)
free_irq(vec, pf);
err_disable_napi:
otx2_disable_napi(pf);
+err_free_hw:
otx2_free_hw_resources(pf);
err_free_mem:
otx2_free_queue_mem(qset);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
index 0b46ec29e64ea..f7d80d5980d79 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
@@ -16,6 +16,7 @@
#include <net/tc_act/tc_mirred.h>
#include <net/tc_act/tc_vlan.h>
#include <net/ipv6.h>
+#include <net/pkt_sched.h>
#include "cn10k.h"
#include "otx2_common.h"
@@ -59,6 +60,9 @@ static void otx2_get_egress_burst_cfg(struct otx2_nic *nic, u32 burst,
else
*burst_mantissa = tmp / (1ULL << (*burst_exp - 7));
} else {
+ /* burst 0: largest encodable burst (CN10K_MAX_BURST_SIZE on
+ * CN10K), not a minimal burst.
+ */
*burst_exp = MAX_BURST_EXPONENT;
*burst_mantissa = max_mantissa;
}
@@ -1598,14 +1602,341 @@ static int otx2_setup_tc_block(struct net_device *netdev,
nic, nic, ingress);
}
+/* Tear down mqprio bandwidth offload: clear per-queue shapers, TC
+ * mappings, and the rate-limit flag. Used on explicit mqprio teardown
+ * (tc qdisc del), not on internal stop/open cycles such as MTU change.
+ */
+static void otx2_mqprio_free_cache(struct otx2_nic *pfvf)
+{
+ devm_kfree(pfvf->dev, pfvf->mqprio_min_rate);
+ devm_kfree(pfvf->dev, pfvf->mqprio_max_rate);
+ pfvf->mqprio_min_rate = NULL;
+ pfvf->mqprio_max_rate = NULL;
+ pfvf->mqprio_flags = 0;
+}
+
+static int otx2_mqprio_alloc_cache(struct otx2_nic *pfvf)
+{
+ u16 num_txq = pfvf->hw.non_qos_queues;
+
+ otx2_mqprio_free_cache(pfvf);
+
+ pfvf->mqprio_min_rate = devm_kcalloc(pfvf->dev, num_txq,
+ sizeof(*pfvf->mqprio_min_rate),
+ GFP_KERNEL);
+ pfvf->mqprio_max_rate = devm_kcalloc(pfvf->dev, num_txq,
+ sizeof(*pfvf->mqprio_max_rate),
+ GFP_KERNEL);
+ if (!pfvf->mqprio_min_rate || !pfvf->mqprio_max_rate) {
+ otx2_mqprio_free_cache(pfvf);
+ return -ENOMEM;
+ }
+
+ return 0;
+}
+
+static bool otx2_txschq_is_allocated(struct otx2_nic *pfvf)
+{
+ int lvl, idx;
+
+ for (lvl = 0; lvl < NIX_TXSCH_LVL_CNT; lvl++) {
+ for (idx = 0; idx < pfvf->hw.txschq_cnt[lvl]; idx++) {
+ if (pfvf->hw.txschq_list[lvl][idx])
+ return true;
+ }
+ }
+
+ return false;
+}
+
+int otx2_mqprio_down(struct otx2_nic *pfvf)
+{
+ struct net_device *netdev = pfvf->netdev;
+ int err = 0;
+
+ if (!(pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED))
+ return 0;
+
+ if (otx2_txschq_is_allocated(pfvf))
+ err = otx2_nix_tm_clear_queue_shaper(pfvf);
+
+ pfvf->flags &= ~OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED;
+ netdev_set_num_tc(netdev, 0);
+ otx2_mqprio_free_cache(pfvf);
+
+ return err;
+}
+
+int otx2_mqprio_up(struct otx2_nic *pfvf)
+{
+ struct net_device *netdev = pfvf->netdev;
+ int txq, err;
+
+ if (!(pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED))
+ return 0;
+
+ if (!pfvf->mqprio_min_rate || !pfvf->mqprio_max_rate)
+ return 0;
+
+ for (txq = 0; txq < pfvf->hw.non_qos_queues; txq++) {
+ u64 min_rate = 0, max_rate = 0;
+
+ if (pfvf->mqprio_flags & TC_MQPRIO_F_MIN_RATE)
+ min_rate = pfvf->mqprio_min_rate[txq];
+ if (pfvf->mqprio_flags & TC_MQPRIO_F_MAX_RATE)
+ max_rate = pfvf->mqprio_max_rate[txq];
+
+ if (!min_rate && !max_rate)
+ continue;
+
+ err = otx2_nix_tm_set_queue_shaper(pfvf, txq, min_rate,
+ max_rate);
+ if (err) {
+ netdev_err(netdev,
+ "mqprio: failed to restore shaper for txq %d: %d\n",
+ txq, err);
+ return err;
+ }
+ }
+
+ return 0;
+}
+
+/* Restart the netdev to reprogram the TX scheduler hierarchy for mqprio
+ * bandwidth offload. Both mqprio add and delete (when offload was active)
+ * take this path via ndo_stop()/ndo_open() so VF-specific open logic (e.g.
+ * LBK carrier on) runs correctly. The full stop/open cycle clears
+ * carrier, stops all TX queues, tears down IRQs/NAPI and drops in-flight
+ * traffic. If open fails, netif_close() clears IFF_UP and leaves the
+ * interface administratively down.
+ */
+static int otx2_mqprio_restart_netdev(struct net_device *netdev, bool rate_limit)
+{
+ struct otx2_nic *pfvf = netdev_priv(netdev);
+ const struct net_device_ops *ops = netdev->netdev_ops;
+ int err;
+
+ netdev_info(netdev,
+ "mqprio: restarting interface to reprogram TX scheduler; in-flight traffic will be dropped\n");
+
+ err = ops->ndo_stop(netdev);
+ if (err)
+ return err;
+
+ /* Set before ndo_open() so otx2_txsch_alloc() widens SMQ allocation. */
+ if (rate_limit)
+ pfvf->flags |= OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED;
+
+ err = ops->ndo_open(netdev);
+ if (err) {
+ int down_err;
+
+ netdev_err(netdev,
+ "Failed to restart device after mqprio change: %d\n",
+ err);
+ down_err = otx2_mqprio_down(pfvf);
+ if (down_err)
+ netdev_err(netdev,
+ "mqprio: failed to clear shapers after restart error: %d\n",
+ down_err);
+ /* Caller holds netdev/RTNL lock; dev_close() would deadlock. */
+ netif_close(netdev);
+ }
+
+ return err;
+}
+
+static u64 otx2_mqprio_per_queue_rate(u64 rate, u32 qcount)
+{
+ if (!rate || qcount <= 1)
+ return rate;
+
+ return div_u64(rate, qcount);
+}
+
+static int otx2_teardown_tc_mqprio(struct otx2_nic *pfvf,
+ struct tc_mqprio_qopt_offload *mqprio)
+{
+ bool had_mqprio = !!(pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED);
+ struct tc_mqprio_qopt *qopt = &mqprio->qopt;
+ struct net_device *netdev = pfvf->netdev;
+ bool if_up = netif_running(netdev);
+ int down_err, err;
+
+ qopt->hw = 0;
+
+ /* Skip the netdev restart when mqprio offload was not active. */
+ if (!had_mqprio)
+ return 0;
+
+ down_err = otx2_mqprio_down(pfvf);
+
+ if (if_up) {
+ err = otx2_mqprio_restart_netdev(netdev, false);
+ if (err)
+ return err;
+ }
+
+ return down_err;
+}
+
+static int otx2_setup_tc_mqprio(struct net_device *netdev,
+ struct tc_mqprio_qopt_offload *mqprio)
+{
+ struct otx2_nic *pfvf = netdev_priv(netdev);
+ struct tc_mqprio_qopt *qopt = &mqprio->qopt;
+ bool if_up = netif_running(netdev);
+ int tc, txq, err, i;
+
+ if (!if_up) {
+ netdev_err(netdev, "mqprio: setup requires interface UP\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (!qopt->hw)
+ return otx2_teardown_tc_mqprio(pfvf, mqprio);
+
+ if (mqprio->shaper != TC_MQPRIO_SHAPER_BW_RATE) {
+ netdev_err(netdev, "Unsupported mqprio shaper %#x\n", mqprio->shaper);
+ return -EOPNOTSUPP;
+ }
+
+ if (!test_bit(QOS_CIR_PIR_SUPPORT, &pfvf->hw.cap_flag)) {
+ netdev_err(netdev,
+ "mqprio: bandwidth offload requires CIR+PIR support\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (is_otx2_sdp_rep(pfvf->pdev)) {
+ netdev_err(netdev, "mqprio: bandwidth offload not supported on SDP rep\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (otx2_qos_htb_active(pfvf)) {
+ netdev_err(netdev, "mqprio: cannot enable offload while HTB is active\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (pfvf->pfc_en) {
+ netdev_err(netdev,
+ "mqprio: cannot enable offload while PFC is enabled\n");
+ return -EOPNOTSUPP;
+ }
+
+ if (qopt->num_tc > pfvf->hw.non_qos_queues) {
+ netdev_err(netdev, "Number of TCs (%u) exceeds hw queues %u\n",
+ qopt->num_tc, pfvf->hw.non_qos_queues);
+ return -EINVAL;
+ }
+
+ if (pfvf->hw.non_qos_queues > MAX_TXSCHQ_PER_FUNC) {
+ netdev_err(netdev,
+ "Number of queues (%u) exceeds max scheduler queues %u\n",
+ pfvf->hw.non_qos_queues, MAX_TXSCHQ_PER_FUNC);
+ return -EINVAL;
+ }
+
+ for (tc = 0; tc < qopt->num_tc; tc++) {
+ u64 min_rate = 0, max_rate = 0;
+
+ if (mqprio->flags & TC_MQPRIO_F_MIN_RATE)
+ min_rate = mqprio->min_rate[tc];
+ if (mqprio->flags & TC_MQPRIO_F_MAX_RATE)
+ max_rate = mqprio->max_rate[tc];
+
+ if (min_rate && max_rate && min_rate > max_rate) {
+ netdev_err(netdev,
+ "min_rate %llu exceeds max_rate %llu for tc %d\n",
+ min_rate, max_rate, tc);
+ return -EINVAL;
+ }
+
+ for (txq = qopt->offset[tc];
+ txq < qopt->offset[tc] + qopt->count[tc]; txq++) {
+ if (txq >= netdev->real_num_tx_queues)
+ return -EINVAL;
+ }
+ }
+
+ err = otx2_mqprio_restart_netdev(pfvf->netdev, true);
+ if (err)
+ return err;
+
+ err = otx2_mqprio_alloc_cache(pfvf);
+ if (err)
+ goto cleanup;
+
+ pfvf->mqprio_flags = mqprio->flags;
+
+ for (tc = 0; tc < qopt->num_tc; tc++) {
+ u64 min_rate = 0, max_rate = 0;
+ u32 qcount = qopt->count[tc];
+
+ /* Rates omitted from tc mqprio are left at zero; see sparse
+ * MDQ write behaviour in otx2_nix_tm_set_queue_shaper().
+ */
+ if (mqprio->flags & TC_MQPRIO_F_MIN_RATE)
+ min_rate = otx2_mqprio_per_queue_rate(mqprio->min_rate[tc],
+ qcount);
+ if (mqprio->flags & TC_MQPRIO_F_MAX_RATE)
+ max_rate = otx2_mqprio_per_queue_rate(mqprio->max_rate[tc],
+ qcount);
+
+ for (txq = qopt->offset[tc];
+ txq < qopt->offset[tc] + qcount; txq++) {
+ netdev_dbg(netdev,
+ "mqprio: tc %d txq %d min_rate %llu max_rate %llu\n",
+ tc, txq, min_rate, max_rate);
+
+ pfvf->mqprio_min_rate[txq] = min_rate;
+ pfvf->mqprio_max_rate[txq] = max_rate;
+
+ err = otx2_nix_tm_set_queue_shaper(pfvf, txq,
+ min_rate, max_rate);
+ if (err)
+ goto cleanup;
+ }
+ }
+
+ netdev_set_num_tc(netdev, qopt->num_tc);
+ for (i = 0; i < qopt->num_tc; i++)
+ netdev_set_tc_queue(netdev, i, qopt->count[i], qopt->offset[i]);
+
+ qopt->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
+
+ return 0;
+
+cleanup:
+ otx2_teardown_tc_mqprio(pfvf, mqprio);
+ return err;
+}
+
+static int otx2_setup_tc_query_caps(void *type_data)
+{
+ struct tc_query_caps_base *base = type_data;
+ struct tc_mqprio_caps *caps;
+
+ if (base->type != TC_SETUP_QDISC_MQPRIO)
+ return -EOPNOTSUPP;
+
+ caps = base->caps;
+ caps->validate_queue_counts = true;
+
+ return 0;
+}
+
int otx2_setup_tc(struct net_device *netdev, enum tc_setup_type type,
void *type_data)
{
switch (type) {
+ case TC_QUERY_CAPS:
+ return otx2_setup_tc_query_caps(type_data);
case TC_SETUP_BLOCK:
return otx2_setup_tc_block(netdev, type_data);
case TC_SETUP_QDISC_HTB:
return otx2_setup_tc_htb(netdev, type_data);
+ case TC_SETUP_QDISC_MQPRIO:
+ return otx2_setup_tc_mqprio(netdev, type_data);
default:
return -EOPNOTSUPP;
}
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
index 69c0911e28e91..0fa5c65d62213 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
@@ -118,6 +118,9 @@ static void otx2_config_sched_shaping(struct otx2_nic *pfvf,
/* configure PIR */
maxrate = (node->rate > node->ceil) ? node->rate : node->ceil;
+ /* 65536 is the kernel-side default burst when HTB does not supply an
+ * explicit value, not the NIX hardware maximum (CN10K_MAX_BURST_SIZE).
+ */
cfg->regval[*num_regs] =
otx2_get_txschq_rate_regval(pfvf, maxrate, 65536);
(*num_regs)++;
@@ -1729,11 +1732,23 @@ void otx2_qos_config_txschq(struct otx2_nic *pfvf)
otx2_qos_root_destroy(pfvf);
}
+bool otx2_qos_htb_active(struct otx2_nic *pfvf)
+{
+ return otx2_sw_node_find(pfvf, OTX2_QOS_ROOT_CLASSID);
+}
+
int otx2_setup_tc_htb(struct net_device *ndev, struct tc_htb_qopt_offload *htb)
{
struct otx2_nic *pfvf = netdev_priv(ndev);
int res;
+ if ((pfvf->flags & OTX2_FLAG_PER_Q_RATE_LIMIT_ENABLED) &&
+ htb->command != TC_HTB_DESTROY) {
+ NL_SET_ERR_MSG_MOD(htb->extack,
+ "HTB offload cannot be used with mqprio bandwidth offload active");
+ return -EOPNOTSUPP;
+ }
+
switch (htb->command) {
case TC_HTB_CREATE:
return otx2_qos_root_add(pfvf, htb->parent_classid,
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.h b/drivers/net/ethernet/marvell/octeontx2/nic/qos.h
index 221bd0438f603..c777cc42eac9c 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.h
@@ -23,6 +23,7 @@ enum qos_smq_operations {
u64 otx2_get_txschq_rate_regval(struct otx2_nic *nic, u64 maxrate, u32 burst);
int otx2_setup_tc_htb(struct net_device *ndev, struct tc_htb_qopt_offload *htb);
+bool otx2_qos_htb_active(struct otx2_nic *pfvf);
int otx2_qos_get_qid(struct otx2_nic *pfvf);
void otx2_qos_free_qid(struct otx2_nic *pfvf, int qidx);
int otx2_qos_enable_sq(struct otx2_nic *pfvf, int qidx);
|
| 3/2 | 2026/08/06 10:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 11942 output: 35 thoughts: 197 Thoughts: **Assessing the Fuzzing Implications of This Patch** Okay, so this patch landed, and my first thought is, "Does this introduce any new functionality into the kernel that needs to be fuzzed?" The patch touches the `drivers/net/ethernet/marvell/octeontx2/` directory, which immediately tells me we're dealing with a Marvell OcteonTX2 NIC driver. Now, the big question is, "Can we even reach this in a fuzzing environment?" My experience tells me that these vendor-specific network drivers, like the OcteonTX2, often rely on physical hardware – PCIe cards, typically – and aren't properly emulated in a standard QEMU setup. So, the next step is to see if there's an emulator available or if we're dealing with a generic driver implementation that might be more accessible. Seeing the patch modifies files such as `drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c`, `otx2_common.c`, and `otx2_tc.c`, I'm going to start digging into the kernel source and search for `octeontx2` to see what I can find. Understanding the driver's reachability is key to deciding how much effort to put into fuzzing this patch. |
| 4/2 | 2026/08/06 10:38 | tool | grepper |
0mArgs:{
"Expression": "octeontx2",
"PathPrefix": "drivers/net/ethernet/marvell/"
}Results: {
"Output": "drivers/net/ethernet/marvell/Kconfig=169=config SKY2_DEBUG\n--\ndrivers/net/ethernet/marvell/Kconfig-179-\ndrivers/net/ethernet/marvell/Kconfig:180:source \"drivers/net/ethernet/marvell/octeontx2/Kconfig\"\ndrivers/net/ethernet/marvell/Kconfig-181-source \"drivers/net/ethernet/marvell/octeon_ep/Kconfig\"\n--\ndrivers/net/ethernet/marvell/Makefile=15=obj-y\t\t+= octeon_ep_vf/\ndrivers/net/ethernet/marvell/Makefile:16:obj-y\t\t+= octeontx2/\ndrivers/net/ethernet/marvell/Makefile-17-obj-y\t\t+= prestera/\n--\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c-27-\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c:28:#define DEBUGFS_DIR_NAME \"octeontx2\"\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c-29-\n--\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c=4013=static const char *rvu_get_dbg_dir_name(struct rvu *rvu)\n--\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c-4020-\telse\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c:4021:\t\treturn \"octeontx2\";\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c-4022-}\n--\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c-15-\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c:16:#define DRV_NAME \"octeontx2-af\"\ndrivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c-17-\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/Makefile=18=rvu_nicpf-$(CONFIG_XFRM_OFFLOAD) += cn10k_ipsec.o\ndrivers/net/ethernet/marvell/octeontx2/nic/Makefile-19-\ndrivers/net/ethernet/marvell/octeontx2/nic/Makefile:20:ccflags-y += -I$(srctree)/drivers/net/ethernet/marvell/octeontx2/af\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h-17-#include \u003clinux/soc/marvell/silicons.h\u003e\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:18:#include \u003clinux/soc/marvell/octeontx2/asm.h\u003e\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h-19-#include \u003cnet/macsec.h\u003e\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/qos.c=1118=static int otx2_qos_validate_quantum(struct otx2_nic *pfvf, u32 quantum)\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/qos.c-1122-\ndrivers/net/ethernet/marvell/octeontx2/nic/qos.c:1123:\t/* Max Round robin weight supported by octeontx2 and CN10K\ndrivers/net/ethernet/marvell/octeontx2/nic/qos.c-1124-\t * is different. Validate accordingly\n"
} |
| 5/2 | 2026/08/06 10:38 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 13486 output: 73 thoughts: 149 Thoughts: **Assessing the Fuzzability of this Driver** Okay, so this patch is for a Marvell OcteonTX2 network driver. Right away, my radar goes up. This hardware is pretty specific. The immediate question is, is there any QEMU emulation that's going to work for this? Chances are, no, there isn't. I'll quickly double-check – just to be sure – but I'm not expecting to find an `octeontx2` emulator readily available in QEMU. And I didn't. This driver is tied to actual physical hardware. Which means, sadly, it's not going to be fuzzed in a virtualized environment like Google Compute Engine or using a standard QEMU setup. Because of that limitation, I'm going to return `WorthFuzzing=false`. The reasoning is straightforward: the changes are directly tied to that specific Marvell OcteonTX2 network hardware, which means the fuzzing will be inherently tied to a hardware platform that isn't easily accessible. |
| 6/2 | 2026/08/06 10:39 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the Marvell OcteonTX2 network driver, which requires specific physical PCIe hardware not emulated in standard QEMU or GCE environments. Thus, it cannot be fuzzed.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Marvell OcteonTX2 network driver, which requires specific physical PCIe hardware not emulated in standard QEMU or GCE environments. Thus, it cannot be fuzzed.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|