History

net: bcmgenet: suppress warnings on failed Rx SKB allocations

The driver is designed to drop Rx packets and reclaim the buffers when an allocation fails, and the network interface needs to safely handle this packet loss. Therefore, an allocation failure of Rx SKBs is relatively benign. However, the output of the warning message occurs with a high scheduling priority that can cause excessive jitter/latency for other high priority processing. This commit suppresses the warning messages to prevent scheduling problems while retaining the failure count in the statistics of the network interface.

Doug Berger committed 6 years ago

Commit ecaeceb1 parent 7f327081 file · +2 −1Browse files

Unified · Split

drivers/net/ethernet/broadcom/genet/bcmgenet.c+2−1
@@ -1624,7 +1624,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv, · 1623 unmodified lines
1624 dma_addr_t mapping;1624 dma_addr_t mapping;
1625 1625
1626 /* Allocate a new Rx skb */1626 /* Allocate a new Rx skb */
1627 skb = netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT);1627 skb = __netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT,
1628 GFP_ATOMIC | __GFP_NOWARN);
1628 if (!skb) {1629 if (!skb) {
1629 priv->mib.alloc_rx_buff_failed++;1630 priv->mib.alloc_rx_buff_failed++;
1630 netif_err(priv, rx_err, priv->dev,1631 netif_err(priv, rx_err, priv->dev,