Skip to content

Commit 8e66b35

Browse files
author
Ken Cox
committed
bnxt_en: Set TSO max segs on devices with limits
JIRA: https://issues.redhat.com/browse/RHEL-19811 JIRA: https://issues.redhat.com/browse/RHEL-23120 JIRA: https://issues.redhat.com/browse/RHEL-25505 commit b7bfcb4 Author: Michael Chan <michael.chan@broadcom.com> Date: Tue Jun 18 14:53:12 2024 -0700 bnxt_en: Set TSO max segs on devices with limits Firmware will now advertise a non-zero TSO max segments if the device has a limit. 0 means no limit. The latest 5760X chip (early revs) has a limit of 2047 that cannot be exceeded. If exceeded, the chip will send out just a small number of segments. Call netif_set_tso_max_segs() if the device has a limit. Fixes: 2012a6a ("bnxt_en: Add 5760X (P7) PCI IDs") Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://lore.kernel.org/r/20240618215313.29631-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Ken Cox <jkc@redhat.com>
1 parent 1fcbb4e commit 8e66b35

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8340,6 +8340,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
83408340
memcpy(vf->mac_addr, resp->mac_address, ETH_ALEN);
83418341
#endif
83428342
}
8343+
bp->tso_max_segs = le16_to_cpu(resp->max_tso_segs);
83438344

83448345
hwrm_func_qcaps_exit:
83458346
hwrm_req_drop(bp, req);
@@ -14299,6 +14300,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1429914300
dev->priv_flags |= IFF_UNICAST_FLT;
1430014301

1430114302
netif_set_tso_max_size(dev, GSO_MAX_SIZE);
14303+
if (bp->tso_max_segs)
14304+
netif_set_tso_max_segs(dev, bp->tso_max_segs);
1430214305

1430314306
dev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
1430414307
NETDEV_XDP_ACT_RX_SG;

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,6 +2165,7 @@ struct bnxt {
21652165
#define BNXT_RSS_CAP_RSS_TCAM BIT(3)
21662166

21672167
u16 max_mtu;
2168+
u16 tso_max_segs;
21682169
u8 max_tc;
21692170
u8 max_lltc; /* lossless TCs */
21702171
struct bnxt_queue_info q_info[BNXT_MAX_QUEUE];

0 commit comments

Comments
 (0)