Commit 3f67782e authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'bnxt_en-bug-fixes-for-net'

Michael Chan says:

====================
bnxt_en: Bug fixes for net

The first firmware interface update is needed by the second patch to
limit the number of TSO segments on the 5760X chips.  The third patch
fixes the TX error path for PTP packets.
====================

Link: https://lore.kernel.org/r/20240618215313.29631-1-michael.chan@broadcom.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 88513469 1e796211
...@@ -732,9 +732,6 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -732,9 +732,6 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK; return NETDEV_TX_OK;
tx_dma_error: tx_dma_error:
if (BNXT_TX_PTP_IS_SET(lflags))
atomic_inc(&bp->ptp_cfg->tx_avail);
last_frag = i; last_frag = i;
/* start back at beginning and unmap skb */ /* start back at beginning and unmap skb */
...@@ -756,6 +753,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -756,6 +753,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
tx_free: tx_free:
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
tx_kick_pending: tx_kick_pending:
if (BNXT_TX_PTP_IS_SET(lflags))
atomic_inc(&bp->ptp_cfg->tx_avail);
if (txr->kick_pending) if (txr->kick_pending)
bnxt_txr_db_kick(bp, txr, txr->tx_prod); bnxt_txr_db_kick(bp, txr, txr->tx_prod);
txr->tx_buf_ring[txr->tx_prod].skb = NULL; txr->tx_buf_ring[txr->tx_prod].skb = NULL;
...@@ -8996,6 +8995,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) ...@@ -8996,6 +8995,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
memcpy(vf->mac_addr, resp->mac_address, ETH_ALEN); memcpy(vf->mac_addr, resp->mac_address, ETH_ALEN);
#endif #endif
} }
bp->tso_max_segs = le16_to_cpu(resp->max_tso_segs);
hwrm_func_qcaps_exit: hwrm_func_qcaps_exit:
hwrm_req_drop(bp, req); hwrm_req_drop(bp, req);
...@@ -15363,6 +15363,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -15363,6 +15363,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->priv_flags |= IFF_UNICAST_FLT; dev->priv_flags |= IFF_UNICAST_FLT;
netif_set_tso_max_size(dev, GSO_MAX_SIZE); netif_set_tso_max_size(dev, GSO_MAX_SIZE);
if (bp->tso_max_segs)
netif_set_tso_max_segs(dev, bp->tso_max_segs);
dev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT | dev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
NETDEV_XDP_ACT_RX_SG; NETDEV_XDP_ACT_RX_SG;
......
...@@ -2318,6 +2318,7 @@ struct bnxt { ...@@ -2318,6 +2318,7 @@ struct bnxt {
u8 rss_hash_key_updated:1; u8 rss_hash_key_updated:1;
u16 max_mtu; u16 max_mtu;
u16 tso_max_segs;
u8 max_tc; u8 max_tc;
u8 max_lltc; /* lossless TCs */ u8 max_lltc; /* lossless TCs */
struct bnxt_queue_info q_info[BNXT_MAX_QUEUE]; struct bnxt_queue_info q_info[BNXT_MAX_QUEUE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment