Thread (15 messages) flat view 15 messages, 6 authors, 2014-12-11

Re: [PATCH 2/2] gianfar: handle map error in gfar_start_xmit()

From: David Miller <davem@davemloft.net>
Date: 2014-12-09 20:39:11
Also in: lkml

From: Arseny Solokha <redacted>
Date: Fri,  5 Dec 2014 17:37:54 +0700
quoted hunk ↗ jump to hunk
@@ -2296,6 +2296,12 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 						   0,
 						   frag_len,
 						   DMA_TO_DEVICE);
+			if (unlikely(dma_mapping_error(priv->dev, bufaddr))) {
+				/* As DMA mapping failed, pretend the TX path
+				 * is busy to retry later
+				 */
+				return NETDEV_TX_BUSY;
+			}
You are not "busy", you are dropping the packet due to insufficient system
resources.

Therefore the appropriate thing to do is to free the SKB, increment
the drop statistical counter, and return NETDEV_TX_OK.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help