[dpdk-dev] [PATCH v4] node: switch IPv4 metadata to dynamic mbuf field

Thomas Monjalon thomas at monjalon.net
Wed Oct 28 19:07:38 CET 2020


28/10/2020 11:24, Van Haaren, Harry:
> From: Thomas Monjalon
> > > +	IP4_LOOKUP_NODE_PRIV1_OFF(node->ctx) = node_mbuf_priv1_dynfield_offset;
> > 
> > That's interesting.
> > You copy the offset in the node context for better performance.
> > How much is it better than with global offset variable?
> > How much it decreases compared to a static mbuf field?
> 
> Also interested in this topic, I'll offer the logical/theory point of view;
> 
> With a static field, the offset into the mbuf can be encoded in the instruction
> stream, meaning there are no d-cache loads to identify particular dynamic field.
> 
> With a static/global variable, the cache line where the value resides is presumably
> not hot in cache per burst (assuming an application that does significant work, so not
> in cache since last burst). Hence overhead estimate could be 1x cache line load per burst.

Would it help to group all dynfields and dynflags offsets
in the same cache line?





More information about the dev mailing list