Thread (5 messages) flat view 5 messages, 2 authors, 2013-06-17

Re: [PATCH v4] ethernet/arc/arc_emac - Add new driver

From: Joe Perches <hidden>
Date: 2013-06-16 07:41:35
Also in: lkml, netdev

On Sat, 2013-06-15 at 20:47 +0000, Alexey Brodkin wrote:
On 06/16/2013 12:37 AM, Joe Perches wrote:
quoted
On Sun, 2013-06-16 at 00:20 +0400, Alexey Brodkin wrote:
[]
quoted
quoted
+static int arc_emac_rx(struct net_device *ndev, int budget)
[]
quoted
+		/* Prepare the BD for next cycle */
+		rx_buff->skb = netdev_alloc_skb_ip_align(ndev, buflen);
+		if (unlikely(!rx_buff->skb)) {
+			if (net_ratelimit())
+				netdev_err(ndev, "cannot allocate skb\n");
Unnecessary OOM message, might as well remove it.
rx_dropped gives the same info.
With all those error messages I wanted to make life easier (especially 
for me) if errors appear. User will immediately know where problem 
happened. Indeed "rx_dropped" (when it is used only once in driver) may 
show where issue happened, but if later at some point "rx_dropped" will 
be incremented in other locations then user won't understand immediately 
where error happened.
Alloc errors emit a dump_stack() already so this is redundant.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help