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
Unknown Object (File)
Feb 26 2024, 3:05 AM
Unknown Object (File)
Jan 12 2024, 2:49 AM
Unknown Object (File)
Dec 23 2023, 12:05 AM
Unknown Object (File)
Dec 16 2023, 1:41 PM
Unknown Object (File)
Nov 21 2023, 4:54 AM
Unknown Object (File)
Nov 10 2023, 1:55 AM
Unknown Object (File)
Nov 7 2023, 3:09 PM
Unknown Object (File)
Nov 5 2023, 5:09 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 Skipped
Unit
Tests Skipped

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