* [PATCH v2 -next] net/core/dev: Warn on a too-short GRO frame
@ 2016-04-01 19:58 Aaron Conole
2016-04-01 20:29 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Conole @ 2016-04-01 19:58 UTC (permalink / raw)
To: netdev, Joe Perches
From: Aaron Conole <aconole@bytheb.org>
When signaling that a GRO frame is ready to be processed, the network stack
correctly checks length and aborts processing when a frame is less than 14
bytes. However, such a condition is really indicative of a broken driver,
and should be loudly signaled, rather than silently dropped as the case is
today.
Convert the condition to use net_warn_ratelimited() to ensure the stack
loudly complains about such broken drivers.
Signed-off-by: Aaron Conole <aconole@bytheb.org>
---
v2:
* Convert from WARN_ON to net_warn_ratelimited
net/core/dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index b9bcbe7..1be269e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4663,6 +4663,8 @@ static struct sk_buff *napi_frags_skb(struct napi_struct *napi)
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth = skb_gro_header_slow(skb, hlen, 0);
if (unlikely(!eth)) {
+ net_warn_ratelimited("%s: dropping impossible skb\n",
+ __func__);
napi_reuse_skb(napi, skb);
return NULL;
}
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 -next] net/core/dev: Warn on a too-short GRO frame
2016-04-01 19:58 [PATCH v2 -next] net/core/dev: Warn on a too-short GRO frame Aaron Conole
@ 2016-04-01 20:29 ` Eric Dumazet
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2016-04-01 20:29 UTC (permalink / raw)
To: Aaron Conole; +Cc: netdev, Joe Perches
On Fri, 2016-04-01 at 15:58 -0400, Aaron Conole wrote:
> From: Aaron Conole <aconole@bytheb.org>
>
> When signaling that a GRO frame is ready to be processed, the network stack
> correctly checks length and aborts processing when a frame is less than 14
> bytes. However, such a condition is really indicative of a broken driver,
> and should be loudly signaled, rather than silently dropped as the case is
> today.
>
> Convert the condition to use net_warn_ratelimited() to ensure the stack
> loudly complains about such broken drivers.
>
> Signed-off-by: Aaron Conole <aconole@bytheb.org>
> ---
Shouldn't we give a hint of device name ?
(available in napi->dev->name )
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-01 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 19:58 [PATCH v2 -next] net/core/dev: Warn on a too-short GRO frame Aaron Conole
2016-04-01 20:29 ` Eric Dumazet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.