From patchwork Thu Oct 26 12:00:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 117205 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp684907qgn; Thu, 26 Oct 2017 05:10:29 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TufqwM7DlfQ8UVbI8Pm7giPoZMswHcK5hLOjd0JR2Ouab0G8teTlZ3G8+tn9XAqbrlWwtA X-Received: by 10.200.3.205 with SMTP id z13mr37189808qtg.25.1509019829564; Thu, 26 Oct 2017 05:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509019829; cv=none; d=google.com; s=arc-20160816; b=JV9JGXjzPamkhBTAxY2G26hSMmTlcv7Kg4+tCujhFZ+75K7DkEQhAIWzmVgyeMJ263 qEzUpnMh3QMBm+qQTD+QapD99GohtsVRJ5bg7+9jgkCm3be8JjCQg+iP61xLqYn6KzYq neiSOhmTsSJFuNCwoqrY2J2sD6VZmOXZ67e0OSVHs1aaCUzEZ7UAxgwFm2l93DC19N+o lFlg3J/Y9rfTm6wXNdA4PuyJUeuycn4RMcwevtab7pHCCImjaBgEnvZQg2IBRfVHRF0w XdCCWp2lVLY4l1sw8eMGTq1oYL9KSJlcV/OekUanCeV3mtgcbT/chZKkbHBAPz0dP4uN wlJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=k87Yzpfzw5Ch5xSF1uYSlhxfxJ64tUMCL/mvqfyAVU4=; b=psuzBsvNPY/N9dE93KK0DmSFMbPIUcME6tYWATdp0w44XIZIU2sHNV+K2I3wUVxLLY VpaBwi19VhYCP28hoks/K0cxU2CzWHFfPvE8iN4QGdHeOhe7NH5+HPWtmEmebotwZ/Mv bGNY5NS1OYgWyWIzxjq81sw9qSxNsbxw7oh1jTfEZEUo9760NMDacSEMLUeayRkYEJAA xY4v0HVxDCrYfNlTk2BhFcWK4YadJlaX8pjcqdbaeeVSRDaltvVCiC9UlKwffDUgOWjx U0939+7/+2At/LOWNP227p3Q1EyHE+lVk8HPQDBfl6w3GX1BUDL7YfEfZ9KwPFOQ9xea s3fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id m39si801501qkh.312.2017.10.26.05.10.29; Thu, 26 Oct 2017 05:10:29 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2D84961009; Thu, 26 Oct 2017 12:10:29 +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=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 0AA376294F; Thu, 26 Oct 2017 12:03:05 +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 3CB54608D9; Thu, 26 Oct 2017 12:02:01 +0000 (UTC) Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by lists.linaro.org (Postfix) with ESMTPS id B608060BFA for ; Thu, 26 Oct 2017 12:00:54 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 3AE4849749 for ; Thu, 26 Oct 2017 15:00:53 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9Yzkn8yTUx-0qRKpJn6; Thu, 26 Oct 2017 15:00:52 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id G4ilPoyJyx-0pN8bAEm; Thu, 26 Oct 2017 15:00:51 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 26 Oct 2017 15:00:20 +0300 Message-Id: <1509019221-3453-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509019221-3453-1-git-send-email-odpbot@yandex.ru> References: <1509019221-3453-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 242 Subject: [lng-odp] [PATCH API-NEXT v3 2/3] linux-gen: packet: dummy ones complement implementation 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" From: Petri Savolainen Added dummy implementation of ones complement calls. Linux generic implementation does not calculate the sum for all incoming packets as it would be wasteful in SW. It's better to wait until application asks it with odp_chksum_ones_comp16(). Later on, the sum could be stored into the packet header, if we found a way to get it from the HW. Signed-off-by: Petri Savolainen --- /** Email created from pull request 242 (psavol:next-checksum-metadata) ** https://github.com/Linaro/odp/pull/242 ** Patch: https://github.com/Linaro/odp/pull/242.patch ** Base sha: 63d92eb289261d1534b5b9e1e04291faa5e45d30 ** Merge commit sha: 5c16247e4ce2735df80c66f11dd9c9708e8c905f **/ platform/linux-generic/odp_packet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 603ac7181..f153ea2db 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -1255,6 +1255,14 @@ int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset) return 0; } +uint16_t odp_packet_ones_comp(odp_packet_t pkt, odp_packet_data_range_t *range) +{ + (void)pkt; + range->length = 0; + range->offset = 0; + return 0; +} + void odp_packet_flow_hash_set(odp_packet_t pkt, uint32_t flow_hash) { odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt);