From patchwork Thu Apr 21 18:31:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 66404 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp305830qge; Thu, 21 Apr 2016 11:32:26 -0700 (PDT) X-Received: by 10.50.4.9 with SMTP id g9mr5756863igg.35.1461263546579; Thu, 21 Apr 2016 11:32:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id ga4si5204947igd.17.2016.04.21.11.32.25; Thu, 21 Apr 2016 11:32:26 -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 dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 8FADB6877C; Thu, 21 Apr 2016 18:32:25 +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=-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 [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 88DCC6876E; Thu, 21 Apr 2016 18:32:21 +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 22CCB68774; Thu, 21 Apr 2016 18:32:15 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id 45BD368769 for ; Thu, 21 Apr 2016 18:32:14 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id n3so146941643wmn.0 for ; Thu, 21 Apr 2016 11:32:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hIc04bH8b7+z7ESmFPdHo+besnlKmZzqhsljKCXMGWM=; b=VW+oXFSoSFr8xZ1Od19/yGY5/x/leLDRPrI0IK9qcgrJyy3D84/5+M5X6x2V6J0Hmn oWqrg4gUUbAQLgdZUeAMIFVwS7fX+D7ik3Ne7QygOm4pY3dIhvHuz/8Y0Zw08KXzM51V HFmEr5IW0MZnPLISUSl0AUf1VUicwI4HPMBej+4IukpmnP1Q/mptUH8Rs1oyZTdHqm2k 66L8Y0S5l+t1ex55U5kr/1TyQGqoSIUyx1TWq9cj6S90fVMNFqEp9qbH6KnrXP+qUAlh dtdN4M88VzaCgEOe22ElI6egTwcZsYr4adg7eQjol65Dae6+KDX6xZuHJSPTtmw4ZCfK WUnA== X-Gm-Message-State: AOPr4FWzq02Txiug3MtMKKdHbRlrBST4Sw4xr7nm8oWsOpA5dMcvOc9q2vw/MUCTQXmPiDsCEl0= X-Received: by 10.194.85.161 with SMTP id i1mr17682055wjz.95.1461263533402; Thu, 21 Apr 2016 11:32:13 -0700 (PDT) Received: from localhost.localdomain ([195.11.233.227]) by smtp.googlemail.com with ESMTPSA id a1sm4067657wje.43.2016.04.21.11.32.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2016 11:32:12 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Thu, 21 Apr 2016 19:31:36 +0100 Message-Id: <1461263496-21805-1-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Cc: petri.savolainen@nokia.com Subject: [lng-odp] [API-NEXT PATCH] api: queue: remove const qualifier of passed down event array 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" As the description says, normally this function consumes the events, which means there is no point to expect the array to stay intact. Other functions like odp_pktout_send() doesn't do that as well. Signed-off-by: Zoltan Kiss Reviewed-by: Bill Fischofer diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 7626ca7..c420fde 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -237,7 +237,7 @@ int odp_queue_enq(odp_queue_t queue, odp_event_t ev); * @return Number of events actually enqueued (0 ... num) * @retval <0 on failure */ -int odp_queue_enq_multi(odp_queue_t queue, const odp_event_t events[], int num); +int odp_queue_enq_multi(odp_queue_t queue, odp_event_t events[], int num); /** * Queue dequeue diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 342ffa2..29faa29 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -647,7 +647,7 @@ int queue_enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], return num; /* All events enqueued */ } -int odp_queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int num) +int odp_queue_enq_multi(odp_queue_t handle, odp_event_t ev[], int num) { odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX]; queue_entry_t *queue;