From patchwork Fri Apr 10 15:52:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 47057 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9FC7E21416 for ; Fri, 10 Apr 2015 15:54:18 +0000 (UTC) Received: by wgin8 with SMTP id n8sf5286054wgi.0 for ; Fri, 10 Apr 2015 08:54:17 -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:in-reply-to:references: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=sZhYVZPbxUTaoZ7nwEKEzw6UJS4FZMznMg2B7390Pfo=; b=eYvYqdhs7hw1lCmeCa1J3EPb/h4a3QrsL/tvYwzf/AbwvHG953hzfAf2nQF3MW9Hma qh5NluptwPVHHR25mmodkW231ln8+LHNL282a+9v1NSLJO/tDlRpgF3T6T8GpNXMbIB3 611CUlEzVT4NRzzt+gB/cj15tnvTqpM0Dgo2TvWtVsWzC+2rC4D6t1HpChZTdrdU+1Hj nmBWc8w25FPwppnqxhg397QSiZXXIJims6FQI+5Ea9zSeEUOaFSEjYEd9/oxZh5yzR3L fVMC2VuSbE3s9jbkcY3YKQjDuZQY83ZpcLJFsMT+I5g8gojP5uFyudBCiIheK1YdRZU7 rpew== X-Gm-Message-State: ALoCoQnyYbYCLc65XwQos1TZt6XGbrm9BPBAq2yGAaS4EA7WekvuD5cHXIpo+12gzMLGADX0DvPr X-Received: by 10.152.23.7 with SMTP id i7mr446831laf.1.1428681257920; Fri, 10 Apr 2015 08:54:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.103 with SMTP id s7ls389846lag.105.gmail; Fri, 10 Apr 2015 08:54:17 -0700 (PDT) X-Received: by 10.152.5.7 with SMTP id o7mr1991154lao.51.1428681257780; Fri, 10 Apr 2015 08:54:17 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id dh4si1794280lac.35.2015.04.10.08.54.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 08:54:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcga7 with SMTP id ga7so16902650lbc.1 for ; Fri, 10 Apr 2015 08:54:17 -0700 (PDT) X-Received: by 10.112.29.36 with SMTP id g4mr2084977lbh.56.1428681257673; Fri, 10 Apr 2015 08:54:17 -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.67.65 with SMTP id l1csp1189288lbt; Fri, 10 Apr 2015 08:54:17 -0700 (PDT) X-Received: by 10.140.97.203 with SMTP id m69mr2494696qge.39.1428681256529; Fri, 10 Apr 2015 08:54:16 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e145si2157387qhc.95.2015.04.10.08.53.56; Fri, 10 Apr 2015 08:54:16 -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 BF4F065116; Fri, 10 Apr 2015 15:53:56 +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=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=ham autolearn_force=no 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 42DF064E46; Fri, 10 Apr 2015 15:53:32 +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 8E9436509A; Fri, 10 Apr 2015 15:53:25 +0000 (UTC) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by lists.linaro.org (Postfix) with ESMTPS id D99B4650F6 for ; Fri, 10 Apr 2015 15:52:26 +0000 (UTC) Received: by obbeb7 with SMTP id eb7so20865062obb.3 for ; Fri, 10 Apr 2015 08:52:26 -0700 (PDT) X-Received: by 10.60.63.99 with SMTP id f3mr2782271oes.9.1428681146120; Fri, 10 Apr 2015 08:52:26 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id ke9sm1895845obb.9.2015.04.10.08.52.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Apr 2015 08:52:25 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 10 Apr 2015 10:52:13 -0500 Message-Id: <1428681138-24954-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1428681138-24954-1-git-send-email-bill.fischofer@linaro.org> References: <1428681138-24954-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv4 1/6] api: packet: add user metadata APIs 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: bill.fischofer@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.180 as permitted sender) smtp.mail=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 Signed-off-by: Bill Fischofer --- include/odp/api/packet.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/odp/api/packet.h b/include/odp/api/packet.h index a31c54d..840e152 100644 --- a/include/odp/api/packet.h +++ b/include/odp/api/packet.h @@ -467,6 +467,26 @@ uint64_t odp_packet_user_u64(odp_packet_t pkt); void odp_packet_user_u64_set(odp_packet_t pkt, uint64_t ctx); /** + * Get address of user metadata associated with a packet + * + * @param pkt Packet handle + * + * @retval addr Address of the user metadata associated with pkt + * @retval NULL The packet has no user metadata. + */ +void *odp_packet_user_data(odp_packet_t pkt); + +/** + * Get size of user metadata associated with a packet + * + * @param pkt Packet handle + * + * @return Number of bytes of user metadata associated + * with pkt. + */ +uint32_t odp_packet_user_data_size(odp_packet_t pkt); + +/** * Layer 2 start pointer * * Returns pointer to the start of the layer 2 header. Optionally, outputs