[PATCH 1/2] node: add global node mbuf dynfield
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Tue Apr  1 16:15:22 CEST 2025
    
    
  
On Tue, 1 Apr 2025 09:50:46 +0530
Nitin Saxena <nsaxena at marvell.com> wrote:
> +int rte_node_mbuf_dynfield_register(void)
> +{
> +	struct node_mbuf_dynfield_mz *f = NULL;
> +	const struct rte_memzone *mz = NULL;
> +	int dyn_offset;
> +
> +	RTE_BUILD_BUG_ON(sizeof(rte_node_mbuf_dynfield_t) < RTE_NODE_MBUF_DYNFIELD_SIZE);
> +	RTE_BUILD_BUG_ON(sizeof(rte_node_mbuf_overload_fields_t) <
> +			 RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE);
> +
> +	mz = rte_memzone_lookup(NODE_MBUF_DYNFIELD_MEMZONE_NAME);
Seems wasteful to have a whole memzone for this, the data is small.
Is there a reason it could not just be a global variable like timestamp.
I would prefer this was a clone of timestamp code, and put in rte_mbuf_dynfield.c
    
    
More information about the dev
mailing list