summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-04-19 08:49:29 -0700
committerDavid S. Miller <davem@davemloft.net>2018-05-04 11:59:19 -0400
commit2d943adf860302a4c7bfee498e64ded9fe7d9dba (patch)
treec41bf16890c1891a6f5b4db0b1fb5a8945f0c0d7 /tools
parenta8d7d124941973d3de9f388ead826a40929d8707 (diff)
downloadlinux-2d943adf860302a4c7bfee498e64ded9fe7d9dba.tar.gz
net/mlx4_en: optimizes get_fixed_ipv6_csum()
While trying to support CHECKSUM_COMPLETE for IPV6 fragments,
I had to experiments various hacks in get_fixed_ipv6_csum().
I must admit I could not find how to implement this :/

However, get_fixed_ipv6_csum() does a lot of redundant operations,
calling csum_partial() twice.

First csum_partial() computes the checksum of saddr and daddr,
put in @csum_pseudo_hdr. Undone later in the second csum_partial()
computed on whole ipv6 header.

Then nexthdr is added once, added a second time, then substracted.

payload_len is added once, then substracted.

Really all this can be reduced to two add_csum(), to add back 6 bytes
that were removed by mlx4 when providing hw_checksum in RX descriptor.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions