From patchwork Tue Mar 28 11:07:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 96137 Delivered-To: patch@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp266097obc; Tue, 28 Mar 2017 04:08:31 -0700 (PDT) X-Received: by 10.55.160.209 with SMTP id j200mr9789304qke.57.1490699310920; Tue, 28 Mar 2017 04:08:30 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a128si3153631qkb.211.2017.03.28.04.08.30; Tue, 28 Mar 2017 04:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7B57860982; Tue, 28 Mar 2017 11:08:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id DDF4F607C8; Tue, 28 Mar 2017 11:08:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 91BCD60948; Tue, 28 Mar 2017 11:08:25 +0000 (UTC) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0132.outbound.protection.outlook.com [104.47.1.132]) by lists.linaro.org (Postfix) with ESMTPS id 9C97760982 for ; Tue, 28 Mar 2017 11:07:56 +0000 (UTC) Received: from DB6PR07CA0051.eurprd07.prod.outlook.com (10.175.237.141) by AMSPR07MB374.eurprd07.prod.outlook.com (10.242.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Tue, 28 Mar 2017 11:07:55 +0000 Received: from VE1EUR03FT046.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::208) by DB6PR07CA0051.outlook.office365.com (2603:10a6:6:2a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2 via Frontend Transport; Tue, 28 Mar 2017 11:07:54 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.241 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.241) by VE1EUR03FT046.mail.protection.outlook.com (10.152.19.226) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.7 via Frontend Transport; Tue, 28 Mar 2017 11:07:54 +0000 Received: from fihe3nok0735.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2SB7R92021176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 Mar 2017 14:07:27 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0735.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v2SB7R1v021172 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Tue, 28 Mar 2017 14:07:27 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Tue, 28 Mar 2017 14:07:26 +0300 Message-ID: <1490699246-32395-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.241; IPV:CAL; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39860400002)(39450400003)(39840400002)(39400400002)(39850400002)(2980300002)(189002)(199003)(9170700003)(189998001)(47776003)(48376002)(305945005)(2906002)(22756006)(110136004)(36756003)(38730400002)(53936002)(5003940100001)(86362001)(356003)(6916009)(105596002)(5660300001)(2351001)(106466001)(77096006)(50986999)(8936002)(81166006)(8676002)(50466002)(50226002)(33646002); DIR:OUT; SFP:1102; SCL:1; SRVR:AMSPR07MB374; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; VE1EUR03FT046; 1:kEm2EyeW7cSWVwFIVNu/JW3KwKSV1HJbzw0WJ8DO8hkIUj7k0e/1Ww4QDZB0n9wCAXkIlMooCTMfUjb5a4+CYCohwNWG4OzR9fTIlLvzu4k2AK3FDSlPa7ZUPn2rIP0bYgJALcUC9k/MXk2EV3GN09y5qOfhkaS5uH/edi2fAjZXP+FdvGwwmhIoTARVVJQa7gr75Chet7t+6Y1UaZJWRGgOmRHbdIgtl0q/is3nIx2NqTd5mcb0dJ8aj7oBSTytzr9lFbKnVwZwq4Vo5bkCPPcSmYGhlWyuOSEbDipFp9h61hnnHT6x/RHMdJcpOULIc8pIWbjK3FbvQldoWLQeGZmboM0wS8AKzD4AgEZ1jsUm+Q/uBGnMgeIErr/FSH7OYJZtdHaBeL2HQ6zaR+4eMYVwQoPa3321FBsy6RViAdLQ7eZFcAv59wQHPvxR3Cll7+Z+BQiDs05RxwcTB5Woizy6DccbsihFCN40ivJaO2d3AJ1lCWGVl1dmSP+168VQ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: b80ba7cf-608b-40c0-5548-08d475caaed8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423059)(201703031133065); SRVR:AMSPR07MB374; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB374; 3:qt8d9ARjhkKE9vsI1OJ7YIVYvxVx8iu1qirN0yw3op3Hzq/d+gagClABX4aKwcCuL5LxKRoF/gczpNxStjvv+P0CrXxepPG3iL49DBeEUlZx00rQOk1lkqDOUEHhN+s/nRdAZYSjLwxyAWC0+EKD5aU8vhY2+H9xfDdwenpER3ubwM9ZvHbiOn+bGf2Cx39XNGGx8wvfsE6RNQDpbi9Ebb5qAsFZMPb8NHn7bYR67blvVz3Vb7f80PSkM7gw+ToIbyZzgDJY710EtS+k8DyXlXwItCHpWzRjUKOPU+Ie+0fEF31zTE1o3sindkEdBsS2UYL319usXAsdVr13blcW5FYh9AlRRMXXrcHZAfmllxBrDmvGt2KGBWLyuVSyoRyiY8VohAKHufjISIbcIzh3qDMYq6vZt3ayXgNENOgSP2Q93J00Sj7/Ox5mdKAmKg1o+FMPRtUJDWH+KlMCFoxiMw==; 25:iG7xLbjknuE9q18yBcElGwB7rd7YXbuULOFjNTzyx+te6bNdfHkt1VQHtRXmJkdD/Qosm2TM7h+bKviRGrcVjsOLl4ERqhfhjsh6kBhOGZhupCUB9hHKVJDblHt8ru31O/cSKN6pJr0V6r5OJL7MRkhLGZxsn/geBzJ3PFzKd2pqJJrt4vyX6X31vI9ofiYHRd72K0r66nWd0LRDC7wrwHCVU8Lgfg05/EabjHRYZUuhwJbsoRH0NDene9iybYF2qP3yNyCrITCq/CKjYDtK0KDxmFRJ0tUsBzyvsnzCnq3D45J6jSi2P4fKQfRKXlfoiHavcmR4TQcTlT5uRxKZ+HwKWhD51TWXQ0PhroY+cDPanmYOCB0PLkbuMJiHaaQaDi8w3jYoo6uCcdKOAa/JagP8tpgMZHV/CeTBhbMQBhg/hxVTSodVWhY3+Tc//63to6SK6eP1uUFdWgvtpdX/NA== X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB374; 31:LQzd/1XIVVeRLu6d2auOJJOetJMzvwdKapBCq9On9cI/sFXm3YzyNNhSpVNEkVe3HrLXj30PKuihJad/m+u22XcvQsqAptpN5Yu3mhZ05x2MowURuwFPUqYSBrKs11M+yHfCjablhg6TfymduZwL+9t25Ioo18GNfawOtkjN18wvagiC4VHb8zXFFUPGw7qyY7/5yqbnd7QH/z1bIX8wx5SR/CQCEviDm9TIHEQaTPQYYOFXNlRTRL1PHiaDQUCkDMhHOQkJet/lLA5EU9iFjg==; 20:LcfGb29fv4KaMnBM4sxcPrVjU8wc/TnrVrWdE4qZbL0O669jnY9VyuFoLSP/e3uxUAkb2ZFZqeDwqXzQgyAk8z7JpdCmG/GrH+6Ey6bg2Ab8N/inl1nSUw3aIDophsnIe4EbzvYyT9XhZKmRRhSSWMNYJMxS7NQoDsDfFVyRR6jannj07AfC+Bnke2fJx/bIxt/MYBEcMQNt+L1Z6q9qHlu0wkM6JsFvoSxbuZnVCvGieXoMcpB+Luml5u+YJUnhrm6+qVXCLALWd+B5zcfYwx/bmOu5/zZZJjS7HDTGSoE4vvXmIX4VDU9alfoOFVSBmFAfmE2KuBbaI/eacTyJULgoUHFeYih5n+5Ap1mX11DiIOdJg1eUQFXtu7WZ2wITERaR/qrHWvZRhIEGARfdnPvpBEA+3jGpuv33cP/Wh36qn484QchzZrabpW78uMYnmcnpvZBI7lbBWmxpU3o0VxW7gg96B7sr7aUhiuLnENzdj4LCMvCoKCtZXXAJGT3OLJN8g4vWFlUwB62FXF1iHKZPgV3Yq6aLE1zlIS8XX0X9i7MVXq70qAIp6ONutuIy6kdZvCcC2fvBbHkS8io+wHEoOLY9Ng5KTVsnNCSQCE4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040434)(601004)(2401047)(5005006)(13021025)(13013025)(13023025)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(201703131423059)(201702281528059)(201703061421059)(201703061750059)(20161123558025)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:AMSPR07MB374; BCL:0; PCL:0; RULEID:; SRVR:AMSPR07MB374; X-Microsoft-Exchange-Diagnostics: 1; AMSPR07MB374; 4:6FNtaHNnQKTabZP2TldM8NVNYyuvybvnBnR6eBcJfYilYNtO72etcfI/athiwziJK8eBDeA51ClRg0zQH2+X5yZp/GVDQKS6osc9HPdaU5pCJ4s3URMXqgiHzjux/YjR82FRDazMLynxBqhVHF0evjEUZnUigEbQtIYTAIEj0dwa+mHlqovJkivUTK9knJMwKWNrszSJddhGuOsDwHll1LAucDXRxUL+CxeIQubvBUqwk3JUXVfYUZH1aHWSigEWzBx1Qrcwl5UuhQe0kUi+u9ebmqgnbPM/3aeQhW5ntYGSEtMPlBLFZKz4gq3ZTND3gF1nmxl6cMfPxkH5OCEf7CEU7oWTkSsb6zhLK5yGbhNNU69M9lu0qqDI3S5hXzvVg1kYOe3xsQQ6bqauEPlJl3pJZfEpjbj2RY5msvFnvnpNUgvUZ7wL/RjzzClUxTcbtt2LGbCA4FQg3eR9l2fPfe99IKErmuwhf/D3urwqEcF17id73WCaJZ0wHitutiXrRndTIBFZ4abl6i9rjZPWZbDwpLbRpNaiMSTzEGJqlTjULPywUaJHHMp67Y7WMxBSkZUFWw2xxPK/3nQViS01f9bHhXfgCv+VafN1427gbBUGtXbplq5bXWF+1DIAX3UllUSiMY/4O0fAIjYSNNBhINAy20z3SM+I3kMVs7QKGu7TQqCXX3lUkEpfBrG+5X/XXkcO8quX3xa0HQN6dLYrzOmfPHTrjqWTb/whImts34sjr13uUYSBZAQuqK8/X9zYx99dnxHv5N4zEcZspfkdiG+F+sD5Q3XhGaP8kKdTTb+QNHk4djES4nHSQ7HJ4FlF X-Forefront-PRVS: 0260457E99 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AMSP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xTVWU2TWf56KQY+CtWbnIfaj5A== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2017 11:07:54.1464 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.241]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR07MB374 Subject: [lng-odp] [API-NEXT PATCH] api: packet: add per packet checksum control X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Checksum insertion has pktio interface level configuration options. Per packet override is needed for example when L4 checksumming is enabled and application forwards packets. Forwarded packets need to maintain original, end-to-end checksum value. Signed-off-by: Petri Savolainen --- include/odp/api/spec/packet.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) -- 2.8.1 Reviewed-by: Balasubramanian Manoharan diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 92c35ae..5439f23 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -1366,6 +1366,32 @@ uint32_t odp_packet_l4_offset(odp_packet_t pkt); int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset); /** + * Layer 3 checksum insertion override + * + * Override checksum insertion configuration per packet. This per packet setting + * overrides a higher level configuration for checksum insertion into a L3 + * header during packet output processing. + * + * @param pkt Packet handle + * @param l3 0: do not insert L3 checksum + * 1: insert L3 checksum + */ +void odp_packet_l3_chksum_insert(odp_packet_t pkt, int l3); + +/** + * Layer 4 checksum insertion override + * + * Override checksum insertion configuration per packet. This per packet setting + * overrides a higher level configuration for checksum insertion into a L4 + * header during packet output processing. + * + * @param pkt Packet handle + * @param l4 0: do not insert L4 checksum + * 1: insert L4 checksum + */ +void odp_packet_l4_chksum_insert(odp_packet_t pkt, int l4); + +/** * Packet flow hash value * * Returns the hash generated from the packet header. Use