[PATCH] net/tap: do not include l2 header in gso size when compared with mtu

Ferruh Yigit ferruh.yigit at intel.com
Fri Mar 4 17:30:44 CET 2022


On 2/28/2022 8:27 AM, Harold Huang wrote:
> The gso size is calculated with all of the headers and payload. As a
> result, the l2 header should not be included when comparing gso size
> with mtu.
> 
> Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")
> Cc: stable at dpdk.org
> Signed-off-by: Harold Huang <baymaxhuang at gmail.com>
> ---
>   drivers/net/tap/rte_eth_tap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index f1b48cae82..2b561d232c 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -731,7 +731,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
>   					mbuf_in->l4_len;
>   			tso_segsz = mbuf_in->tso_segsz + hdrs_len;
>   			if (unlikely(tso_segsz == hdrs_len) ||
> -				tso_segsz > *txq->mtu) {
> +				tso_segsz > *txq->mtu + mbuf_in->l2_len) {
>   				txq->stats.errs++;
>   				break;
>   			}

update emails for Ophir & Raslan.

Hi Ophir, since original code is from you can you please
help on review?


More information about the stable mailing list