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 A0D5EA0093; Sat, 21 May 2022 00:08:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACBE8410F1; Sat, 21 May 2022 00:08:17 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2040.outbound.protection.outlook.com [40.107.243.40]) by mails.dpdk.org (Postfix) with ESMTP id 4A2EA4280B; Sat, 21 May 2022 00:08:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WiTHO3EfVzqN45SZH/oRZIDMoZpTyxQEvjSbUAOcv4Oav977ETy3S1cdSuivHY0rxzyF5ZQ1l9jKLG98+kk/kpuarmpjM4wqMmWNGxzJd++WhVnhkK96xx7BbSVvzekftcuzfo0AIkIFguSSbDmev+/J11b48omSevZn8KISS52DCVxWbHFLrpmZlNcWvJPUTXDe8ky0hUtrLahHFuIUdVp6t0uo3lGOFscLuKNn3g4P3WgPxEpJp1qitTls4RD2iBVL+0SV6BhgFLWsE2Y5FwJwjlpFKK3CVszXiw9vlRPZsYsjayQZOC0CponVM5ez+PFuKH7dM/G0RZKC+3oPrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0A2aOftpWUN+mx1zn5BtuTMryvYx90bVqNHw8z1auW8=; b=EvkV0oZar9ujd87eeGjp9RCSqA5Mdrl7CWe5P0NyxKPs/ChITKBY72dUnyhA7Nlu0JKCXQliUFsc0A1MLzCxRpsLYqiVZxTX3m8EW0Tn9DM6cvfmyi3ijEeh/iGQwcttOnj0i6tabK9Bef64RKB6584RsX9eCM9dCQZDqAv+3qlOe3YolrmnWelLkfGl3PyUolkZcq4J1PqrmrP8/yFnJzcrHLG10+Epn4E29Me1c7SmLvvZ9v1gWLcvWiKxgmsW6YfJQhN4Hq8FojsvGWx8HNLR8Yz4p5KPyDEZw54/CP2miEQGauf9e894hnk13e4iiXRGfbRyNLrxJDmvMOA3ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0A2aOftpWUN+mx1zn5BtuTMryvYx90bVqNHw8z1auW8=; b=Gqui+DuQ4/912ohKSYJ3oWSrbylBET4iMj1APJ1NzQomUnjUQOO9z7Z0AZHa1I5vBlPaGg72EJpTGzBx613gsh+Pd9i7et/6Pa5jM94jYYv1n0xMDMo7D21GKne4ak6lvyPvbjRVYCigd1eu4qckIGsxucpJeXqg+0ymfZsQoyI= Received: from BN9PR03CA0540.namprd03.prod.outlook.com (2603:10b6:408:131::35) by BN0PR02MB7952.namprd02.prod.outlook.com (2603:10b6:408:16b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Fri, 20 May 2022 22:08:14 +0000 Received: from BN1NAM02FT007.eop-nam02.prod.protection.outlook.com (2603:10b6:408:131:cafe::8b) by BN9PR03CA0540.outlook.office365.com (2603:10b6:408:131::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.16 via Frontend Transport; Fri, 20 May 2022 22:08:14 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT007.mail.protection.outlook.com (10.13.3.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5273.14 via Frontend Transport; Fri, 20 May 2022 22:08:13 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 20 May 2022 23:08:12 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 20 May 2022 23:08:12 +0100 Envelope-to: baymaxhuang@gmail.com, dev@dpdk.org, jiayu.hu@intel.com, ophirmu@nvidia.com, rasland@nvidia.com, stable@dpdk.org, keith.wiles@intel.com Received: from [10.71.116.2] (port=64321) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nsAn6-00076r-7l; Fri, 20 May 2022 23:08:12 +0100 Message-ID: <99e9b817-d87a-df99-4334-1a0cc482d627@amd.com> Date: Fri, 20 May 2022 23:08:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] net/tap: do not include l2 header in gso size when compared with mtu Content-Language: en-US To: Harold Huang , , , Ophir Munk , Raslan Darawsheh CC: , Keith Wiles References: <20220228082724.1646930-1-baymaxhuang@gmail.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 27ef54f5-5e9d-4579-396e-08da3aad3c29 X-MS-TrafficTypeDiagnostic: BN0PR02MB7952:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xz9dSbpO8O9ganKdaoVYeflZjE2phTHjHM6b7qcDC/yIUSOsagQGwkJW8AGjCpL8Xy2RTs7pRJgdYpwdHEZtTziQwvz4g8niI+NIlueBZ9rlYoOssCT/lD1mNH2Dypx8UrJgfvsUTIKZeQMWMJpjhwdfIp8zY1p3Vpp2RjX/DNm+ndyNEmaqV9BShEQ2sbsfpZBs8WeaZuzEJ7OJbxEcx/YO1VFWsRybvPDZisvT/iYc3bgQu828FWYzuorlAXqFR+QMbBXFb6CZ3xZcJ3b2BrYgWuxo2HbKkIIQC9J7MCSU27jkurAmbwhRJd7WQQIwCLLZV33RVTDW9mawAwxzjLmLV2oElVr+ZHdmU40+B8XGd2xY57qBqlwP77nuO3EIv+A34jCjFs0vh8P1g8lc10yoBNdeeZRq+C2rDl1b2/vtWaHVyd0RUCJJH9Ukqf8GTgBSy05YfZ1nZ7nCeZCw9zr1CbH0dQDaaRi+Gc6EXnMhEQ2Ptlr+foDpbTTvTgqSsQzWMZU1oPxQamZBUlp3VABikfgh4n0ttkaj7+sbyfFXWv0n/YaYUdAGJWLWY+gQBuAGSlvRsG8Bb/KBXPXwYUGMrqQYgGMgSuXOAJAzMNhDZ6PV7A5CeTfeZsYnM1jCr0M1mSwuhs0xpfen/x/zjtSZ9/n7JXCenY2ttXGVoPVeTHZvzYaHPZ4LayFrINJi3HAtO2DL7j1ivkQWxGrx4dYvZUxomQodmB1ASht6jdwQ/oXg5dc6qPT4QUUhjXT8zufZfgqiuE2mr7mQvrW04ojUO4r2skaXlQfalaKTPDioWVJ0SVJZAOrxZFzX+ZPe X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(70586007)(70206006)(82310400005)(8676002)(2906002)(86362001)(316002)(36756003)(31686004)(26005)(53546011)(2616005)(83380400001)(336012)(4326008)(966005)(31696002)(35950700001)(508600001)(54906003)(44832011)(40460700003)(5660300002)(47076005)(356005)(7636003)(110136005)(8936002)(9786002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2022 22:08:13.7715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 27ef54f5-5e9d-4579-396e-08da3aad3c29 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT007.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR02MB7952 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 3/8/2022 2:35 PM, Harold Huang wrote: > 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? Hi Jiayu, Ophir, Can you please review this patch? For reference, patchwork link: https://patches.dpdk.org/project/dpdk/patch/20220228082724.1646930-1-baymaxhuang@gmail.com/ Thanks, ferruh