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 475FFA0353 for ; Mon, 28 Feb 2022 09:27:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 364584115F; Mon, 28 Feb 2022 09:27:59 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 4C4E64068A; Mon, 28 Feb 2022 09:27:57 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id p17so10051934plo.9; Mon, 28 Feb 2022 00:27:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ptxedf92cM0xqHaJzE66H1LhiRTMxkYMHYaD3BC2HRs=; b=N8vQciSTRcl1mxvNj8U1t3YyFloHYW6GG9aHJCTSic1gPUh9cvruDIyP/kNulX/XjY hueTs8jluG54OrPe6twhFWEZad4PI4BZ5nToSSmFfMsoBMsyQ6E14XOKYDzXOhbTK9Xa iEbDxLq2JueOVcKaiK7uihWM1Ilq5ItHTGV5NQGfan/N8n0lt1fxCXnfhXUqwi4htZQZ esUAbKQq6Yte3qguT2yUrg58ksrKv7IKjZSM3TBXPYPbyzS7B3wgNu4/Qd3fOQA2OJsx 8XLITmh9RFXG+IXTQulLrXLCKmetbqAT8dYWDeMAkIL3dlZE19l9PjyHvjTWieHhRbKb ZmYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ptxedf92cM0xqHaJzE66H1LhiRTMxkYMHYaD3BC2HRs=; b=kfONOIurknQPG47WLqONgWCmLgdHtp3dRwFqoJVlsEdJCoBZ7YqHKLSslPpxnfXU1a 7FWPeJmxNux61Zg8qRJYHJFuHjLvr8E8d/w2mKYQZpnCbCcUtq0/1ZLFYQiYtO26IT7Z YgUhuWlmpWvwKaGpOnSDURYamowJogW4MOYOptgF8sdXdLakdyQl/RhVDIGn7lsf/oIo 6zuTK641WQ+LRp5i4xIWRAA1GkS2SHHX+mRFokhK0wRkQvOB/ru9Nz/uk6XAgusJfPtj FA+4NwhB1iu2gUGLUe8/SDm+7Ak4LJaeGMZrUEWAcSpdXKEIfHGeSX5mx1ttDzjG0pQ2 DJgA== X-Gm-Message-State: AOAM5303UgQTc0tSqWdn43o5hZmgrWy9rFVl4kLcNWQdRts3/T9gd43z elXH19XkghTbgiXvD+4Apr5lZlK+SjMtyxPF X-Google-Smtp-Source: ABdhPJxywKcQNRFkdSPgNcHYVTtfl/vpioTHmKtZDTUPcg2xBJaWsRvHhzAHUrfWlkKGISQTb/sccg== X-Received: by 2002:a17:90a:7f92:b0:1bc:f09:59 with SMTP id m18-20020a17090a7f9200b001bc0f090059mr15670869pjl.98.1646036876401; Mon, 28 Feb 2022 00:27:56 -0800 (PST) Received: from localhost.localdomain ([157.255.44.218]) by smtp.gmail.com with ESMTPSA id b3-20020a056a00114300b004e099ec2871sm12508364pfm.154.2022.02.28.00.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 00:27:56 -0800 (PST) From: Harold Huang To: dev@dpdk.org Cc: ophirmu@mellanox.com, Harold Huang , stable@dpdk.org, Keith Wiles , Raslan Darawsheh Subject: [PATCH] net/tap: do not include l2 header in gso size when compared with mtu Date: Mon, 28 Feb 2022 16:27:23 +0800 Message-Id: <20220228082724.1646930-1-baymaxhuang@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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