From patchwork Thu Aug 13 17:52:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 52407 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id B85322031F for ; Thu, 13 Aug 2015 17:52:48 +0000 (UTC) Received: by lbsm2 with SMTP id m2sf18945952lbs.1 for ; Thu, 13 Aug 2015 10:52:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=R2WAlOzJfnNl02mfISKI4JUnA37ZeshZYaIBqz/FlJA=; b=FDbEWBXV22MVM1n8EPSw2NLBVOpeDmlkK/IkgcmoFI8pSl8Vs1llW1wGX5jSvrmLtc 8T1OqpKL+cSEbRDXZL+oTETjqBfHwFAoA+ePB29s7SHtgUayTclaqejzYzjZ4ok4IyJK ne7bWdMcoD4uMl9RhsqjSwmXJyvsbo4Py1ezlBstBLaMFolx85W9FslwqUxMHdOve+9Z 3GSu61x4ehpoQL/Clpp+ntHBxh8rhb+HeeGvpthnTIgQLCuLLAME+qyek9wncsdKm8nV X195ZAxGsh7b1SFX+i8L1cHCUxjdU0EmhlNFKZo3yvcMXfX7j846z3PQKygV8XSwXikl 4Icw== X-Gm-Message-State: ALoCoQnehXyrpMJwGT2y0T6CSKDZX1S6TuxYdwTWDFxVRfu4HgPgoZUuybSm/Y/N5KF+vEs5k6Fm X-Received: by 10.113.3.8 with SMTP id bs8mr11627710lbd.23.1439488367703; Thu, 13 Aug 2015 10:52:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.33 with SMTP id f1ls261739lab.49.gmail; Thu, 13 Aug 2015 10:52:47 -0700 (PDT) X-Received: by 10.112.210.6 with SMTP id mq6mr37743218lbc.83.1439488367547; Thu, 13 Aug 2015 10:52:47 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id oa2si3323104lbb.128.2015.08.13.10.52.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 10:52:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcbn3 with SMTP id bn3so31333820lbc.2 for ; Thu, 13 Aug 2015 10:52:47 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr38043593lbb.35.1439488367391; Thu, 13 Aug 2015 10:52:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1092805lba; Thu, 13 Aug 2015 10:52:46 -0700 (PDT) X-Received: by 10.140.81.135 with SMTP id f7mr70674563qgd.38.1439488366537; Thu, 13 Aug 2015 10:52:46 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i103si4982635qkh.3.2015.08.13.10.52.45; Thu, 13 Aug 2015 10:52:46 -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; Received: by lists.linaro.org (Postfix, from userid 109) id F1A8962205; Thu, 13 Aug 2015 17:52:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 5A32E621FD; Thu, 13 Aug 2015 17:52:41 +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 96D0D62203; Thu, 13 Aug 2015 17:52:38 +0000 (UTC) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by lists.linaro.org (Postfix) with ESMTPS id 97329621FC for ; Thu, 13 Aug 2015 17:52:37 +0000 (UTC) Received: by wicne3 with SMTP id ne3so148751623wic.0 for ; Thu, 13 Aug 2015 10:52:36 -0700 (PDT) X-Received: by 10.180.38.68 with SMTP id e4mr61936783wik.9.1439488356720; Thu, 13 Aug 2015 10:52:36 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by smtp.googlemail.com with ESMTPSA id im10sm280264wjb.40.2015.08.13.10.52.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Aug 2015 10:52:36 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 13 Aug 2015 18:52:26 +0100 Message-Id: <1439488346-5676-1-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v2] api: packet: allow access to packet RSS hash values X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoltan.kiss@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Applications can read the computed hash (if any) and set it if they changed the packet headers or if the platform haven't calculated the hash. Signed-off-by: Zoltan Kiss --- v2: - focus on RSS hash only - use setter/getter's include/odp/api/packet.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index 3a454b5..c6e8a4b 100644 --- a/include/odp/api/packet.h +++ b/include/odp/api/packet.h @@ -48,6 +48,11 @@ extern "C" { * Invalid packet segment */ +/** + * @def ODP_PACKET_RSS_INVALID + * RSS hash is not set + */ + /* * * Alloc and free @@ -605,6 +610,29 @@ uint32_t odp_packet_l4_offset(odp_packet_t pkt); int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset); /** + * RSS hash value + * + * Returns the RSS hash stored for the packet. + * + * @param pkt Packet handle + * + * @return Hash pointer + * @retval ODP_PACKET_RSS_INVALID if RSS hash is not set. + */ +uint32_t odp_packet_rss_hash(odp_packet_t pkt); + +/** + * Set RSS hash value + * + * Store the RSS hash for the packet. + * + * @param pkt Packet handle + * @param rss_hash Hash value to set + * + */ +void odp_packet_rss_hash_set(odp_packet_t pkt, uint32_t rss_hash); + +/** * Tests if packet is segmented * * @param pkt Packet handle