|
@@ -2180,9 +2180,13 @@ nfp_net_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring)
|
|
|
|
|
|
tx_ring->size = array_size(tx_ring->cnt, sizeof(*tx_ring->txds));
|
|
|
tx_ring->txds = dma_zalloc_coherent(dp->dev, tx_ring->size,
|
|
|
- &tx_ring->dma, GFP_KERNEL);
|
|
|
- if (!tx_ring->txds)
|
|
|
+ &tx_ring->dma,
|
|
|
+ GFP_KERNEL | __GFP_NOWARN);
|
|
|
+ if (!tx_ring->txds) {
|
|
|
+ netdev_warn(dp->netdev, "failed to allocate TX descriptor ring memory, requested descriptor count: %d, consider lowering descriptor count\n",
|
|
|
+ tx_ring->cnt);
|
|
|
goto err_alloc;
|
|
|
+ }
|
|
|
|
|
|
tx_ring->txbufs = kvcalloc(tx_ring->cnt, sizeof(*tx_ring->txbufs),
|
|
|
GFP_KERNEL);
|
|
@@ -2334,9 +2338,13 @@ nfp_net_rx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_rx_ring *rx_ring)
|
|
|
rx_ring->cnt = dp->rxd_cnt;
|
|
|
rx_ring->size = array_size(rx_ring->cnt, sizeof(*rx_ring->rxds));
|
|
|
rx_ring->rxds = dma_zalloc_coherent(dp->dev, rx_ring->size,
|
|
|
- &rx_ring->dma, GFP_KERNEL);
|
|
|
- if (!rx_ring->rxds)
|
|
|
+ &rx_ring->dma,
|
|
|
+ GFP_KERNEL | __GFP_NOWARN);
|
|
|
+ if (!rx_ring->rxds) {
|
|
|
+ netdev_warn(dp->netdev, "failed to allocate RX descriptor ring memory, requested descriptor count: %d, consider lowering descriptor count\n",
|
|
|
+ rx_ring->cnt);
|
|
|
goto err_alloc;
|
|
|
+ }
|
|
|
|
|
|
rx_ring->rxbufs = kvcalloc(rx_ring->cnt, sizeof(*rx_ring->rxbufs),
|
|
|
GFP_KERNEL);
|