]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mbuf: add a way to mark flowid as calculated from the internal headers
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 12 Feb 2021 13:38:07 +0000 (15:38 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Wed, 31 Mar 2021 11:38:26 +0000 (14:38 +0300)
commite243367b644562c9410b39f8d78dafdb7e785d85
tree583e7b68aefa96384ecc5624b8371b5ecd62af0f
parent646bae45e102df9fad5a1efa84b4c31f0e26d2cb
mbuf: add a way to mark flowid as calculated from the internal headers

In some settings offload might calculate hash from decapsulated packet.
Reserve a bit in packet header rsstype to indicate that.

Add m_adj_decap() that acts similarly to m_adj, but also either clear
flowid if it is not marked as inner, or transfer it to the decapsulated
header, clearing inner indicator. It depends on the internals of m_adj()
that reuses the argument packet header for the result.

Use m_adj_decap() for decapsulating vxlan(4) and gif(4) input packets.

Reviewed by: ae, hselasky, np
Sponsored by: Nvidia Networking / Mellanox Technologies
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D28773
sys/kern/uipc_mbuf.c
sys/net/if_gif.c
sys/net/if_vxlan.c
sys/sys/mbuf.h