From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1985BA034C for ; Tue, 8 Mar 2022 15:35:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BE9840E03; Tue, 8 Mar 2022 15:35:33 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id EFA164068B; Tue, 8 Mar 2022 15:35:30 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id s8so13413911pfk.12; Tue, 08 Mar 2022 06:35:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Awqql5E7oK7CGSmwM/0oIjN05YUxu+DKYKxquPnWU0Y=; b=emlpK/PbgnVoiD4JcUzPw08WGbHshrmOv+kKKtDbZLTbkFT9JBq+aBge+GphzjGeqv EXkwBtmUrddtwMuJjUFfq+kGXlBT+8IDJ1rxmmv0iNP+0LjZBN65mCmnF8VPq3DwN/zr vG6CdtSnkPdlhn4AnH4ZdZ/JAA+78KrMcgUizDnZnS8nryllxBaRgfDV3k847gQHa2Gb NI+wuGvhEHnX5F29XUYtOBTLeC+pWxHAedhr8MiHxwT5rw3EbApjA1WTN8cc6uQOHy9i 9fwh9nlD5FWClnUxk1oU0bdTxo+eh4ClNSeRTquCeFgfGv0FzBJ32rVlgC4J6YWpenvj Qfcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Awqql5E7oK7CGSmwM/0oIjN05YUxu+DKYKxquPnWU0Y=; b=xPDgZIepRHagR+qgPR1UU7MxeUrs/TLFxm+Ab4INGsX5M9LIxC8HEc6dlWK8scpkqk KaNpiGneLh2l4cpmdZZsVZgFPB4TSBKxqQ7Wn90aLVQvU4Etm7jpR2yLPyZPSQKgZcaV L5WGsbZ7U5/B+b5nHfkBanz6I3MJIpyso8T9UzktfIhqs39jYlPRnu28KF4v1ls7+RE4 MTqi2Ho5eYFMPc8y1CiTyvcp4aIXkLLjSCLU95Pdiwgi3L6lOJuovF2uDYn/gDbnClqX R5hDdmtYWX9r6byN6vPIdMarmPq1DsIPk+eY/dBbJsa246qIW7ggHy8p5YuyYNWdtyI8 +Lmw== X-Gm-Message-State: AOAM53383gp2fucglfC1dFJkDlvefY36ZON4sxKMzQjrrYNwofzb5N79 ZUOOecb6/kPvhrjjo6Q56lRSqP+IAIsXl78uvOjZJw0A6kY= X-Google-Smtp-Source: ABdhPJxqFbvHico5M0+xzagsadRufH4E0lnQZVQ0EV3Viy+mDqkbxX295r63ZUIl9ZcCK9jfoQU1JTWbNf7jTXiBdQY= X-Received: by 2002:a05:6a00:1705:b0:4f6:e1e4:447e with SMTP id h5-20020a056a00170500b004f6e1e4447emr15861103pfc.16.1646750130005; Tue, 08 Mar 2022 06:35:30 -0800 (PST) MIME-Version: 1.0 References: <20220228082724.1646930-1-baymaxhuang@gmail.com> In-Reply-To: <20220228082724.1646930-1-baymaxhuang@gmail.com> From: Harold Huang Date: Tue, 8 Mar 2022 22:35:18 +0800 Message-ID: Subject: Re: [PATCH] net/tap: do not include l2 header in gso size when compared with mtu To: dev@dpdk.org Cc: ophirmu@mellanox.com, stable@dpdk.org, Keith Wiles , Raslan Darawsheh , jiayu.hu@intel.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Mon, Feb 28, 2022 at 4:27 PM 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@dpdk.org > Signed-off-by: Harold Huang > --- > 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; > } > -- > 2.27.0 > Hi, Jiayu, This is the only example in the driver to use GSO. I think it is important for us to calculate a correct GSO size. I see you are the GSO lib maintainer, could you please help review this patch?