On Fri, 16 Feb 2024 09:10:25 +0530 Kumara Parameshwaran <kumaraparames...@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.