[PATCH v2 1/2] net/memif: add a Rx fast path
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Fri Jul  1 18:51:53 CEST 2022
    
    
  
On Fri,  1 Jul 2022 10:28:14 +0000
Joyce Kong <joyce.kong at arm.com> wrote:
>  	n_slots = last_slot - cur_slot;
> +	if (likely(mbuf_size >= pmd->cfg.pkt_buffer_size)) {
> +		while (n_slots && n_rx_pkts < nb_pkts) {
> +			mbuf_head = rte_pktmbuf_alloc(mq->mempool);
> +			if (unlikely(mbuf_head == NULL))
> +				goto no_free_bufs;
> +			mbuf = mbuf_head;
> +
> +next_slot1:
> +			mbuf->port = mq->in_port;
> +			s0 = cur_slot & mask;
> +			d0 = &ring->desc[s0];
>  
You might get additional speedup by doing bulk allocation.
If you know you are going to get N packets than rte_pktmbuf_alloc_bulk()
might speed it up?
    
    
More information about the dev
mailing list