skb metadata like the ->mark while versatile have limited space. Arthur Fabre, Jakub Sitnicki and Jesper Brouer propose what they refer to as "packet traits”, a bespoke key-value store for metadata, optimized for use within the XDP code. User-space access to the store is provided natively through an extension of the Linux Sockets API
In this talk they will present the API features and performance characteristics of the packet traits KV store, backed by the existing packet headroom. They'll also explain how a shared key space, combined with a registration API, addresses the challenges of metadata merging in scenarios like GRO packet coalescing and IP fragment reassembly.
The talk will discuss the user API for reading and writing packet traits and the design of a networking uAPI extension that supports both connection-oriented (TCP) and connectionless (UDP) sockets. The authors invested effort in ensuring ease of adoption by aligning with established Linux networking API patterns.
More details: https://netdevconf.info/0x19/sessions/talk/traits-rich-packet-metadata.html
cheers, jamal