]> git.baikalelectronics.ru Git - kernel.git/commit
inet: Refactor INET_ECN_decapsulate()
authorIdo Schimmel <idosch@mellanox.com>
Wed, 17 Oct 2018 08:53:12 +0000 (08:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2018 00:45:07 +0000 (17:45 -0700)
commit707fe114742306992e338b9d46a8c569de08c60c
tree3a380928f8708c44c877984467d8cb065661d784
parentf31cf6ee1efe35d637380ad22ff9ca36d5c58085
inet: Refactor INET_ECN_decapsulate()

Drivers that support tunnel decapsulation (IPinIP or NVE) need to
configure the underlying device to conform to the behavior outlined in
RFC 6040 with respect to the ECN bits.

This behavior is implemented by INET_ECN_decapsulate() which requires an
skb to be passed where the ECN CE bit can be potentially set. Since
these drivers do not need to mark an skb, but only configure the device
to do so, factor out the business logic to __INET_ECN_decapsulate() and
potentially perform the marking in INET_ECN_decapsulate().

This allows drivers to invoke __INET_ECN_decapsulate() and configure the
device.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Suggested-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_ecn.h