[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKh2mn7w8fpSYJQqwxwOiAgzKm_5dtzY_uXG7WK7uO9CXSOTrw@mail.gmail.com>
Date: Thu, 19 Feb 2015 18:58:41 +0000
From: Steve Glendinning <steve@...well.net>
To: netdev <netdev@...r.kernel.org>
Cc: popcorn mix <popcornmix@...il.com>, eric.dumazet@...il.com
Subject: smsc95xx truesize badness
Hi all,
It seems smsc95xx is doing bad things with truesize in our receive loop.
Simplified loop with some bits removed for clarity (handles the
possible case of receiving multiple frames in one USB transaction):
while (skb->len > 0) {
/* last frame in this batch */
if (skb->len == size) {
skb_trim(skb, skb->len - 4); /* remove fcs */
skb->truesize = size + sizeof(struct sk_buff);
return 1;
}
ax_skb = skb_clone(skb, GFP_ATOMIC);
if (unlikely(!ax_skb)) {
netdev_warn(dev->net, "Error allocating skb\n");
return 0;
}
ax_skb->len = size;
ax_skb->data = packet;
skb_set_tail_pointer(ax_skb, size);
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
ax_skb->truesize = size + sizeof(struct sk_buff);
usbnet_skb_return(dev, ax_skb);
}
This is triggering warnings for many Raspberry Pi users due to Eric's
patch to catch truesize offenders. It's a fair cop.
Before I submit a patch to remove these two truesize lines, I believe
it's safe to just do so but can anyone confirm if removing them will
have any adverse impact?
Thanks!
--
Steve Glendinning
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists