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)
Wed, Sep 25, 12:47 PM
Unknown Object (File)
Wed, Sep 18, 7:50 PM
Unknown Object (File)
Wed, Sep 18, 9:31 AM
Unknown Object (File)
Fri, Sep 13, 2:50 AM
Unknown Object (File)
Fri, Sep 13, 2:50 AM
Unknown Object (File)
Fri, Sep 13, 2:50 AM
Unknown Object (File)
Fri, Sep 13, 2:50 AM
Unknown Object (File)
Fri, Sep 13, 2:48 AM

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