Skip to content

Commit a056ebc

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Fix HDS and jumbo thresholds for RX packets
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: 3286123 ("bnxt: change receive ring space parameters") Reviewed-by: Mohammad Shuab Siddique <[email protected]> Reviewed-by: Ajit Khaparde <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1abeacc commit a056ebc

File tree

1 file changed

+5
-4
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+5
-4
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5399,15 +5399,16 @@ static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, u16 vnic_id)
53995399
req->flags = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_JUMBO_PLACEMENT);
54005400
req->enables = cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_JUMBO_THRESH_VALID);
54015401

5402-
if (BNXT_RX_PAGE_MODE(bp) && !BNXT_RX_JUMBO_MODE(bp)) {
5402+
if (BNXT_RX_PAGE_MODE(bp)) {
5403+
req->jumbo_thresh = cpu_to_le16(bp->rx_buf_use_size);
5404+
} else {
54035405
req->flags |= cpu_to_le32(VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV4 |
54045406
VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6);
54055407
req->enables |=
54065408
cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID);
5409+
req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh);
5410+
req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh);
54075411
}
5408-
/* thresholds not implemented in firmware yet */
5409-
req->jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh);
5410-
req->hds_threshold = cpu_to_le16(bp->rx_copy_thresh);
54115412
req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
54125413
return hwrm_req_send(bp, req);
54135414
}

0 commit comments

Comments
 (0)