[PATCH v5 03/14] net/sxe: add tx rx setup and data path

Stephen Hemminger stephen at networkplumber.org
Thu Jul 17 20:07:36 CEST 2025


On Wed,  9 Jul 2025 21:20:10 -0400
Jie Liu <liujie5 at linkdatatechnology.com> wrote:

> s32 __rte_cold __sxe_rx_queue_mbufs_alloc(struct sxe_rx_queue *rxq)
> +{
> +	struct sxe_rx_buffer *buf_ring = rxq->buffer_ring;
> +	s32 ret = 0;
> +	u64 dma_addr;
> +	u16 i;
> +
> +	for (i = 0; i < rxq->ring_depth; i++) {
> +		volatile union sxe_rx_data_desc *desc;
> +		struct rte_mbuf *mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
> +
> +		if (mbuf == NULL) {
> +			PMD_LOG_ERR(DRV, "rx mbuf alloc failed queue_id=%u",
> +					(u16)rxq->queue_id);
> +			ret = -ENOMEM;
> +			goto l_end;
> +		}
> +

Logging at error level could cause a lot of messages if pool gets exhausted under
load. Better to just have a rx_nombuf statistic.


More information about the dev mailing list