Re: [net PatchV3] Octeontx2-vf: Fix max packet length errors

From: Andrew Lunn
Date: Mon Jul 21 2025 - 09:58:27 EST


On Mon, Jul 21, 2025 at 02:28:15PM +0530, Hariprasad Kelam wrote:
> Implement packet length validation before submitting packets to
> the hardware to prevent MAXLEN_ERR. Increment tx_dropped counter
> on failure.

Sorry, i did not look at previous versions of this patch, so i might
be asking a question some other Reviewer already asked.

How expensive is MAXLEN_ERR? What do you need to do when it happens?

I would _guess_ that if ndev->mtu is set correctly, and any change to
it validated, you are going to get very few packets which are too big.

Is it better to introduce this test on the hot path which effects
every single packet, or just deal with MAXLEN_ERR if it ever actually
happens, so leaving the hot path optimised for the common case?

Maybe you could include something about this in the commit message?

Andrew