]> git.baikalelectronics.ru Git - kernel.git/commit
udp: better wmem accounting on gso
authorWillem de Bruijn <willemb@google.com>
Thu, 26 Apr 2018 17:42:18 +0000 (13:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Apr 2018 19:08:14 +0000 (15:08 -0400)
commit4274f64f426376868a4a7ff72b18ef3fb2863217
tree93484ddfa8040f5b4a56d2fa5da6ef1b37c2e1ec
parenta388728846a0988eb463834fb4262fd0fa7c141e
udp: better wmem accounting on gso

skb_segment by default transfers allocated wmem from the gso skb
to the tail of the segment list. This underreports real truesize
of the list, especially if the tail might be dropped.

Similar to tcp_gso_segment, update wmem_alloc with the aggregate
list truesize and make each segment responsible for its own
share by setting skb->destructor.

Clear gso_skb->destructor prior to calling skb_segment to skip
the default assignment to tail.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp_offload.c