[PATCH] net/iavf: fix segmentation offload buffer size

Ferruh Yigit ferruh.yigit at intel.com
Tue Feb 15 11:06:19 CET 2022


On 2/10/2022 1:09 PM, Radu Nicolau wrote:
> This reverts commit ff8b8bcd2ebe, which resulted in incorrect buffer size
> being computed for TSO packets.
> 
> Fixes: ff8b8bcd2ebe ("net/iavf: fix segmentation offload condition")
> 

Commit 'ff8b8bcd2ebe' was already fixing segmentation offload,
are we having the initial issue back when this patch reverted?
Is there a fix for that initial issue?

+Kevin, Luca,
Since this patch reverts a fix done after 21.11, is there a way
to stop that fix to be merged for 21.11.x?

> Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
> ---
>   drivers/net/iavf/iavf_rxtx.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
> index b0fed1b992..ba272bb211 100644
> --- a/drivers/net/iavf/iavf_rxtx.c
> +++ b/drivers/net/iavf/iavf_rxtx.c
> @@ -2464,9 +2464,10 @@ iavf_fill_data_desc(volatile struct iavf_tx_desc *desc,
>   	desc->buffer_addr = rte_mbuf_data_iova(m);
>   
>   	/* calculate data buffer size less set header lengths */
> -	if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
> -		if (m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
> -			hdrlen += m->outer_l3_len;
> +	if ((m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) &&
> +			(m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG |
> +					RTE_MBUF_F_TX_UDP_SEG))) {
> +		hdrlen += m->outer_l3_len;
>   		if (m->ol_flags & RTE_MBUF_F_TX_L4_MASK)
>   			hdrlen += m->l3_len + m->l4_len;
>   		else



More information about the dev mailing list