Thread (8 messages) flat view 8 messages, 3 authors, 2018-11-01

Re: [Patch net] net: make pskb_trim_rcsum_slow() robust

From: Eric Dumazet <hidden>
Date: 2018-10-30 11:16:37


On 10/29/2018 07:21 PM, Cong Wang wrote:
On Mon, Oct 29, 2018 at 7:14 PM Eric Dumazet [off-list ref] wrote:
quoted
Would not it be simpler to set ip_summed to CHECKSUM_NONE (no need to save old_csum) ?
For !CHECKSUM_COMPLETE, ip_summed should be untouched, right?

If you mean only setting to CHECKSUM_NONE for CHECKSUM_COMPLETE case,
the end result may not be simpler.
I meant to reinstate what was there before my patch in this error case

       if (skb->ip_summed == CHECKSUM_COMPLETE)
               skb->ip_summed = CHECKSUM_NONE;

That would only be run in error (quite unlikely) path, instead of saving old_csum in all cases.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help