diff options
author | David Lebrun <david.lebrun@uclouvain.be> | 2017-03-24 12:46:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-25 00:47:32 +0300 |
commit | 19d5a26f5ef8de5dcb78799feaf404d717b1aac3 (patch) | |
tree | 5b1e1fd537d9b54bf63e6d3168b1f8f62c92ee22 /.gitignore | |
parent | 3b1af93cf193ca4a94df5f01f480a9d820a194bb (diff) | |
download | linux-19d5a26f5ef8de5dcb78799feaf404d717b1aac3.tar.xz |
ipv6: sr: expand skb head only if necessary
To insert or encapsulate a packet with an SRH, we need a large enough skb
headroom. Currently, we are using pskb_expand_head to inconditionally increase
the size of the headroom by the amount needed by the SRH (and IPv6 header).
If this reallocation is performed by another CPU than the one that initially
allocated the skb, then when the initial CPU kfree the skb, it will enter the
__slab_free slowpath, impacting performances.
This patch replaces pskb_expand_head with skb_cow_head, that will reallocate the
skb head only if the headroom is not large enough.
Performances for SRH encapsulation before the patch:
Result: OK: 7348320(c7347271+d1048) usec, 5000000 (1000byte,0frags)
680427pps 5443Mb/sec (5443416000bps) errors: 0
Performances after the patch:
Result: OK: 5656067(c5655678+d388) usec, 5000000 (1000byte,0frags)
884006pps 7072Mb/sec (7072048000bps) errors: 0
Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions