Re: netmap: extension to store user data per packet/slot?

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Tue, 11 Nov 2014 15:00:37 -0800
Franco,
apparently you want some user-defined metadata to move
along with the packet, but i do not think it is
reasonable to put it in the slots.
If we do that, what about timestamps, flow IDs,
interface and queue index and all the rest of the things that
we normally find in an mbuf/skbuf ? This is not
going to scale.

Also consider that at some point you may use a different
arrangement (with packets passed along VALE switches
or physical interfaces etc.) i believe the most
reasonable place to put the extra info is at the end
of the packet and possibly bump the length in the slot
so you are safe in case the packet is copied.

There is no timestamp appended to the packet at the moment,
it was a feature i thought somebody may want to have,
but between the relative scarcity of hardware that provides
per-packet timestamps, and the questionable usefulness
of the same, i doubt it will be available.

cheers
luigi


On Tue, Nov 11, 2014 at 2:01 PM, Franco Fichtner <franco_at_lastsummer.de>
wrote:

>
> On 11 Nov 2014, at 22:48, Adrian Chadd <adrian_at_freebsd.org> wrote:
>
> > Ah, I see. You're missing some unique identifier for each netmap
> > buffer. I thought there was one already. Silly me.
>
> Exactly, and, no, thank you for making clear what is needed.  :)
>
> A little more on this: I think struct netmap_slot is convenient
> due to the fact that in zero-copy one wouldn't want to mess with
> the actual buffer for speed and userland code already touches slot
> internals for each ring transition so there is no performance
> degradation.
>
> The key benefit is that if userland can use this storage freely
> netmap(4) doesn't get in the way of building complex setups that
> require decoupled logic and each ring "hop" may alter the state
> as required.
>
>
> Cheers,
> Franco
>



-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo_at_iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
 TEL      +39-050-2211611               . via Diotisalvi 2
 Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------
Received on Tue Nov 11 2014 - 22:00:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:53 UTC