diff options
author | Doron Roberts-Kedes <doronrk@fb.com> | 2018-08-28 16:33:57 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-29 19:57:04 -0700 |
commit | 0927f71dbcfb59131b289d7d518e9472e51d4830 (patch) | |
tree | 1db0618375ce8e2d11e28e25aee8d20d78416387 /drivers/net/ethernet/toshiba/spider_net.h | |
parent | 7e8d5755be0e6c92d3b86a85e54c6a550b1910c5 (diff) | |
download | talos-obmc-linux-0927f71dbcfb59131b289d7d518e9472e51d4830.tar.gz talos-obmc-linux-0927f71dbcfb59131b289d7d518e9472e51d4830.zip |
net/tls: Calculate nsg for zerocopy path without skb_cow_data.
decrypt_skb fails if the number of sg elements required to map it
is greater than MAX_SKB_FRAGS. nsg must always be calculated, but
skb_cow_data adds unnecessary memcpy's for the zerocopy case.
The new function skb_nsg calculates the number of scatterlist elements
required to map the skb without the extra overhead of skb_cow_data.
This patch reduces memcpy by 50% on my encrypted NBD benchmarks.
Reported-by: Vakul Garg <Vakul.garg@nxp.com>
Reviewed-by: Vakul Garg <Vakul.garg@nxp.com>
Tested-by: Vakul Garg <Vakul.garg@nxp.com>
Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/toshiba/spider_net.h')
0 files changed, 0 insertions, 0 deletions