From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50083.outbound.protection.outlook.com [40.107.5.83]) by dpdk.org (Postfix) with ESMTP id 590F1E07; Sun, 22 Apr 2018 16:47:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=EI2HPSqoEQsuL2PAZAe7o4aHAXaNVhnMQ7Hto2tDOH0=; b=o64+xFKKOUx9ObSSCJY49KfJIJrQdoHyvklu+fI6eEHCb18HDtpVJxOO5D+Vu32qc14onH5LPMJxeFiMTup5dOedxaI4Xl6DyjSflpItQrznHRBt8PUkPgV2KkVGtTTSZLrKMmH7zbe90/pfQS0QhfKr4F7b484swm+VtOstxdQ= Received: from HE1PR0501MB2314.eurprd05.prod.outlook.com (10.168.34.19) by HE1PR0501MB2588.eurprd05.prod.outlook.com (10.168.127.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.14; Sun, 22 Apr 2018 14:47:58 +0000 Received: from HE1PR0501MB2314.eurprd05.prod.outlook.com ([fe80::d405:aec8:cd2f:85cc]) by HE1PR0501MB2314.eurprd05.prod.outlook.com ([fe80::d405:aec8:cd2f:85cc%18]) with mapi id 15.20.0675.018; Sun, 22 Apr 2018 14:47:58 +0000 From: Ophir Munk To: "dev@dpdk.org" , Jiayu Hu , "Yigit, Ferruh" CC: Thomas Monjalon , Olga Shern , Pascal Mazon , "stable@dpdk.org" Thread-Topic: [PATCH v1] gso: fix marking TCP checksum flag in TCP segments Thread-Index: AQHT2kUpp26DE2UvPU2Ou46q1OX+56QM2ksg Date: Sun, 22 Apr 2018 14:47:57 +0000 Message-ID: References: <1524406859-29585-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: <1524406859-29585-1-git-send-email-ophirmu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0501MB2588; 7:6q7Zf9bJyY6rdDlIcGjCmZ9uVD5y8zTOSMz8tJy9EcTmsAohZyv5eJ91PArgEBYggQ1JaGWIsbya2DncaO7EiOz6Q/zK/+c6vtOmrAuglps/6Ul0a3QwHQ87ATdXc4Om0964LiB3ngt+AGiruc1yaI851+uzcl8JNKGt3BXq62Pn9jOok4/QteCAs7iNleqrP9JnAaDRpYznw7SHHezWyTuUJdq4wDbC/UwLRPwYxsDFwUc1OnPE4N4YcMkCDNJl x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2588; x-ms-traffictypediagnostic: HE1PR0501MB2588: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231232)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0501MB2588; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2588; x-forefront-prvs: 0650714AAA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(396003)(376002)(366004)(346002)(13464003)(446003)(7696005)(476003)(5660300001)(3660700001)(3280700002)(55016002)(6306002)(9686003)(2906002)(53936002)(6246003)(2900100001)(66066001)(7736002)(305945005)(6436002)(33656002)(229853002)(110136005)(54906003)(25786009)(966005)(74316002)(316002)(26005)(186003)(478600001)(6506007)(11346002)(5250100002)(3846002)(6116002)(76176011)(102836004)(59450400001)(81166006)(8936002)(8676002)(53546011)(2501003)(86362001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2588; H:HE1PR0501MB2314.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; MLV:sfv; x-microsoft-antispam-message-info: rWJ8Yr41XWiJv4bVFuudk/BRl2QIlPt3HIfRFeNG/Q1nJ4lKYoSKo8KRSHhrSVNAlQ1DHGD4Jf5KOCWUa/TYurHLj+58Y8dCHUwHOgbcALHGSTr7G7IGjFV4QBy9abZlEcpPb3eSwKcqH2nkvhnCOpz7pCv6B/nDU/XQwcU299tB85DLOvpWzYXNcefXsNpB spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: bee7488f-8ab3-403b-1338-08d5a86009fe X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: bee7488f-8ab3-403b-1338-08d5a86009fe X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2018 14:47:57.9203 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2588 Subject: Re: [dpdk-dev] [PATCH v1] gso: fix marking TCP checksum flag in TCP segments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2018 14:47:59 -0000 Hi Ferruh, Thomas, Please note that this patch should be merged before the net/tap TSO patches= : https://dpdk.org/dev/patchwork/patch/38666/ https://dpdk.org/dev/patchwork/patch/38667/ Regards, Ophir > -----Original Message----- > From: Ophir Munk > Sent: Sunday, April 22, 2018 5:21 PM > To: dev@dpdk.org; Jiayu Hu > Cc: Thomas Monjalon ; Olga Shern > ; Pascal Mazon ; Ophir > Munk ; stable@dpdk.org > Subject: [PATCH v1] gso: fix marking TCP checksum flag in TCP segments >=20 > Large TCP packets which are marked with PKT_TX_TCP_SEG flag are > segmented and the flag is cleared in the resulting segments, however, the > segments checksum is not updated. It is therefore required to set the > PKT_TX_TCP_CKSUM flag in each TCP segment in order to mark for the > sending driver the need to update the TCP checksum before transmitting th= e > segment. >=20 > Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ophir Munk > --- > lib/librte_gso/rte_gso.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c index > a44e3d4..e9ce9ce 100644 > --- a/lib/librte_gso/rte_gso.c > +++ b/lib/librte_gso/rte_gso.c > @@ -50,12 +50,14 @@ rte_gso_segment(struct rte_mbuf *pkt, > ((IS_IPV4_GRE_TCP4(pkt->ol_flags) && > (gso_ctx->gso_types & > DEV_TX_OFFLOAD_GRE_TNL_TSO)))) { > pkt->ol_flags &=3D (~PKT_TX_TCP_SEG); > + pkt->ol_flags |=3D PKT_TX_TCP_CKSUM; > ret =3D gso_tunnel_tcp4_segment(pkt, gso_size, ipid_delta, > direct_pool, indirect_pool, > pkts_out, nb_pkts_out); > } else if (IS_IPV4_TCP(pkt->ol_flags) && > (gso_ctx->gso_types & > DEV_TX_OFFLOAD_TCP_TSO)) { > pkt->ol_flags &=3D (~PKT_TX_TCP_SEG); > + pkt->ol_flags |=3D PKT_TX_TCP_CKSUM; > ret =3D gso_tcp4_segment(pkt, gso_size, ipid_delta, > direct_pool, indirect_pool, > pkts_out, nb_pkts_out); > -- > 2.7.4