]> git.baikalelectronics.ru Git - kernel.git/commit
ip_gre: remove CRC flag from dev features in gre_gso_segment
authorXin Long <lucien.xin@gmail.com>
Sat, 16 Jan 2021 04:44:11 +0000 (12:44 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 Jan 2021 06:15:04 +0000 (22:15 -0800)
commit99aa99c68a9bb90a99f045063332e90a9386a005
tree4966beaae122d2d9a11c444ff2121d83d01a1196
parentfcff6c547c76a1b9c7d773ea01d7c6f9cbbcbd51
ip_gre: remove CRC flag from dev features in gre_gso_segment

This patch is to let it always do CRC checksum in sctp_gso_segment()
by removing CRC flag from the dev features in gre_gso_segment() for
SCTP over GRE, just as it does in Commit 4fc864594a4e ("udp: support
sctp over udp in skb_udp_tunnel_segment") for SCTP over UDP.

It could set csum/csum_start in GSO CB properly in sctp_gso_segment()
after that commit, so it would do checksum with gso_make_checksum()
in gre_gso_segment(), and Commit f60f35d5fc11 ("net: gre: recompute
gre csum for sctp over gre tunnels") can be reverted now.

Note that when need_csum is false, we can still leave CRC checksum
of SCTP to HW by not clearing this CRC flag if it's supported, as
Jakub and Alex noticed.

v1->v2:
  - improve the changelog.
  - fix "rev xmas tree" in varibles declaration.
v2->v3:
  - remove CRC flag from dev features only when need_csum is true.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/00439f24d5f69e2c6fa2beadc681d056c15c258f.1610772251.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/gre_offload.c