diff options
author | Xin Long <lucien.xin@gmail.com> | 2021-01-28 10:18:32 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-30 05:39:14 +0100 |
commit | efa1a65c7e1946ff174c56d36bf015ff9e11c4a1 (patch) | |
tree | bdc8299195caa5024ff2bb1f5ec26827758d3a0d /Kconfig | |
parent | net: support ip generic csum processing in skb_csum_hwoffload_help (diff) | |
download | linux-efa1a65c7e1946ff174c56d36bf015ff9e11c4a1.tar.xz linux-efa1a65c7e1946ff174c56d36bf015ff9e11c4a1.zip |
ip_gre: add csum offload support for gre header
This patch is to add csum offload support for gre header:
On the TX path in gre_build_header(), when CHECKSUM_PARTIAL's set
for inner proto, it will calculate the csum for outer proto, and
inner csum will be offloaded later. Otherwise, CHECKSUM_PARTIAL
and csum_start/offset will be set for outer proto, and the outer
csum will be offloaded later.
On the GSO path in gre_gso_segment(), when CHECKSUM_PARTIAL is
not set for inner proto and the hardware supports csum offload,
CHECKSUM_PARTIAL and csum_start/offset will be set for outer
proto, and outer csum will be offloaded later. Otherwise, it
will do csum for outer proto by calling gso_make_checksum().
Note that SCTP has to do the csum by itself for non GSO path in
sctp_packet_pack(), as gre_build_header() can't handle the csum
with CHECKSUM_PARTIAL set for SCTP CRC csum offload.
v1->v2:
- remove the SCTP part, as GRE dev doesn't support SCTP CRC CSUM
and it will always do checksum for SCTP in sctp_packet_pack()
when it's not a GSO packet.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions