[PATCH v7] app/testpmd : fix packets not getting flushed in heavy-weight mode API

Stephen Hemminger stephen at networkplumber.org
Fri Feb 16 05:13:54 CET 2024


On Fri, 16 Feb 2024 09:10:25 +0530
Kumara Parameshwaran <kumaraparamesh92 at gmail.com> wrote:

> +#ifndef RTE_LIB_GRO
>  		return false;
> +#else
> +		gro_enable = gro_ports[fs->rx_port].enable;
> +		/*
> +		 * Make sure that in case of Heavyweight mode GRO the packets in
> +		 * GRO cache should be flushed as the timer could have expired.
> +		 *
> +		 * The order of condidtions should be the same as gro_ctx is valid

Run spell check on the comments please

> +		 * only when gro_flush_cycles is not the GRO_DEFAULT_FLUSH_CYCLES which
> +		 * indicates ligth weight mode GRO
> +		 */
> +		if (!gro_enable || (gro_flush_cycles == GRO_DEFAULT_FLUSH_CYCLES) ||
> +			(rte_gro_get_pkt_count(current_fwd_lcore()->gro_ctx) == 0))
> +			return false;
> +#endif

FYI - Linux kernel GRO does a flush when ever NAPI finishes. Pretty much equivalent
to this but flushes more frequently.


More information about the dev mailing list