Page MenuHomeFreeBSD

mbuf: add a way to mark flowid as calculated from the internal headers
ClosedPublic

Authored by kib on Feb 18 2021, 2:10 PM.
Tags
None
Referenced Files
F102858207: D28773.id84198.diff
Mon, Nov 18, 2:10 AM
Unknown Object (File)
Oct 15 2024, 8:36 PM
Unknown Object (File)
Oct 15 2024, 1:51 AM
Unknown Object (File)
Oct 5 2024, 1:32 AM
Unknown Object (File)
Oct 2 2024, 5:54 AM
Unknown Object (File)
Sep 30 2024, 7:22 AM
Unknown Object (File)
Sep 30 2024, 5:31 AM
Unknown Object (File)
Sep 25 2024, 12:47 PM

Details

Summary

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.

Sponsored by: Nvidia Networking / Mellanox Technologies

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Feb 18 2021, 2:10 PM
sys/sys/mbuf.h
561

M_HASHTYPE_GET(m) -> (m)->m_pkthdr.rsstype

Then you save an AND operation.

kib marked an inline comment as done.Feb 18 2021, 2:35 PM
kib added inline comments.
sys/sys/mbuf.h
561

I am sure that compiler does not generate to ands there, but ok.

kib marked an inline comment as done.

Hans suggestion, unwind one level of macro.

ae added inline comments.
sys/kern/uipc_mbuf.c
866

s/In/If/

This revision is now accepted and ready to land.Feb 18 2021, 2:46 PM
kib marked an inline comment as done.Feb 18 2021, 3:02 PM