bnxt_en: Update for net-next
Michael Chan
maintainercover bnxt_en: Update for net-next
The first 4 patches in the series fix issues in the net-next tree introduced in the last 4 weeks. The first 3 patches fix ring accounting and indexing logic. The 4th patch fix TX timeout when the TX ring is very small.
The next 7 patches add new features on the P7 chips, including TX coalesced completions, VXLAN GPE and UDP GSO stateless offload, a new rx_filter_miss counters, and more QP backing store memory for RoCE.
The last 2 patches are PTP improvements.
Damodharam Ammepalli (1):
bnxt_en: add rx_filter_miss extended stats
Michael Chan (8):
bnxt_en: Fix trimming of P5 RX and TX rings
bnxt_en: Fix TX ring indexing logic
bnxt_en: Prevent TX timeout with a very small TX ring
bnxt_en: Support TX coalesced completion on 5760X chips
bnxt_en: Use proper TUNNEL_DST_PORT_ALLOC* commands
bnxt_en: Add support for VXLAN GPE
bnxt_en: Configure UDP tunnel TPA
bnxt_en: Add support for UDP GSO on 5760X chips
Pavan Chebbi (2):
bnxt_en: Skip nic close/open when configuring tstamp filters
bnxt_en: Make PTP TX timestamp HWRM query silent
Selvin Xavier (1):
bnxt_en: Allocate extra QP backing store memory when RoCE FW reports
it
Somnath Kotur (1):
bnxt_en: Fix AGG ring check logic in bnxt_check_rings()
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 155 +++++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 + .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 35 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- 6 files changed, 153 insertions(+), 47 deletions(-)
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 1/13 bnxt_en: Fix trimming of P5 RX and TX rings
The recent commit to trim the RX and TX rings on P5 chips by assigning each with max CP rings divided by 2 is not correct. Max CP rings divided by 2 may be bigger than the original RX or TX and would lead to failure. In other words, we may be checking for increased RX/TX rings than required and it may fail.
Fix it by calling __bnxt_trim_rings() instead that would properly trim RX and TX without the possibility of increasing their values.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +11 -5
@@ -6489,6 +6489,8 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path) } } +static int __bnxt_trim_rings (struct bnxt *bp,int *rx,int *tx,int max, +bool shared);static int bnxt_trim_rings (struct bnxt *bp,int *rx,int *tx,int max,bool shared);
@@ -6532,8 +6534,9 @@ static int bnxt_hwrm_get_rings(struct bnxt *bp)if (bp->flags &BNXT_FLAG_AGG_RINGS ) rx >>=1 ;if (cp < (rx + tx)) { - rx = cp /2 ; - tx = rx; + rc =__bnxt_trim_rings (bp, &rx, &tx, cp, false); +if (rc) +return rc;if (bp->flags &BNXT_FLAG_AGG_RINGS ) rx <<=1 ; hw_resc->resv_rx_rings = rx;
@@ -13885,9 +13888,12 @@ static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx,if (bp->flags &BNXT_FLAG_AGG_RINGS ) *max_rx >>=1 ;if (bp->flags &BNXT_FLAG_CHIP_P5_PLUS ) { -if (*max_cp < (*max_rx + *max_tx)) { - *max_rx = *max_cp /2 ; - *max_tx = *max_rx; +int rc; + + rc =__bnxt_trim_rings (bp, max_rx, max_tx, *max_cp, false); +if (rc) { + *max_rx =0 ; + *max_tx =0 ; }/* On P5 chips, max_cp output param should be available NQs */ *max_cp = max_irq;
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 2/13 bnxt_en: Fix AGG ring check logic in bnxt_check_rings()
In reply to Michael ChanFrom: Somnath Kotur <[email protected]>
_bnxt_get_max_rings() that is invoked in bnxt_check_rings() already accounts for the AGG ring(s) and gives a max value based on that. Increasing for AGG rings before calling _bnxt_get_max_rings() will result in checking for twice the number of rings than required and it can fail. Fix it by adjusting for AGG rings after calling _bnxt_get_max_rings().
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -3
@@ -12724,14 +12724,14 @@ int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs,if (tcs) tx_sets = tcs; -if (bp->flags &BNXT_FLAG_AGG_RINGS ) - rx_rings <<=1 ; -_bnxt_get_max_rings (bp, &max_rx, &max_tx, &max_cp);if (max_rx < rx_rings)return -ENOMEM ; +if (bp->flags &BNXT_FLAG_AGG_RINGS ) + rx_rings <<=1 ; + tx_rings_needed = tx * tx_sets + tx_xdp;if (max_tx < tx_rings_needed)return -ENOMEM ;
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 3/13 bnxt_en: Fix TX ring indexing logic
In reply to Michael ChanTwo spots were missed when modifying the TX ring indexing logic. The use of unmasked TX index in bnxt_tx_int() will cause unnecessary __bnxt_tx_int() calls. The same issue in bnxt_tx_int_xdp() can result in illegal array index.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -1
@@ -781,7 +781,7 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)int i;bnxt_for_each_napi_tx (i, bnapi, txr) { -if (txr->tx_hw_cons != txr->tx_cons) +if (txr->tx_hw_cons !=RING_TX (bp, txr->tx_cons))__bnxt_tx_int (bp, txr, budget); } bnapi->events &= ~BNXT_TX_CMP_EVENT ;
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +1 -1
@@ -173,7 +173,7 @@ void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) bnapi->events &= ~BNXT_TX_CMP_EVENT ;WRITE_ONCE (txr->tx_cons, tx_cons);if (rx_doorbell_needed) { - tx_buf = &txr->tx_buf_ring[last_tx_cons]; + tx_buf = &txr->tx_buf_ring[RING_TX (bp, last_tx_cons)];bnxt_db_write (bp, &rxr->rx_db, tx_buf->rx_prod); }
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 4/13 bnxt_en: Prevent TX timeout with a very small TX ring
In reply to Michael ChanIf xmit_more condition is true, the driver may set the TX_BD_FLAGS_NO_CMPL flag. If after this packet, the TX ring can no longer hold a packet with maximum fragments, we will stop the TX queue. When this happens, we must clear the TX_BD_FLAGS_NO_CMPL flag on the last packet or there will be no completion and cause TX timeout.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -1
@@ -666,8 +666,11 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev) tx_done:if (unlikely (bnxt_tx_avail (bp, txr) <=MAX_SKB_FRAGS +1 )) { -if (netdev_xmit_more () && !tx_buf->is_push) +if (netdev_xmit_more () && !tx_buf->is_push) { + txbd0->tx_bd_len_flags_type &= +cpu_to_le32 (~TX_BD_FLAGS_NO_CMPL );bnxt_txr_db_kick (bp, txr, prod); + }netif_txq_try_stop (txq,bnxt_tx_avail (bp, txr), bp->tx_wake_thresh);
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 5/13 bnxt_en: Support TX coalesced completion on 5760X chips
In reply to Michael ChanTX coalesced completions are supported on newer chips to provide one TX completion record for multiple TX packets up to the sq_cons_idx in the completion record. This method saves PCIe bandwidth by reducing the number of TX completions.
Only very minor changes are now required to support this mode with the new framework that handles TX completions based on the consumer indices.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 +++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +11 -2
@@ -2785,14 +2785,18 @@ static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,*/ dma_rmb (); cmp_type =TX_CMP_TYPE (txcmp); -if (cmp_type ==CMP_TYPE_TX_L2_CMP ) { +if (cmp_type ==CMP_TYPE_TX_L2_CMP || + cmp_type ==CMP_TYPE_TX_L2_COAL_CMP ) {u32 opaque = txcmp->tx_cmp_opaque;struct bnxt_tx_ring_info *txr;u16 tx_freed; txr = bnapi->tx_ring[TX_OPAQUE_RING (opaque)]; event |=BNXT_TX_CMP_EVENT ; - txr->tx_hw_cons =TX_OPAQUE_PROD (bp, opaque); +if (cmp_type ==CMP_TYPE_TX_L2_COAL_CMP ) + txr->tx_hw_cons =TX_CMP_SQ_CONS_IDX (txcmp); +else + txr->tx_hw_cons =TX_OPAQUE_PROD (bp, opaque); tx_freed = (txr->tx_hw_cons - txr->tx_cons) & bp->tx_ring_mask;/* return full budget so NAPI will complete. */
@@ -6068,6 +6072,9 @@ static int hwrm_ring_alloc_send_msg(struct bnxt *bp, req->length =cpu_to_le32 (bp->tx_ring_mask +1 ); req->stat_ctx_id =cpu_to_le32 (grp_info->fw_stats_ctx); req->queue_id =cpu_to_le16 (ring->queue_id); +if (bp->flags &BNXT_FLAG_TX_COAL_CMPL ) + req->cmpl_coal_cnt = +RING_ALLOC_REQ_CMPL_COAL_CNT_COAL_64 ;break ; }case HWRM_RING_ALLOC_RX :
@@ -8279,6 +8286,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) bp->fw_cap |=BNXT_FW_CAP_LIVEPATCH ;if (flags_ext &FUNC_QCAPS_RESP_FLAGS_EXT_BS_V2_SUPPORTED ) bp->fw_cap |=BNXT_FW_CAP_BACKING_STORE_V2 ; +if (flags_ext &FUNC_QCAPS_RESP_FLAGS_EXT_TX_COAL_CMPL_CAP ) + bp->flags |=BNXT_FLAG_TX_COAL_CMPL ; flags_ext2 =le32_to_cpu (resp->flags_ext2);if (flags_ext2 &FUNC_QCAPS_RESP_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED )
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
@@ -2047,6 +2047,7 @@ struct bnxt {#define BNXT_FLAG_CHIP_NITRO_A0 0x1000000#define BNXT_FLAG_DIM 0x2000000#define BNXT_FLAG_ROCE_MIRROR_CAP 0x4000000 +#define BNXT_FLAG_TX_COAL_CMPL 0x8000000#define BNXT_FLAG_PORT_STATS_EXT 0x10000000#define BNXT_FLAG_ALL_CONFIG_FEATS (BNXT_FLAG_TPA | \
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 6/13 bnxt_en: Allocate extra QP backing store memory when RoCE FW reports it
In reply to Michael ChanFrom: Selvin Xavier <[email protected]>
The Fast QP modify destroy RoCE feature requires additional QP entries in QP context backing store. FW reports the extra count to be allocated during backing store query. Use this value and allocate extra memory. Note that this works for both the V1 and V1 backing store FW APIs.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +12 -2
@@ -7535,6 +7535,7 @@ static int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp) ctxm->max_entries =le32_to_cpu (resp->qp_max_entries); ctxm->qp_qp1_entries =le16_to_cpu (resp->qp_min_qp1_entries); ctxm->qp_l2_entries =le16_to_cpu (resp->qp_max_l2_entries); + ctxm->qp_fast_qpmd_entries =le16_to_cpu (resp->fast_qpmd_qp_num_entries); ctxm->entry_size =le16_to_cpu (resp->qp_entry_size);bnxt_init_ctx_initializer (ctxm, init_val, resp->qp_init_offset, (init_mask & (1 << init_idx++)) !=0 );
@@ -7672,6 +7673,9 @@ static int bnxt_hwrm_func_backing_store_cfg(struct bnxt *bp, u32 enables)bnxt_hwrm_set_pg_attr (&ctx_pg->ring_mem, &req->qpc_pg_size_qpc_lvl, &req->qpc_page_dir); + +if (enables &FUNC_BACKING_STORE_CFG_REQ_ENABLES_QP_FAST_QPMD ) + req->qp_num_fast_qpmd_entries =cpu_to_le16 (ctxm->qp_fast_qpmd_entries); }if (enables &FUNC_BACKING_STORE_CFG_REQ_ENABLES_SRQ ) { ctxm = &ctx->ctx_arr[BNXT_CTX_SRQ ];
@@ -8004,6 +8008,7 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp)u32 num_mr, num_ah;u32 extra_srqs =0 ;u32 extra_qps =0 ; +u32 fast_qpmd_qps;u8 pg_lvl =1 ;int i, rc;
@@ -8020,14 +8025,20 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp) ctxm = &ctx->ctx_arr[BNXT_CTX_QP ]; l2_qps = ctxm->qp_l2_entries; qp1_qps = ctxm->qp_qp1_entries; + fast_qpmd_qps = ctxm->qp_fast_qpmd_entries; max_qps = ctxm->max_entries; ctxm = &ctx->ctx_arr[BNXT_CTX_SRQ ]; srqs = ctxm->srq_l2_entries; max_srqs = ctxm->max_entries; + ena =0 ;if ((bp->flags &BNXT_FLAG_ROCE_CAP ) && !is_kdump_kernel ()) { pg_lvl =2 ; extra_qps =min_t (u32,65536 , max_qps - l2_qps - qp1_qps); +/* allocate extra qps if fw supports RoCE fast qp destroy feature */ + extra_qps += fast_qpmd_qps; extra_srqs =min_t (u32,8192 , max_srqs - srqs); +if (fast_qpmd_qps) + ena |=FUNC_BACKING_STORE_CFG_REQ_ENABLES_QP_FAST_QPMD ; } ctxm = &ctx->ctx_arr[BNXT_CTX_QP ];
@@ -8057,7 +8068,6 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp)if (rc)return rc; - ena =0 ;if (!(bp->flags &BNXT_FLAG_ROCE_CAP )) goto skip_rdma;
@@ -8074,7 +8084,7 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp) rc =bnxt_setup_ctxm_pg_tbls (bp, ctxm, num_mr + num_ah,2 );if (rc)return rc; - ena =FUNC_BACKING_STORE_CFG_REQ_ENABLES_MRAV ; + ena |=FUNC_BACKING_STORE_CFG_REQ_ENABLES_MRAV ; ctxm = &ctx->ctx_arr[BNXT_CTX_TIM ]; rc =bnxt_setup_ctxm_pg_tbls (bp, ctxm, l2_qps + qp1_qps + extra_qps,1 );
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 7/13 bnxt_en: Use proper TUNNEL_DST_PORT_ALLOC* commands
In reply to Michael ChanIn bnxt_udp_tunnel_set_port(), use the proper ALLOC commands instead of the FREE commands for correctness. The ALLOC and FREE commands happen to be identical so this is just a cosmetic fix for correctness.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -2
@@ -13673,9 +13673,9 @@ static int bnxt_udp_tunnel_set_port(struct net_device *netdev, unsigned int tablunsigned int cmd;if (ti->type ==UDP_TUNNEL_TYPE_VXLAN ) - cmd =TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN ; + cmd =TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN ;else - cmd =TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE ; + cmd =TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_GENEVE ;return bnxt_hwrm_tunnel_dst_port_alloc (bp, ti->port, cmd); }
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 8/13 bnxt_en: Add support for VXLAN GPE
In reply to Michael ChanAdd a new bnxt_udp_tunnels_p7 struct to support the new P7 chips that can parse VXLAN GPE packets. Add VXLAN GPE tunnel type handling to the .set_port() and .unset_port() functions. .ndo_features_check() is also enhanced to support VXLAN GPE which may encapsulate inner IP packets instead of ethernet packets.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 43 ++++++++++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ 2 files changed, 40 insertions(+), 5 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +38 -5
@@ -5179,6 +5179,11 @@ static int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, u8 tunnel_type) bp->nge_port =0 ; bp->nge_fw_dst_port_id =INVALID_HW_RING_ID ;break ; +case TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN_GPE : + req->tunnel_dst_port_id =cpu_to_le16 (bp->vxlan_gpe_fw_dst_port_id); + bp->vxlan_gpe_port =0 ; + bp->vxlan_gpe_fw_dst_port_id =INVALID_HW_RING_ID ; +break ;default :break ; }
@@ -5222,6 +5227,11 @@ static int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, __be16 port, bp->nge_port = port; bp->nge_fw_dst_port_id =le16_to_cpu (resp->tunnel_dst_port_id);break ; +case TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN_GPE : + bp->vxlan_gpe_port = port; + bp->vxlan_gpe_fw_dst_port_id = +le16_to_cpu (resp->tunnel_dst_port_id); +break ;default :break ; }
@@ -12002,9 +12012,10 @@ static bool bnxt_udp_tunl_check(struct bnxt *bp, struct sk_buff *skb)struct udphdr *uh =udp_hdr (skb);__be16 udp_port = uh->dest; -if (udp_port != bp->vxlan_port && udp_port != bp->nge_port) +if (udp_port != bp->vxlan_port && udp_port != bp->nge_port && + udp_port != bp->vxlan_gpe_port)return false; -if (skb->inner_protocol_type ==ENCAP_TYPE_ETHER ) { +if (skb->inner_protocol ==htons (ETH_P_TEB )) {struct ethhdr *eh =inner_eth_hdr (skb);switch (eh->h_proto) {
@@ -12015,6 +12026,11 @@ static bool bnxt_udp_tunl_check(struct bnxt *bp, struct sk_buff *skb)skb_inner_network_offset (skb), NULL); } + }else if (skb->inner_protocol ==htons (ETH_P_IP )) { +return true; + }else if (skb->inner_protocol ==htons (ETH_P_IPV6 )) { +return bnxt_exthdr_check (bp, skb,skb_inner_network_offset (skb), +NULL ); }return false; }
@@ -13674,8 +13690,10 @@ static int bnxt_udp_tunnel_set_port(struct net_device *netdev, unsigned int tablif (ti->type ==UDP_TUNNEL_TYPE_VXLAN ) cmd =TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN ; -else +else if (ti->type ==UDP_TUNNEL_TYPE_GENEVE ) cmd =TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_GENEVE ; +else + cmd =TUNNEL_DST_PORT_ALLOC_REQ_TUNNEL_TYPE_VXLAN_GPE ;return bnxt_hwrm_tunnel_dst_port_alloc (bp, ti->port, cmd); }
@@ -13688,8 +13706,10 @@ static int bnxt_udp_tunnel_unset_port(struct net_device *netdev, unsigned int taif (ti->type ==UDP_TUNNEL_TYPE_VXLAN ) cmd =TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN ; -else +else if (ti->type ==UDP_TUNNEL_TYPE_GENEVE ) cmd =TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE ; +else + cmd =TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN_GPE ;return bnxt_hwrm_tunnel_dst_port_free (bp, cmd); }
@@ -13703,6 +13723,16 @@ static const struct udp_tunnel_nic_info bnxt_udp_tunnels = { { .n_entries = 1, .tunnel_types = UDP_TUNNEL_TYPE_VXLAN, }, { .n_entries = 1, .tunnel_types = UDP_TUNNEL_TYPE_GENEVE, }, }, +}, bnxt_udp_tunnels_p7 = { + .set_port = bnxt_udp_tunnel_set_port, + .unset_port = bnxt_udp_tunnel_unset_port, + .flags = UDP_TUNNEL_NIC_INFO_MAY_SLEEP | + UDP_TUNNEL_NIC_INFO_OPEN_ONLY, + .tables = { + { .n_entries = 1, .tunnel_types = UDP_TUNNEL_TYPE_VXLAN, }, + { .n_entries = 1, .tunnel_types = UDP_TUNNEL_TYPE_GENEVE, }, + { .n_entries = 1, .tunnel_types = UDP_TUNNEL_TYPE_VXLAN_GPE, }, + }, }; static int bnxt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
@@ -14298,7 +14328,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_GSO_UDP_TUNNEL |NETIF_F_GSO_GRE |NETIF_F_GSO_UDP_TUNNEL_CSUM |NETIF_F_GSO_GRE_CSUM |NETIF_F_GSO_IPXIP4 |NETIF_F_GSO_PARTIAL ; - dev->udp_tunnel_nic_info = &bnxt_udp_tunnels; +if (bp->flags &BNXT_FLAG_CHIP_P7 ) + dev->udp_tunnel_nic_info = &bnxt_udp_tunnels_p7; +else + dev->udp_tunnel_nic_info = &bnxt_udp_tunnels; dev->gso_partial_features =NETIF_F_GSO_UDP_TUNNEL_CSUM |NETIF_F_GSO_GRE_CSUM ;
drivers/net/ethernet/broadcom/bnxt/bnxt.h +2 -0
@@ -2284,8 +2284,10 @@ struct bnxt {u16 vxlan_fw_dst_port_id;u16 nge_fw_dst_port_id; +u16 vxlan_gpe_fw_dst_port_id;__be16 vxlan_port;__be16 nge_port; +__be16 vxlan_gpe_port;u8 port_partition_type;u8 port_count;u16 br_mode;
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 9/13 bnxt_en: Configure UDP tunnel TPA
In reply to Michael ChanOn the new P7 chips, TPA for tunnel packets can be independently enabled for each VNIC. The default TPA configuration should not include UDP tunnels because the UDP ports for these tunnels are not known yet. The chip should not aggregate these UDP tunneled packets using default UDP ports until the ports are known.
Add a new function bnxt_hwrm_vnic_update_tunl_tpa() to enable VXLAN and Geneve TPA if the corresponding UDP ports are known.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 33 +++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 34 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +33 -0
@@ -5150,6 +5150,8 @@ int bnxt_hwrm_func_drv_unrgtr(struct bnxt *bp)return hwrm_req_send (bp, req); } +static int bnxt_set_tpa (struct bnxt *bp,bool set_tpa); +static int bnxt_hwrm_tunnel_dst_port_free (struct bnxt *bp,u8 tunnel_type) {struct hwrm_tunnel_dst_port_free_input *req;
@@ -5192,6 +5194,8 @@ static int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, u8 tunnel_type)if (rc)netdev_err (bp->dev,"hwrm_tunnel_dst_port_free failed. rc:%d\n" , rc); +if (bp->flags &BNXT_FLAG_TPA ) +bnxt_set_tpa (bp, true);return rc; }
@@ -5235,6 +5239,8 @@ static int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, __be16 port,default :break ; } +if (bp->flags &BNXT_FLAG_TPA ) +bnxt_set_tpa (bp, true); err_out:hwrm_req_drop (bp, req);
@@ -5427,6 +5433,30 @@ static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp)return rc; } +#define BNXT_DFLT_TUNL_TPA_BMAP \ + (VNIC_TPA_CFG_REQ_TNL_TPA_EN_BITMAP_GRE | \ + VNIC_TPA_CFG_REQ_TNL_TPA_EN_BITMAP_IPV4 | \ + VNIC_TPA_CFG_REQ_TNL_TPA_EN_BITMAP_IPV6) + +static void bnxt_hwrm_vnic_update_tunl_tpa (struct bnxt *bp, +struct hwrm_vnic_tpa_cfg_input *req) +{ +u32 tunl_tpa_bmap =BNXT_DFLT_TUNL_TPA_BMAP ; + +if (!(bp->fw_cap &BNXT_FW_CAP_VNIC_TUNNEL_TPA )) +return ; + +if (bp->vxlan_port) + tunl_tpa_bmap |=VNIC_TPA_CFG_REQ_TNL_TPA_EN_BITMAP_VXLAN ; +if (bp->vxlan_gpe_port) + tunl_tpa_bmap |=VNIC_TPA_CFG_REQ_TNL_TPA_EN_BITMAP_VXLAN_GPE ; +if (bp->nge_port) + tunl_tpa_bmap |=VNIC_TPA_CFG_REQ_TNL_TPA_EN_BITMAP_GENEVE ; + + req->enables |=cpu_to_le32 (VNIC_TPA_CFG_REQ_ENABLES_TNL_TPA_EN ); + req->tnl_tpa_en_bitmap =cpu_to_le32 (tunl_tpa_bmap); +} +static int bnxt_hwrm_vnic_set_tpa (struct bnxt *bp,u16 vnic_id,u32 tpa_flags) {struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
@@ -5483,6 +5513,7 @@ static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags) req->max_aggs =cpu_to_le16 (max_aggs); req->min_agg_len =cpu_to_le32 (512 ); +bnxt_hwrm_vnic_update_tunl_tpa (bp, req); } req->vnic_id =cpu_to_le16 (vnic->fw_vnic_id);
@@ -5977,6 +6008,8 @@ static int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)else bp->hw_ring_stats_size =BNXT_RING_STATS_SIZE_P7 ; } +if (flags &VNIC_QCAPS_RESP_FLAGS_HW_TUNNEL_TPA_CAP ) + bp->fw_cap |=BNXT_FW_CAP_VNIC_TUNNEL_TPA ; }hwrm_req_drop (bp, req);return rc;
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
@@ -2240,6 +2240,7 @@ struct bnxt {#define BNXT_FW_CAP_DFLT_VLAN_TPID_PCP BIT_ULL(34)#define BNXT_FW_CAP_PRE_RESV_VNICS BIT_ULL(35)#define BNXT_FW_CAP_BACKING_STORE_V2 BIT_ULL(36) +#define BNXT_FW_CAP_VNIC_TUNNEL_TPA BIT_ULL(37)u32 fw_dbg_cap;
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 10/13 bnxt_en: add rx_filter_miss extended stats
In reply to Michael ChanFrom: Damodharam Ammepalli <[email protected]>
rx_filter_miss counter is newly added to the rx_port_stats_ext stats structure for newer chips. Newer firmware will return the structure size that includes this counter. Add this entry to the bnxt_port_stats_ext_arr array and the ethtool -S code will pick up this counter if it is supported.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +1 -0
@@ -461,6 +461,7 @@ static const struct {BNXT_RX_STATS_EXT_DISCARD_COS_ENTRIES ,BNXT_RX_STATS_EXT_ENTRY (rx_fec_corrected_blocks),BNXT_RX_STATS_EXT_ENTRY (rx_fec_uncorrectable_blocks), + BNXT_RX_STATS_EXT_ENTRY(rx_filter_miss), }; static const struct {
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 11/13 bnxt_en: Add support for UDP GSO on 5760X chips
In reply to Michael ChanThe new 5760X chips supports UDP GSO. Tested using udpgso_bench_tx.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 21 ++++++++++++++++++--- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 19 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +18 -3
@@ -587,12 +587,21 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev) txbd1->tx_bd_hsize_lflags = lflags;if (skb_is_gso (skb)) { +bool udp_gso = !!(skb_shinfo (skb)->gso_type &SKB_GSO_UDP_L4 );u32 hdr_len; -if (skb->encapsulation) - hdr_len =skb_inner_tcp_all_headers (skb); -else +if (skb->encapsulation) { +if (udp_gso) + hdr_len =skb_inner_transport_offset (skb) + +sizeof (struct udphdr ); +else + hdr_len =skb_inner_tcp_all_headers (skb); + }else if (udp_gso) { + hdr_len =skb_transport_offset (skb) + +sizeof (struct udphdr ); + }else { hdr_len =skb_tcp_all_headers (skb); + } txbd1->tx_bd_hsize_lflags |= cpu_to_le32(TX_BD_FLAGS_LSO | TX_BD_FLAGS_T_IPID |
@@ -8345,6 +8354,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) flags_ext2 =le32_to_cpu (resp->flags_ext2);if (flags_ext2 &FUNC_QCAPS_RESP_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED ) bp->fw_cap |=BNXT_FW_CAP_RX_ALL_PKT_TS ; +if (flags_ext2 &FUNC_QCAPS_RESP_FLAGS_EXT2_UDP_GSO_SUPPORTED ) + bp->flags |=BNXT_FLAG_UDP_GSO_CAP ; bp->tx_push_thresh =0 ; if ((flags & FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED) &&
@@ -14351,6 +14362,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_GSO_UDP_TUNNEL_CSUM |NETIF_F_GSO_GRE_CSUM |NETIF_F_GSO_PARTIAL |NETIF_F_RXHASH |NETIF_F_RXCSUM |NETIF_F_GRO ; +if (bp->flags &BNXT_FLAG_UDP_GSO_CAP ) + dev->hw_features |=NETIF_F_GSO_UDP_L4 ;if (BNXT_SUPPORTS_TPA (bp)) dev->hw_features |=NETIF_F_LRO ;
@@ -14361,6 +14374,8 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)NETIF_F_GSO_UDP_TUNNEL |NETIF_F_GSO_GRE |NETIF_F_GSO_UDP_TUNNEL_CSUM |NETIF_F_GSO_GRE_CSUM |NETIF_F_GSO_IPXIP4 |NETIF_F_GSO_PARTIAL ; +if (bp->flags &BNXT_FLAG_UDP_GSO_CAP ) + dev->hw_enc_features |=NETIF_F_GSO_UDP_L4 ;if (bp->flags &BNXT_FLAG_CHIP_P7 ) dev->udp_tunnel_nic_info = &bnxt_udp_tunnels_p7;else
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
@@ -2044,6 +2044,7 @@ struct bnxt {#define BNXT_FLAG_MULTI_HOST 0x100000#define BNXT_FLAG_DSN_VALID 0x200000#define BNXT_FLAG_DOUBLE_DB 0x400000 +#define BNXT_FLAG_UDP_GSO_CAP 0x800000#define BNXT_FLAG_CHIP_NITRO_A0 0x1000000#define BNXT_FLAG_DIM 0x2000000#define BNXT_FLAG_ROCE_MIRROR_CAP 0x4000000
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 12/13 bnxt_en: Skip nic close/open when configuring tstamp filters
In reply to Michael ChanFrom: Pavan Chebbi <[email protected]>
We don't have to close and open the nic to make sure we have valid rx timestamps. Once we have the timestamp filter applied to the HW and the timestamp_fld_format bit is cleared in the rx completion and the timestamp is non-zero, we can be sure that rx timestamp is valid data.
Skip close/open when we set any timestamp filter.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 29 +++++++------------ drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h | 2 +- 2 files changed, 11 insertions(+), 20 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +10 -19
@@ -319,15 +319,17 @@ static int bnxt_ptp_cfg_event(struct bnxt *bp, u8 event)return hwrm_req_send (bp, req); } -void bnxt_ptp_cfg_tstamp_filters (struct bnxt *bp) +int bnxt_ptp_cfg_tstamp_filters (struct bnxt *bp) {struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;struct hwrm_port_mac_cfg_input *req; +int rc;if (!ptp || !ptp->tstamp_filters) -return ; +return -EIO ; -if (hwrm_req_init (bp, req,HWRM_PORT_MAC_CFG )) + rc =hwrm_req_init (bp, req,HWRM_PORT_MAC_CFG ); +if (rc) goto out; if (!(bp->fw_cap & BNXT_FW_CAP_RX_ALL_PKT_TS) && (ptp->tstamp_filters &
@@ -342,15 +344,17 @@ void bnxt_ptp_cfg_tstamp_filters(struct bnxt *bp) req->enables =cpu_to_le32 (PORT_MAC_CFG_REQ_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE ); req->rx_ts_capture_ptp_msg_type =cpu_to_le16 (ptp->rxctl); -if (!hwrm_req_send (bp, req)) { + rc =hwrm_req_send (bp, req); +if (!rc) { bp->ptp_all_rx_tstamp = !!(ptp->tstamp_filters &PORT_MAC_CFG_REQ_FLAGS_ALL_RX_TS_CAPTURE_ENABLE ); -return ; +return 0 ; } ptp->tstamp_filters =0 ; out: bp->ptp_all_rx_tstamp =0 ;netdev_warn (bp->dev,"Failed to configure HW packet timestamp filters\n" ); +return rc; }void bnxt_ptp_reapply_pps (struct bnxt *bp)
@@ -494,7 +498,6 @@ static int bnxt_hwrm_ptp_cfg(struct bnxt *bp) {struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;u32 flags =0 ; -int rc =0 ;switch (ptp->rx_filter) {case HWTSTAMP_FILTER_ALL :
@@ -519,19 +522,7 @@ static int bnxt_hwrm_ptp_cfg(struct bnxt *bp) ptp->tstamp_filters = flags; -if (netif_running (bp->dev)) { -if (ptp->rx_filter ==HWTSTAMP_FILTER_ALL ) { - rc =bnxt_close_nic (bp, false, false); -if (!rc) - rc =bnxt_open_nic (bp, false, false); - }else { -bnxt_ptp_cfg_tstamp_filters (bp); - } -if (!rc && !ptp->tstamp_filters) - rc = -EIO ; - } - -return rc; +return bnxt_ptp_cfg_tstamp_filters (bp); }int bnxt_hwtstamp_set (struct net_device *dev,struct ifreq *ifr)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h +1 -1
@@ -137,7 +137,7 @@ do { \int bnxt_ptp_parse (struct sk_buff *skb,u16 *seq_id,u16 *hdr_off);void bnxt_ptp_update_current_time (struct bnxt *bp);void bnxt_ptp_pps_event (struct bnxt *bp,u32 data1,u32 data2); -void bnxt_ptp_cfg_tstamp_filters (struct bnxt *bp); +int bnxt_ptp_cfg_tstamp_filters (struct bnxt *bp);void bnxt_ptp_reapply_pps (struct bnxt *bp);int bnxt_hwtstamp_set (struct net_device *dev,struct ifreq *ifr);int bnxt_hwtstamp_get (struct net_device *dev,struct ifreq *ifr);
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 13/13 bnxt_en: Make PTP TX timestamp HWRM query silent
In reply to Michael ChanFrom: Pavan Chebbi <[email protected]>
In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages.
Silence the error message from the low level hwrm function that sends the firmware message. Change netdev_err() to netdev_WARN_ONCE() if this FW call ever fails.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +3 -3
@@ -129,7 +129,7 @@ static int bnxt_hwrm_port_ts_query(struct bnxt *bp, u32 flags, u64 *ts) } resp =hwrm_req_hold (bp, req); - rc =hwrm_req_send (bp, req); + rc =hwrm_req_send_silent (bp, req);if (!rc) *ts =le64_to_cpu (resp->ptp_msg_ts);hwrm_req_drop (bp, req);
@@ -684,8 +684,8 @@ static void bnxt_stamp_tx_skb(struct bnxt *bp, struct sk_buff *skb) timestamp.hwtstamp =ns_to_ktime (ns);skb_tstamp_tx (ptp->tx_skb, ×tamp); }else { -netdev_err (bp->dev,"TS query for TX timer failed rc = %x\n" , - rc); +netdev_WARN_ONCE (bp->dev, +"TS query for TX timer failed rc = %x\n" , rc); }dev_kfree_skb_any (ptp->tx_skb);
Signature · 1 line
2.30.1
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Mon, 11 Dec 2023 16:51:09 -0800 you wrote:
The first 4 patches in the series fix issues in the net-next tree introduced in the last 4 weeks. The first 3 patches fix ring accounting and indexing logic. The 4th patch fix TX timeout when the TX ring is very small.
The next 7 patches add new features on the P7 chips, including TX coalesced completions, VXLAN GPE and UDP GSO stateless offload, a new
rx_filter_misscounters, and more QP backing store memory for RoCE.[...]
Here is the summary with links:
- [net-next,01/13] bnxt_en: Fix trimming of P5 RX and TX rings
https://git.kernel.org/netdev/net-next/c/f1e50b276d37 - [net-next,02/13] bnxt_en: Fix AGG ring check logic in bnxt_check_rings() https://git.kernel.org/netdev/net-next/c/7fb17a0c18b6 - [net-next,03/13] bnxt_en: Fix TX ring indexing logic https://git.kernel.org/netdev/net-next/c/18fe0a383cca - [net-next,04/13] bnxt_en: Prevent TX timeout with a very small TX ring https://git.kernel.org/netdev/net-next/c/f12f551b5b96 - [net-next,05/13] bnxt_en: Support TX coalesced completion on 5760X chips https://git.kernel.org/netdev/net-next/c/6dea3ebe0d22 - [net-next,06/13] bnxt_en: Allocate extra QP backing store memory when RoCE FW reports it https://git.kernel.org/netdev/net-next/c/297e625bf89e - [net-next,07/13] bnxt_en: Use proper TUNNEL_DST_PORT_ALLOC* commands https://git.kernel.org/netdev/net-next/c/e6f8a5a8ecc9 - [net-next,08/13] bnxt_en: Add support for VXLAN GPE https://git.kernel.org/netdev/net-next/c/77b0fff55dcd - [net-next,09/13] bnxt_en: Configure UDP tunnel TPA https://git.kernel.org/netdev/net-next/c/960096334417 - [net-next,10/13] bnxt_en: add rx_filter_miss extended stats https://git.kernel.org/netdev/net-next/c/6ce30622547d - [net-next,11/13] bnxt_en: Add support for UDP GSO on 5760X chips https://git.kernel.org/netdev/net-next/c/feeef68f6f3d - [net-next,12/13] bnxt_en: Skip nic close/open when configuring tstamp filters https://git.kernel.org/netdev/net-next/c/84793a499578 - [net-next,13/13] bnxt_en: Make PTP TX timestamp HWRM query silent https://git.kernel.org/netdev/net-next/c/056bce63c469
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH net-next 13/13] bnxt_en: Make PTP TX timestamp HWRM query silent
In reply to Michael ChanHello Michael, Pavan,
Quoted 9 lines · Michael Chan
From: Pavan Chebbi <[email protected]>
In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages.
Silence the error message from the low level hwrm function that sends the firmware message. Change
netdev_err()tonetdev_WARN_ONCE()if this FW call ever fails.
This is starting to cause a warning now, which is not ideal, because this error-now-warning happens quite frequently in Meta's fleet.
At the same time, we want to have our kernels running warninglessly. Moreover, the call stack displayed by the warning doesn't seem to be quite useful and doees not help to investigate "the problem", I _think_.
Is it OK to move it back to error, something as:
- netdev_WARN_ONCE(bp->dev,
+ netdev_err_once(bp->dev,
"TS query for TX timer failed rc = %x\n", rc);
Thank you
Pavan Chebbi
maintainerRe: [PATCH net-next 13/13] bnxt_en: Make PTP TX timestamp HWRM query silent
Quoted 23 lines · Breno Leitao
Hello Michael, Pavan,
Quoted 9 lines · Michael Chan
From: Pavan Chebbi <[email protected]>
In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages.
Silence the error message from the low level hwrm function that sends the firmware message. Change
netdev_err()tonetdev_WARN_ONCE()if this FW call ever fails.This is starting to cause a warning now, which is not ideal, because this error-now-warning happens quite frequently in Meta's fleet.
At the same time, we want to have our kernels running warninglessly. Moreover, the call stack displayed by the warning doesn't seem to be quite useful and doees not help to investigate "the problem", I _think_.
Is it OK to move it back to error, something as:
Review
Quoted 3 lines
(quoted diff) +1
-1- netdev_WARN_ONCE(bp->dev, + netdev_err_once(bp->dev, "TS query for TX timer failed rc = %x\n", rc);
Hi Breno, I think it is OK to change.
Would you be submitting a patch for this?
Quoted 2 lines
Thank you
Michael Chan
maintainerRe: [PATCH net-next 13/13] bnxt_en: Make PTP TX timestamp HWRM query silent
Quoted 23 lines · Pavan Chebbi
Quoted 21 lines · Breno Leitao
Hello Michael, Pavan,
Quoted 9 lines · Michael Chan
From: Pavan Chebbi <[email protected]>
In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages.
Silence the error message from the low level hwrm function that sends the firmware message. Change
netdev_err()tonetdev_WARN_ONCE()if this FW call ever fails.This is starting to cause a warning now, which is not ideal, because this error-now-warning happens quite frequently in Meta's fleet.
At the same time, we want to have our kernels running warninglessly. Moreover, the call stack displayed by the warning doesn't seem to be quite useful and doees not help to investigate "the problem", I _think_.
Quoted 9 lines
Review
Quoted 5 lines
Is it OK to move it back to error, something as:
(quoted diff) +1
-1- netdev_WARN_ONCE(bp->dev, + netdev_err_once(bp->dev, "TS query for TX timer failed rc = %x\n", rc);Hi Breno, I think it is OK to change.
Would you be submitting a patch for this?
Why not netdev_warn_once()? It will just print a message at the warning level without the stack trace. I think we consider this condition to be just a warning and not an error. Thanks.
Re: [PATCH net-next 13/13] bnxt_en: Make PTP TX timestamp HWRM query silent
In reply to Pavan ChebbiQuoted 24 lines · Pavan Chebbi
Quoted 23 lines · Breno Leitao
Hello Michael, Pavan,
Quoted 9 lines · Michael Chan
From: Pavan Chebbi <[email protected]>
In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages.
Silence the error message from the low level hwrm function that sends the firmware message. Change
netdev_err()tonetdev_WARN_ONCE()if this FW call ever fails.This is starting to cause a warning now, which is not ideal, because this error-now-warning happens quite frequently in Meta's fleet.
At the same time, we want to have our kernels running warninglessly. Moreover, the call stack displayed by the warning doesn't seem to be quite useful and doees not help to investigate "the problem", I _think_.
Is it OK to move it back to error, something as:
Quoted 7 lines
Review
Quoted 3 lines
(quoted diff) +1
-1- netdev_WARN_ONCE(bp->dev, + netdev_err_once(bp->dev, "TS query for TX timer failed rc = %x\n", rc);Hi Breno, I think it is OK to change.
Would you be submitting a patch for this?
Yes, let me send a patch. I will follow Michael's suggestion and use netdev_warn_once()
Thanks!
Re: [PATCH net-next 13/13] bnxt_en: Make PTP TX timestamp HWRM query silent
In reply to Michael ChanQuoted 30 lines · Michael Chan
Quoted 29 lines · Pavan Chebbi
Quoted 26 lines · Breno Leitao
Hello Michael, Pavan,
Quoted 9 lines · Michael Chan
From: Pavan Chebbi <[email protected]>
In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages.
Silence the error message from the low level hwrm function that sends the firmware message. Change
netdev_err()tonetdev_WARN_ONCE()if this FW call ever fails.This is starting to cause a warning now, which is not ideal, because this error-now-warning happens quite frequently in Meta's fleet.
At the same time, we want to have our kernels running warninglessly. Moreover, the call stack displayed by the warning doesn't seem to be quite useful and doees not help to investigate "the problem", I _think_.
Is it OK to move it back to error, something as:
(quoted diff) +1
-1- netdev_WARN_ONCE(bp->dev, + netdev_err_once(bp->dev, "TS query for TX timer failed rc = %x\n", rc);
Quoted 7 lines
Quoted 3 lines
Hi Breno, I think it is OK to change.
Would you be submitting a patch for this?Why not
netdev_warn_once()? It will just print a message at the warning level without the stack trace. I think we consider this condition to be just a warning and not an error. Thanks.
This is even better. I will send a patch shortly.
Thanks