From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0058.outbound.protection.outlook.com [104.47.34.58]) by dpdk.org (Postfix) with ESMTP id E6B313238 for ; Mon, 26 Sep 2016 13:05:04 +0200 (CEST) Received: from BY2PR03CA040.namprd03.prod.outlook.com (10.141.249.13) by BN1PR0301MB0708.namprd03.prod.outlook.com (10.160.78.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Mon, 26 Sep 2016 11:05:03 +0000 Received: from BN1BFFO11FD048.protection.gbl (2a01:111:f400:7c10::1:132) by BY2PR03CA040.outlook.office365.com (2a01:111:e400:2c5d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5 via Frontend Transport; Mon, 26 Sep 2016 11:05:03 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; 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 BN1BFFO11FD048.mail.protection.outlook.com (10.58.145.3) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Mon, 26 Sep 2016 11:05:01 +0000 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u8QB4waG005049; Mon, 26 Sep 2016 04:04:59 -0700 From: To: CC: Akhil Goyal Date: Mon, 26 Sep 2016 22:02:58 +0530 Message-ID: <20160926163300.22990-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131193615023433220; (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)(339900001)(199003)(189002)(8936002)(77096005)(19580395003)(19580405001)(36756003)(110136003)(50466002)(47776003)(626004)(48376002)(105606002)(86362001)(2351001)(229853001)(106466001)(15650500001)(50986999)(6916009)(86152002)(81166006)(50226002)(305945005)(68736007)(7846002)(2876002)(104016004)(11100500001)(1076002)(356003)(189998001)(8666005)(2906002)(81156014)(586003)(8676002)(97736004)(87936001)(85426001)(4326007)(5660300001)(5003940100001)(33646002)(92566002)(7059030)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0708; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD048; 1:W1Bfm6ie0OUY/QIdGBVjtiAuuDVimkznakAvzakt+ggNCxnEieyVzOL65H2mpMVmqtMqCk6mx8xaGiRtPjNPVoRkcL0fc+ProrcWGgv/hJzcL16f5s7B8ZhSgXH7L2JqzdGirUZCRqcbbM1/TV+iNrd2Xnae+M2bxTzgOojG0GfFG9fxNXVfkTrt8Zmtt4WoT46zgz6whOcHfRUavpy6wpHr2yIsKT6OA4TzSkOUriHShPCaakveaea8BWmIx8hluvU+Cczk+Y+eh5fmv6nVJCKQ5sbAAWJPYF15FHo9WzbzkzM3hSr4Mvcw3kj0HgtsMeIKcDUQ+rCFrVnCgDpse8ugZCIBmHYA0wORLtDDfOA5HCN+bAcWek+rEm8YbowWpeBmhr7kBniQswzwi7dWSGXuhPwEaz/EIYQ5zMtU90Wn7S91rR2jXcw1NGsZ4Z/uSZveMp1A4mi0DchQy+Twt0YB/ko/+81Vf5uGgHhxDOGJ/dXCpf8HNYcOd3KT8bpNj3Sbl+tdXM8v6mrHv6/qS8G0tGEbTM8FhOFpQM3hqkODXvI5SlnuGghb3wYTcnjgj3i5JgnzgmEI5gXuqX9oMvWEUUD11wLAxXa2jntsCN47No9CUwz4uvgIyXx9ZnRDAimbR2HorMNLZvqkWJxBiIkQbo8HTOciunVozsZxwr23401EPZNvZV/d3RGFmDzmO+IHAGMox7E8WbtzDkcZzdIQHHkjQUvvK3h+51ZqTrc= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 97fdfc3d-bf88-48ce-6604-08d3e5fcf6bc X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0708; 2:wK/TX8eo1cESMx7cP16rhsXmQgeZxg2jg0i9Aqdp6iZfLPjomkNhrSbKdD4GksGsiToE5v4tlenT5ZpU44wfc1W50sJeobyBamSKsoYjEGawcV1p4ioPseC9mN4w261qM09dCjwsbbF/48RJsyo1YWfnfYQgpzDuQ8vZoEPagLGtXq/dyRIq6L3NnZ3PSrzg; 3:mYm3B6xEF6i9yIAEvwf0cQD9OVDYjdML55SPnHwoVtl6oZOhb+tuu1jWwHWypyR+3JNQ1cR5Ax4VUjaOEPu3Ch+pgDO77cua2WGOjbCPezhe+fFSbCkMcsfpcpfyKM4mbhflIutRqchypqGxnkhZYXjeFlVoInSbs5HW4exlPkvt9PfId4MkFvJJDdGQnp1ytNqEn0ZBGL0xjgQw2lBeOfJLdPMeLG64i5Xcs3/86RY=; 25:YnjMjLBSQbZeXhOD4gc8DyP5TjF0azVEP+1lKKtGST3B1A8YCwmoPSxWCc4lGVsSeu4AwCmRyVCuFl8Yc7hULGLyvPpcOEMovToRH+hCCKeJ0RETHcFy0aAyzkaDGS7C0nYoMCB+h8R4EnhfJ/xpo2gMVBg03RSJV9OyZOr2TUJStyPEKJBxM8YQeBUV/RA6SeqgVdZ3fqi/XMW8ghfFv5eck3/j32OF3JyEbZj8N1rQvdbBAb4xW32H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7rXJWnlvI/qXxGMSPEtNBXPPv2TCyqNNsw== 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)(13024025)(13017025)(13015025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BN1PR0301MB0708; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0708; X-Forefront-PRVS: 00770C4423 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0708; 23:MOMHv0BH+7hWhPT1T5tmU/cKBIoLLmOnp3+Udax?= =?us-ascii?Q?JX2YjNxAjCY2DXYOcgmQ23c9DeHeuBbcm3B7Aq0gENDzXt0eDDOAtrLlIIY3?= =?us-ascii?Q?o2KnYzosiqRKwANKjWJoLdHKPoqGo0AiCJlYeFIPm0Q3CphU/fmfWUhPGNCz?= =?us-ascii?Q?nnrN4wj5Ll4v5gKV7rSkXdqVYJedftVwSBgFTfo2Jaqk2IPDXPxIUkDPn1Q6?= =?us-ascii?Q?sUNTc/M0Pj0BcJtNrsbYljbXYbbWxM2u9f6tekyWU68i3uluXjHMsDVVu2Ge?= =?us-ascii?Q?8sAapXXE0gV5g4IKVHVrV4uEGmAgbRayQYtDKHTjTBMpLyQ1/ByM8tbxEkVZ?= =?us-ascii?Q?gkgyFPKm5Pq3RUhNWeog+I7CFfFJqtV3/HHZArzeBAHRHUm6+hoFCZCCHs00?= =?us-ascii?Q?QaTEs5pni+bGJf5WcPuOP8xW8SDrRfVPhz7i6K09doO2JjJ9ylKyMg9gxs9g?= =?us-ascii?Q?6/WlZ8Wg57xJcK2KSPBk4Aj1CfSEGeVYIWsNdyj7GH3GbDuz58EO29Bn/MpA?= =?us-ascii?Q?82gYQIDKuXaeU6EX+9qr8SAW5tO9N2Ni/zxWEVjGsuodU5TGjMlnv6MPM+Ge?= =?us-ascii?Q?dVaVv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TgWhNSlSRxrMlfBMqm3VYv8TqQ3t/V5ffLS5ES5FathwSjC6Pyv9fB5o2z3mNr0yFESCostuBOLlcAx48yAVMRw83KUNOV2JqfU6J0=; 5:9snrYqvX0WWBCibnT0V/NEpNiEW9gts/9bF/vp7j2Yv32vLBxDl3vlY6ZV1hP5qoaawfd9/AyU5TFHPpqpNTrdyhLe2qNHeGZjTgGd384yMztG+kJXezikLeoi6IC31IyCFpfoa+bVI/OpVesq5pHCodmimSD2U0y3rDbivWKvc=; 24:7vSZDMdjejAVS6lcydTcRZhWD4lOn+Xv8FVdBr49Us9AtsMjmDsx/UIbICIfLSyQ2BFfMZBBWSuocnMFXDVfwL4PXxG3dW79AXGQjmPeqyg=; 7:SKaKFBJlI4uvXbb6LsmZFkONGXxPT7wDT3wZQ/5xhhatuh25fjKjvok1glERL/Ms031JB4LRjdTfL/IBoa01NdSixfKUEeIQ3SVIOdWkSr9Yf720ubedgzHuMIfJz2+VOYzp/v5v8ottvw1b3qItnbcutPSzUysr48vO9nPID5UFFp+02rRciWB4dheI4J7vahE39yuU3zMjhq67tExGV59nQRFXDPr1Z2ow897m/hva+kQpj7LMURBicJ895dPDlEVguXKuN+YdrsmXZpsNs9o5hGzhnrXcyGeeuOW4OLvH62EpQUR4whvIpUjme7ME SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2016 11:05:01.5009 (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: BN1PR0301MB0708 Subject: [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: Mon, 26 Sep 2016 11:05:05 -0000 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; -- 1.9.1