From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0078.outbound.protection.outlook.com [104.47.37.78]) by dpdk.org (Postfix) with ESMTP id 80C346CB9 for ; Wed, 5 Oct 2016 08:32:40 +0200 (CEST) Received: from DM5PR03CA0008.namprd03.prod.outlook.com (10.175.104.18) by DM5PR03MB2443.namprd03.prod.outlook.com (10.168.233.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16; Wed, 5 Oct 2016 06:32:39 +0000 Received: from BN1BFFO11FD055.protection.gbl (2a01:111:f400:7c10::1:104) by DM5PR03CA0008.outlook.office365.com (2603:10b6:3:118::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16 via Frontend Transport; Wed, 5 Oct 2016 06:32:39 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD055.mail.protection.outlook.com (10.58.145.10) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Wed, 5 Oct 2016 06:32:38 +0000 Received: from [127.0.0.1] ([10.232.134.49]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u956WXML028532; Tue, 4 Oct 2016 23:32:36 -0700 To: "De Lara Guarch, Pablo" , "Gonzalez Monroy, Sergio" , "dev@dpdk.org" References: <20160926163300.22990-1-akhil.goyal@nxp.com> From: Akhil Goyal Message-ID: <53327b5c-9a6f-9336-fbb7-109204a8ff0b@nxp.com> Date: Wed, 5 Oct 2016 12:02:33 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131201227589535707; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(13464003)(43544003)(24454002)(189002)(377454003)(199003)(107886002)(65826007)(120886001)(626004)(65956001)(104016004)(5660300001)(189998001)(81156014)(7246003)(7126002)(36756003)(92566002)(8676002)(81166006)(8936002)(31696002)(50466002)(86362001)(19580395003)(106466001)(19580405001)(105606002)(97736004)(23746002)(83506001)(87936001)(7846002)(11100500001)(15650500001)(305945005)(2906002)(76176999)(54356999)(50986999)(2501003)(230700001)(77096005)(356003)(31686004)(65806001)(6666003)(64126003)(68736007)(85426001)(2950100002)(33646002)(4001350100001)(47776003)(5001770100001)(586003)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2443; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD055; 1:7/Wsm/jjDgqYP/05e3BZUtcBQARygDSx4DE5ccwNguwyabGE8Bzf/QIm1FMyJe/sEfKcjyS0IIM1cVxLsJL1ziceX/mxxMZLrBPiU9rMSQXLD30ilVwTCBSe1IWY9Y6rjSu4knwHSYi3VIRs85E8XlnuxF/g/3ITO0pwlU84Fx2zT44/oqUiVEzOeAFl+Ank1HFpbbHFSKHEyhqqlOM6fXptGHLh/AwgVEOhMiozn2ltXcF13zOIoVkgx7zI9NLN1nFxywrsEdUcQ2XC+C2VdJ1is8xRiNXiqSY3S5l7VBOwDYui7RH43pQSY9wshhYQ5eEbPhhXneqCmHe1VfPrNyH4HsZkf75aFvEYLuLxXhWLBu7QXpbaZ6Xzsc4zr82G43RoPyVtgGj9//1UdrT6LbVjMPter1M384PmO3Fki3won0ZF6bXxx8t+t2z/f/VTVINWmtBIutL2ValBZKpkhVMsjJV9SX94H9pEUP4lyAedRQOWeVie03AMVoaNm4dN2DO6cUoNSAyClrchNe1s7lS0Peix/r2nLbRn04C60eEi2lHnBr7V82iUedo08tgOEQMsuKiswlBWe643Ax9ZrvbRB0AYoF9OZq9CZ+5TiGbLX5oXAkOH3yM7LnMVGN47eAzq2zpTR+JXTnScAc9+OQ== X-MS-Office365-Filtering-Correlation-Id: 00344316-135b-4214-667c-08d3ece96706 X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2443; 2:4NyjeuZDuGXZqG1rgTPpkwUy1UtV0GpWF3qIBL9/liAk4e6vE+QtzNVfG7luhBXUF2HOlJDkIzq/AXV0pN1NmyjxxfAiWylMpH4AP/FOhga7505GrBbQn4yCZp5TnNpgYqoqv/f8hbvTobC2bwUA7rhdqZd8t/b0ybv9ML4bT+NAeq0sW+GVq4i0+NMnA5+xu2/Q6MAhFi8No1skVt0R9w==; 3:KhYt91pEXK6bKSIpSivCrnV05uyPpJKJeodySIFYaZfQurMF9mlbNdGJ64PWhu/E+3qPlKJoFO7ZuUGRksr1miwaDxeS2UUGJHhQB1niaNQRGB6PibNcqnEopobEhSmogFRrcliJ2YwLHhGA4kM2mdtRxhUIG60ePaefbTsGqHbx+UOR2WOEbitznN4iHqMoYNQ+GCD5YYLS9j5rd5r53Ek5/AaFmGKdfinvAHF2SyIxJI+FOEERkcgLSA1hcckY; 25:H8qk5DE0bgXzHoyL6BY2TJnuUQTpQxBUN8N6PP7I9pR58eAA6hj+BbjHGexwQeBaGvLOJBg6jAFDZNaqGEqIry73Wu/Um329nJCcmYx7h6mzWRa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XkhUPlsr0o1e0TJBNUcHbWELXjo3todDs2rBP95PvxpDSsxseLMxLSAUvOZP26andvKiCs+baLijCvuPR1FXQOSfggS1cSf6n4KPdBlqUXFUUtynlPBW9uVU4rQdMtqdG8WD5dBb+sds9pT9k+m04bHEA59bAfMZ4rQXtinZWdnTZTKdwBP6b7ZnxcJMotQW/TeFc1WT82a3BEuJzZXHCbUaIsVN5pvEQp/vA5NjI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13023025)(13018025)(8121501046)(5005006)(13015025)(13017025)(13024025)(3002001)(10201501046)(6055026); SRVR:DM5PR03MB2443; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2443; X-Forefront-PRVS: 008663486A X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DM5PR03MB2443; 23:H1yE9z65WvO0hBmQlcV+Q0APHeCApCSHZqYf0?= =?Windows-1252?Q?OlVJfKb5AiSRNuc7f/rud12F3grKHPxrv5b0aMMAE152W3fGNtgQHnD5?= =?Windows-1252?Q?a4j3k7hVnFOb3MOlTH5gTze0KIBEhm+aNAM6r5l8PbTAyqQoBihZlnGt?= =?Windows-1252?Q?CMZSskUkZ+bqvMthaAydq59k8UET+pRhs35p9fz1zzu/qV0K08Sky0So?= =?Windows-1252?Q?EIgMYdFBMvOaXiWgi4davbi6iQ8otd/AcPyIF/v1+8kAI5zxJNx1Jjm+?= =?Windows-1252?Q?IfIvSAGwMhH162I0CjCt1tQC6J3JJWMu9nzu8gb7NnwwcLz3N6KREsts?= =?Windows-1252?Q?zul0EXlG1y7VYzPquCFkEVzCa75bkyEMqxbWGrh47vKktW2SbDbQsfYm?= =?Windows-1252?Q?rFRyaAGfaMdxY6VXbCnrdyahTBMdppM9axho/QIoKsXiX16Jmt0GTB5O?= =?Windows-1252?Q?BdB7VYJFmgK5s/A3f+9C8JB60h2Vmu32tBC69doDPlnfcDUjc2vIp6qg?= =?Windows-1252?Q?jndzO+Xth3UiEfgvUpwpjSm/PEczxq2520FFdSJ8S+oUHrTWIRTWMiHe?= =?Windows-1252?Q?SnOnMGWT4vE3bLAJsJJ147xuKbGghkeqDnaavibnxD+Q+UyrTLqfTU0n?= =?Windows-1252?Q?gmhReIx1u43CAFEF7YFsl8LuFbad6R3RzWl+GXNlfpaMkvCtu37WmldQ?= =?Windows-1252?Q?K7oQRnLG2vMVpuU27R1WCdQ75/Q0y340my0N+hFm/J8SX+nLPUIyTEdm?= =?Windows-1252?Q?iE9kMVf6CFoUVyuudpfkQbJmH+YAgkeEYjkGgdeXwLdjkBUpK7qrXH9d?= =?Windows-1252?Q?zEwo/Z7+K8WgWeTw5ECcufpxJWauYVoNuf/zfFVOCjRLrnKLIcQZ/aL0?= =?Windows-1252?Q?6njZhYS43vD+vxz22+rMDm/aSPUm8a/6o98LZX5F5I0rpP0y6THvGrop?= =?Windows-1252?Q?5pNpc5iqGU8T1Csdf87zyx+wPmXCLQXVNfQ7+SaNSRk2XnlD7NNA8kuW?= =?Windows-1252?Q?6ZinnOqVUYx1+rsHYucMAW8ESYRad2Yewh4f6dN0kmiDI+u2VPW3WMgm?= =?Windows-1252?Q?njTnUEEdYIIFzZKIHnu+BC6do3x5lg2PMdyQcIs4nLq/1ElSGRADE9Ob?= =?Windows-1252?Q?4zWYF+A6OQGTe2JRfhpFMGqJu3JEqEmJn1xE2t3NQ0p8zCsx2oaOU/2/?= =?Windows-1252?Q?CpHV90puQbjLNFK2nKv7zKpRiRSZ5gmt7TN+Vc9ggccRL8KFbIs8KBLC?= =?Windows-1252?Q?dB6Lgm0MT7EEHGSWJurhHJhFGCe8i+YUoHDf322gBQZA9u2qujQN+88g?= =?Windows-1252?Q?6jDePev4DzAP5ySQdOPV6RZQLrvBEzI3/CpNfkFR6MLsDDby0hk/T+tY?= =?Windows-1252?Q?PSbkjH7V9ZVd5/vg58FXsFW8oEW1i/MeRh81NZegS9IFK+3ErdO1/n2/?= =?Windows-1252?Q?RaHBBr2UKIXJeyVM9MVsGOt79gR0Ym/u8RJybI7525eo4X8fAcYgpsU7?= =?Windows-1252?Q?1mlKoNCVzBFkGtbI95aJryQufKcru1sObN9LEOaABxQ+6S2Q73PxYEGG?= =?Windows-1252?Q?qQ08kRHo+XOqd89vD+bXi8QGh46SSz6uaQ3h+67mNPWutFPcA7ZjIyO4?= =?Windows-1252?Q?Cru/bp8F5p20GUcswaQaadlb0inPggPZSUhYXuwHqww6cOtaXn8jrhkN?= =?Windows-1252?Q?025kLS0Ig=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2443; 6:/KM7isBxVdF6hGCJb4xFo2JyvmTWt0aPLImnAl6uKDFOuAV4SBbzUErU85aZmitz5Lv7Hq4Xrk/MHGgMlB7wNgc5AhKgx+wDfjYaacQKdapHjloAq4en8vZE36u/DggA1YJTMT5DQqJNDUsVmONaAZBCr6WeYuPGxQNL9ATelRVPx58NOzVQw4vUFMeiw4aDQu/g1l/xSPC0Ckig9VRGnIT/3bcMNFdxhP19st9PbLl7gQJnZcpiWC6eC3Y+f50tgHc/kXe2AGPY4CXCePwzNhixbyFYo0waP0phz5tSJovf+bqTFmCzAckjCryv7uCS; 5:SgsnhCBGLpqn6ffSIiI2jI3ZpBO9gzOV19tMSfmVvm3pxguSJCuqkaHx4MR2BOg2TCs0rj7gEjqnPtSGQJJDFQi75PO7IkHNhwCWVwO4SxiFVe0fuZg3GDuUqE4KnFIosaj63TIquGCSvs748r9/0OuSeLHXlVfifmExQx8C6d1iz1/5hkZsPROYSK7MS6ls; 24:XlrnDUCFjRmSUpdCZxvTxMH/qJo7ORxrf0gnVIKbwlIBfUgbkLAM382RV9xGznNPuQJCXQRzeSe4YRI36aeiH3uj/Z3EEx+aN5s13kQlI5c=; 7:KYhTuKy9Fn9vIDvnUGnfpRHx0cACGwO1VOYhtutDUaTe/1gVORuhrFMqLXANN1j3B/RIvaBhgCbZZ7J1YGahpRbDcU605cbN+u81g7ozeY1pF7T5UYocQauKecB8h2ycNrBazGuHOyvM4bFei1Ls76oj6fIRG6W0fVJo6hcn4S0GG1WjKDnTXZ+YV03T5bK00uP4KzTz1voEzDtHTyMByYDUopZ+Cxp28uxri4joPXmDj5ioH9+1ninEYrMNEBIZ1cEeZpx93+0YTFalkjPVGht70uzXZ0PmS7u32AZioQkA6pAUgz3yqUFeez+R/VJgWWUbrcBddXX59XYdcdwXxQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2016 06:32:38.7039 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2443 Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: Update checksum while decrementing ttl X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 06:32:41 -0000 On 10/5/2016 6:04 AM, De Lara Guarch, Pablo wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez >> Monroy >> Sent: Monday, September 26, 2016 6:28 AM >> To: akhil.goyal@nxp.com; dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: Update checksum >> while decrementing ttl >> >> Hi Akhil, >> >> This application relies on checksum offload in both outbound and inbound >> paths (PKT_TX_IP_CKSUM flag). [Akhil]Agreed that the application relies on checksum offload, but here we are talking about the inner ip header. Inner IP checksum will be updated on the next end point after decryption. This would expect that the next end point must have checksum offload capability. What if we are capturing the encrypted packets on wireshark or say send it to some other machine which does not run DPDK and do not know about checksum offload, then wireshark/other machine will not be able to get the correct the checksum and will show error. >> >> Because we assume that we always forward the packet in both paths, we >> decrement the ttl in both inbound and outbound. >> You seem to only increment (recalculate) the checksum of the inner IP >> header in the outbound path but not the inbound path. [Akhil]Correct I missed out the inbound path. >> >> Also, in the inbound path you have to consider a possible ECN value update. [Akhil]If I take care of the ECN then it would mean I need to calculate the checksum completely, incremental checksum wont give correct results. This would surely impact performance. Any suggestion on how should we take care of ECN update. Should I recalculate the checksum and send the patch for ECN update? Or do we have a better solution. > > Any further comments here, Akhil? > > Thanks, > Pablo > [Akhil] Sorry I missed out the previous reply from Sergio. Thanks, Akhil >> >> Sergio >> >> >> On 26/09/2016 17:32, akhil.goyal@nxp.com wrote: >>> From: Akhil Goyal >>> >>> In IPsec-secgw application when TTL is decremented in IP header >>> before forwarding the packet, checksum needs to be updated. >>> >>> In this patch an incremental checksum is added. >>> Other applications(like l3fwd) are also doing so. >>> >>> Signed-off-by: Akhil Goyal >>> --- >>> examples/ipsec-secgw/ipip.h | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/examples/ipsec-secgw/ipip.h b/examples/ipsec-secgw/ipip.h >>> index ff1dccd..ef059a9 100644 >>> --- a/examples/ipsec-secgw/ipip.h >>> +++ b/examples/ipsec-secgw/ipip.h >>> @@ -56,6 +56,7 @@ ipip_outbound(struct rte_mbuf *m, uint32_t offset, >> uint32_t is_ipv6, >>> if (inip4->ip_v == IPVERSION) { >>> /* XXX This should be done by the forwarding engine instead >> */ >>> inip4->ip_ttl -= 1; >>> + inip4->ip_sum += 1; >>> ds_ecn = inip4->ip_tos; >>> } else { >>> inip6 = (struct ip6_hdr *)inip4; >> >> > >