Skip to content
Commit 0780b414 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Jakub Kicinski
Browse files

inet_ecn: Use csum16_add() helper for IP_ECN_set_* helpers



Jakub pointed out that the IP_ECN_set* helpers basically open-code
csum16_add(), so let's switch them over to using the helper instead.

v2:
- Use __be16 for check_add stack variable in IP_ECN_set_ce() (kbot)
v3:
- Turns out we need __force casts to do arithmetic on __be16 types

Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
Tested-by: default avatarJonathan Morton <chromatix99@gmail.com>
Tested-by: default avatarPete Heist <pete@heistp.net>
Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20201211142638.154780-1-toke@redhat.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 989a1db0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment