Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-20

Re: [patch net-next] net: hns: add skb_reset_mac_header() after skb being alloc

From: David Miller <davem@davemloft.net>
Date: 2016-06-15 05:41:37
Also in: lkml

From: Yisen Zhuang <redacted>
Date: Mon, 13 Jun 2016 20:41:22 +0800
From: Kejian Yan <redacted>

HNS receives a packet without doing anything, but it should call
skb_reset_mac_header() to initialize the header before using
eth_hdr().

Fixes: 0d6b425a3773c3445b0f51b2f333821beaacb619
Signed-off-by: Kejian Yan <redacted>
Signed-off-by: Yisen Zhuang <redacted>
Well, this patch made me look at this function.

You really shouldn't be filtering packets looped back, that is
the stack's job.  It shouldn't be happening in the driver.

And once you remove that code, this patch here is no longer
necessary.

Second of all, unless you card supports every protocol that
exists in the past, present, and _future_ you cannot set
skb->ip_summed to CHECKSUM_UNNECSSARY unconditionally like
that.

You can only set that for protocols your chip actually supports.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help