From patchwork Wed Feb 4 21:07:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44393 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EFD3721173 for ; Wed, 4 Feb 2015 21:08:33 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf2911501lbv.1 for ; Wed, 04 Feb 2015 13:08:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state: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=PdAhshHAhwL/rhM9vxshK2FtqCGXl8hdUBKTC85Gg50=; b=ZF9cnjBQvwzzsNPTPVLokBkI/mipok3QIXDaaE430y2CTR0pt6V/BJaQ8NkgTPq48c 8F/nFmKymY3qobpxPooDbyvBycwhndOKS1iIEfPHwGLbqYtTY6nzhJLEA6epq0b8U0ic bThZqZkW3G1AzhS7SAKx8wuUpQQcSQj1DKWYPImRhjyngILiK1Nv1KyQ2OYo6qwHl7vn zeBzenGRPOgl+nga6tPIPDaiJRodk5FaZu6l/kMwd4b7dDBVyI3dkNKHdRv55pdMBhQJ dB/M6l7qFeL0aQfAtRpLU4zP5aJExasQj4ehxie0y4PNsROLYWOJKSfuO2aC0L6u8buG 3xEQ== X-Gm-Message-State: ALoCoQls/m3IT5e7jM7yfufJ4CKSqAJmHxLsiuCO/Ub3J5NAf+zL4HeJCVd/UV/AkPUZPNkvLa6y X-Received: by 10.194.221.65 with SMTP id qc1mr33366wjc.7.1423084113006; Wed, 04 Feb 2015 13:08:33 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.229 with SMTP id v5ls82122lav.55.gmail; Wed, 04 Feb 2015 13:08:32 -0800 (PST) X-Received: by 10.152.20.4 with SMTP id j4mr279906lae.29.1423084112830; Wed, 04 Feb 2015 13:08:32 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id u3si2398952laj.100.2015.02.04.13.08.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 13:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id z12so3760778lbi.7 for ; Wed, 04 Feb 2015 13:08:32 -0800 (PST) X-Received: by 10.112.122.52 with SMTP id lp20mr309639lbb.98.1423084112740; Wed, 04 Feb 2015 13:08:32 -0800 (PST) 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.35.133 with SMTP id h5csp744027lbj; Wed, 4 Feb 2015 13:08:31 -0800 (PST) X-Received: by 10.140.19.175 with SMTP id 44mr416870qgh.79.1423084111348; Wed, 04 Feb 2015 13:08:31 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id l39si3442814qgd.26.2015.02.04.13.08.30 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 13:08:31 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJ7BU-0006wC-7N; Wed, 04 Feb 2015 21:08:28 +0000 Received: from mail-lb0-f181.google.com ([209.85.217.181]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJ7Au-0006ow-01 for lng-odp@lists.linaro.org; Wed, 04 Feb 2015 21:07:52 +0000 Received: by mail-lb0-f181.google.com with SMTP id u10so3730537lbd.12 for ; Wed, 04 Feb 2015 13:07:46 -0800 (PST) X-Received: by 10.112.199.196 with SMTP id jm4mr248163lbc.53.1423084066474; Wed, 04 Feb 2015 13:07:46 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id r7sm567954lbs.37.2015.02.04.13.07.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 13:07:45 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Wed, 4 Feb 2015 22:07:31 +0100 Message-Id: <1423084051-12962-10-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423084051-12962-1-git-send-email-ola.liljedahl@linaro.org> References: <1423084051-12962-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv6 9/9] api: odp_packet_io.h: clean up pktio parameter names and descriptions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ola.liljedahl@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.176 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 Use 'pktio' as the parameter name for all packet IO handles. Unify the descriptions to say "packet IO handle". Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/packet_io.h | 71 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 0151d86..2629d84 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -69,12 +69,12 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool); /** * Close an ODP packet IO instance * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * * @retval 0 on success * @retval <0 on failure */ -int odp_pktio_close(odp_pktio_t id); +int odp_pktio_close(odp_pktio_t pktio); /** * Return a packet IO handle for an already open device @@ -89,144 +89,143 @@ odp_pktio_t odp_pktio_lookup(const char *dev); /** * Receive packets * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * @param pkt_table[] Storage for received packets (filled by function) * @param len Length of pkt_table[], i.e. max number of pkts to receive * * @return Number of packets received * @retval <0 on failure */ -int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], int len); +int odp_pktio_recv(odp_pktio_t pktio, odp_packet_t pkt_table[], int len); /** * Send packets * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * @param pkt_table[] Array of packets to send * @param len length of pkt_table[] * * @return Number of packets sent * @retval <0 on failure */ -int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], int len); +int odp_pktio_send(odp_pktio_t pktio, odp_packet_t pkt_table[], int len); /** * Set the default input queue to be associated with a pktio handle * - * @param id ODP packet IO handle - * @param queue default input queue set + * @param pktio ODP packet IO handle + * @param queue default input queue set * @retval 0 on success * @retval <0 on failure */ -int odp_pktio_inq_setdef(odp_pktio_t id, odp_queue_t queue); +int odp_pktio_inq_setdef(odp_pktio_t pktio, odp_queue_t queue); /** * Get default input queue associated with a pktio handle * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * * @return Default input queue set * @retval ODP_QUEUE_INVALID on failure */ -odp_queue_t odp_pktio_inq_getdef(odp_pktio_t id); +odp_queue_t odp_pktio_inq_getdef(odp_pktio_t pktio); /** * Remove default input queue (if set) * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * * @retval 0 on success * @retval <0 on failure */ -int odp_pktio_inq_remdef(odp_pktio_t id); +int odp_pktio_inq_remdef(odp_pktio_t pktio); /** * Query default output queue * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * * @return Default out queue * @retval ODP_QUEUE_INVALID on failure */ -odp_queue_t odp_pktio_outq_getdef(odp_pktio_t id); +odp_queue_t odp_pktio_outq_getdef(odp_pktio_t pktio); /** * Return the currently configured MTU value of a packet IO interface. * - * @param[in] id ODP packet IO handle. + * @param[in] pktio ODP packet IO handle. * * @return MTU value on success * @retval <0 on failure */ -int odp_pktio_mtu(odp_pktio_t id); +int odp_pktio_mtu(odp_pktio_t pktio); /** * Enable/Disable promiscuous mode on a packet IO interface. * - * @param[in] id ODP packet IO handle. + * @param[in] pktio ODP packet IO handle. * @param[in] enable 1 to enable, 0 to disable. * * @retval 0 on success * @retval <0 on failure */ -int odp_pktio_promisc_mode_set(odp_pktio_t id, odp_bool_t enable); +int odp_pktio_promisc_mode_set(odp_pktio_t pktio, odp_bool_t enable); /** * Determine if promiscuous mode is enabled for a packet IO interface. * - * @param[in] id ODP packet IO handle. + * @param[in] pktio ODP packet IO handle. * * @retval 1 if promiscuous mode is enabled. * @retval 0 if promiscuous mode is disabled. * @retval <0 on failure */ -int odp_pktio_promisc_mode(odp_pktio_t id); +int odp_pktio_promisc_mode(odp_pktio_t pktio); /** * Get the default MAC address of a packet IO interface. * - * @param id ODP packet IO handle + * @param pktio ODP packet IO handle * @param[out] mac_addr Output buffer (use ODP_PKTIO_MACADDR_MAXSIZE) * @param size Size of output buffer * * @return Number of bytes written (actual size of MAC address) * @retval <0 on failure */ -ssize_t odp_pktio_mac_addr(odp_pktio_t id, void *mac_addr, ssize_t size); +ssize_t odp_pktio_mac_addr(odp_pktio_t pktio, void *mac_addr, ssize_t size); /** * Setup per-port default class-of-service. * - * @param[in] pktio_in Ingress port identifier. + * @param[in] pktio Ingress port pktio handle. * @param[in] default_cos Class-of-service set to all packets arriving - * at the pktio_in ingress port, + * at this ingress port, * unless overridden by subsequent * header-based filters. * * @retval 0 on success * @retval <0 on failure */ -int odp_pktio_default_cos_set(odp_pktio_t pktio_in, odp_cos_t default_cos); +int odp_pktio_default_cos_set(odp_pktio_t pktio, odp_cos_t default_cos); /** * Setup per-port error class-of-service * - * @param[in] pktio_in Ingress port identifier. + * @param[in] pktio Ingress port pktio handle. * @param[in] error_cos class-of-service set to all packets arriving - * at the pktio_in ingress port - * that contain an error. + * at this ingress port that contain an error. * * @retval 0 on success * @retval <0 on failure * * @note Optional. */ -int odp_pktio_error_cos_set(odp_pktio_t pktio_in, odp_cos_t error_cos); +int odp_pktio_error_cos_set(odp_pktio_t pktio, odp_cos_t error_cos); /** * Setup per-port header offset * - * @param[in] pktio_in Ingress port identifier. + * @param[in] pktio Ingress port pktio handle. * @param[in] offset Number of bytes the classifier must skip. * * @retval 0 on success @@ -234,12 +233,12 @@ int odp_pktio_error_cos_set(odp_pktio_t pktio_in, odp_cos_t error_cos); * @note Optional. * */ -int odp_pktio_skip_set(odp_pktio_t pktio_in, uint32_t offset); +int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t offset); /** * Specify per-port buffer headroom * - * @param[in] pktio_in Ingress port identifier. + * @param[in] pktio Ingress port pktio handle. * @param[in] headroom Number of bytes of space preceding * packet data to reserve for use as headroom. * Must not exceed the implementation @@ -250,12 +249,12 @@ int odp_pktio_skip_set(odp_pktio_t pktio_in, uint32_t offset); * * @note Optional. */ -int odp_pktio_headroom_set(odp_pktio_t pktio_in, uint32_t headroom); +int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom); /** * Get printable value for an odp_pktio_t * - * @param id odp_pktio_t handle to be printed + * @param pktio odp_pktio_t handle to be printed * @return uint64_t value that can be used to print/display this * handle * @@ -263,7 +262,7 @@ int odp_pktio_headroom_set(odp_pktio_t pktio_in, uint32_t headroom); * to enable applications to generate a printable value that represents * an odp_pktio_t handle. */ -uint64_t odp_pktio_to_u64(odp_pktio_t id); +uint64_t odp_pktio_to_u64(odp_pktio_t pktio); /** * @}