diff --git a/patches.suse/bnxt_en-Fix-HDS-and-jumbo-thresholds-for-RX-packets.patch b/patches.suse/bnxt_en-Fix-HDS-and-jumbo-thresholds-for-RX-packets.patch new file mode 100644 index 0000000..e9b06b7 --- /dev/null +++ b/patches.suse/bnxt_en-Fix-HDS-and-jumbo-thresholds-for-RX-packets.patch @@ -0,0 +1,48 @@ +From: Michael Chan +Date: Mon, 26 Dec 2022 22:19:40 -0500 +Subject: bnxt_en: Fix HDS and jumbo thresholds for RX packets +Patch-mainline: v6.2-rc3 +Git-commit: a056ebcc30e2f78451d66f615d2f6bdada3e6438 +References: bsc#1209079 + +The recent XDP multi-buffer feature has introduced regressions in the +setting of HDS and jumbo thresholds. HDS was accidentally disabled in +the nornmal mode without XDP. This patch restores jumbo HDS placement +when not in XDP mode. In XDP multi-buffer mode, HDS should be disabled +and the jumbo threshold should be set to the usable page size in the +first page buffer. + +Fixes: 32861236190b ("bnxt: change receive ring space parameters") +Reviewed-by: Mohammad Shuab Siddique +Reviewed-by: Ajit Khaparde +Reviewed-by: Andy Gospodarek +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c ++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c +@@ -5371,15 +5371,16 @@ static int bnxt_hwrm_vnic_set_hds(struct + req->flags = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT); + req->enables = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID); + +- if (BNXT_RX_PAGE_MODE(bp) && !BNXT_RX_JUMBO_MODE(bp)) { ++ if (BNXT_RX_PAGE_MODE(bp)) { ++ req->jumbo_thresh = cpu_to_le16(bp->rx_buf_use_size); ++ } else { + req->flags |= cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 | + VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6); + req->enables |= + cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID); ++ req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh); ++ req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh); + } +- /* thresholds not implemented in firmware yet */ +- req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh); +- req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh); + req->vnic_id = cpu_to_le32(vnic->fw_vnic_id); + return hwrm_req_send(bp, req); + } diff --git a/series.conf b/series.conf index 61c1f38..633edc6 100644 --- a/series.conf +++ b/series.conf @@ -36717,6 +36717,7 @@ patches.suse/bnxt_en-Simplify-bnxt_xdp_buff_init.patch patches.suse/bnxt_en-Fix-XDP-RX-path.patch patches.suse/bnxt_en-Fix-first-buffer-size-calculations-for-XDP-m.patch + patches.suse/bnxt_en-Fix-HDS-and-jumbo-thresholds-for-RX-packets.patch patches.suse/net-phy-xgmiitorgmii-Fix-refcount-leak-in-xgmiitorgm.patch patches.suse/dt-bindings-net-sun8i-emac-Add-phy-supply-property.patch patches.suse/net-sched-atm-dont-intepret-cls-results-when-asked-t.patch