From patchwork Wed Apr 27 21:59:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 66844 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2433127qge; Wed, 27 Apr 2016 15:05:26 -0700 (PDT) X-Received: by 10.50.38.129 with SMTP id g1mr14101676igk.34.1461794726648; Wed, 27 Apr 2016 15:05:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v11si12385585iov.196.2016.04.27.15.05.26; Wed, 27 Apr 2016 15:05: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 F36FB611FA; Wed, 27 Apr 2016 22:05: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_H2, 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 C5ACE610F7; Wed, 27 Apr 2016 22:04:45 +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 8136C611FB; Wed, 27 Apr 2016 22:04:11 +0000 (UTC) Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) by lists.linaro.org (Postfix) with ESMTPS id 729996156A for ; Wed, 27 Apr 2016 21:59:54 +0000 (UTC) Received: by mail-qk0-f175.google.com with SMTP id q76so22096404qke.2 for ; Wed, 27 Apr 2016 14:59:54 -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:in-reply-to :references; bh=iOO2/2vSxwCduDnSgnIdoNxTKkaJavsPUchw8vuqD6c=; b=WnDAHmnAQhL8Fqzf+lvG3SGIExjFErXE1ZPlRqLaBThKT9jw8mvSzjlQOpcnnofQjX Y9C6AlJFWdAk8metmOsOJVni5SBxIA+9z816KNK+GXoH5B9/2zKLBmlWty2g3PL9XtcS ilqZTaDa+GxROcFKPN/NnPnT4zM9urHyNPmPYd4xvwx1/ONZbT3M9+iSgFRloFauEUWD y4R7VqEFoY0uO5cbs8UHanG643ntcHnj5V/6YCJHGbaxxfY/Qf7K9uXC8jpQE//SElLx tAZgIHKU+ITPx9AqGxp6SVF/7uwCHZ2yLug+RKD/L7RXPdUZ6ZLnoy+6dmGiLHFkfJ6v Ol2Q== X-Gm-Message-State: AOPr4FWlA4dxl1ZDlWArsqnvqfL57i/9fcNUOTxv7FLipv4iKmyYeMEJDS+br5EOn0inC1vN86Y= X-Received: by 10.55.130.66 with SMTP id e63mr11522764qkd.128.1461794394224; Wed, 27 Apr 2016 14:59:54 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id d145sm1859506qhc.31.2016.04.27.14.59.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Apr 2016 14:59:53 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 27 Apr 2016 17:59:35 -0400 Message-Id: <1461794375-15214-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1461794375-15214-1-git-send-email-mike.holmes@linaro.org> References: <1461794375-15214-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/2] doc: reference odp_pktio_open and don't copy it 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" this patch shows how to reference the doxygen api specification and not cut and paste it into the asciidoc source. it does this for just the odp_pktio_open api Signed-off-by: Mike Holmes --- doc/users-guide/users-guide-pktio.adoc | 57 +--------------------------------- include/odp/api/spec/packet_io.h | 2 ++ 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/doc/users-guide/users-guide-pktio.adoc b/doc/users-guide/users-guide-pktio.adoc index 2dd0b15..bfd588d 100644 --- a/doc/users-guide/users-guide-pktio.adoc +++ b/doc/users-guide/users-guide-pktio.adoc @@ -30,62 +30,7 @@ or *Closed* via the +odp_pktio_close()+ API to return the PktIO to the PktIO objects begin life by being _opened_ via the call: [source,c] ----- -/** - * Open a packet IO interface - * - * An ODP program can open a single packet IO interface per device, attempts - * to open an already open device will fail, returning ODP_PKTIO_INVALID with - * errno set. Use odp_pktio_lookup() to obtain a handle to an already open - * device. Packet IO parameters provide interface level configuration options. - * - * Packet input queue configuration must be setup with - * odp_pktin_queue_config() before odp_pktio_start() is called. When packet - * input mode is ODP_PKTIN_MODE_DISABLED, odp_pktin_queue_config() call is - * optional and will ignore all parameters. - * - * Packet output queue configuration must be setup with - * odp_pktout_queue_config() before odp_pktio_start() is called. When packet - * output mode is ODP_PKTOUT_MODE_DISABLED or ODP_PKTOUT_MODE_TM, - * odp_pktout_queue_config() call is optional and will ignore all parameters. - * - * Packet receive and transmit on the interface is enabled with a call to - * odp_pktio_start(). If not specified otherwise, any interface level - * configuration must not be changed when the interface is active (between start - * and stop calls). - * - * In summary, a typical pktio interface setup sequence is ... - * * odp_pktio_open() - * * odp_pktin_queue_config() - * * odp_pktout_queue_config() - * * odp_pktio_start() - * - * ... and tear down sequence is: - * * odp_pktio_stop() - * * odp_pktio_close() - * - * @param name Packet IO device name - * @param pool Default pool from which to allocate storage for packets - * received over this interface, must be of type ODP_POOL_PACKET - * @param param Packet IO parameters - * - * @return Packet IO handle - * @retval ODP_PKTIO_INVALID on failure - * - * @note The device name "loop" is a reserved name for a loopback device used - * for testing purposes. - * - * @note Packets arriving via this interface assigned to a CoS by the - * classifier are received into the pool associated with that CoS. This - * will occur either because this pktio is assigned a default CoS via - * the odp_pktio_default_cos_set() routine, or because a matching PMR - * assigned the packet to a specific CoS. The default pool specified - * here is applicable only for those packets that are not assigned to a - * more specific CoS. - * - * @see odp_pktio_start(), odp_pktio_stop(), odp_pktio_close() - */ -odp_pktio_t odp_pktio_open(const char *name, odp_pool_t pool, - const odp_pktio_param_t *param); +include::../../include/odp/api/spec/packet_io.h[tags=odp_pktio_open] ----- +odp_pktio_open()+ takes three arguments: a *name*, which is an implementation-defined string that identifies the logical interface to be diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index 7dd10cd..c3945f0 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -244,6 +244,7 @@ typedef struct odp_pktio_capability_t { odp_pktio_set_op_t set_op; } odp_pktio_capability_t; +// Asciidoc tag::odp_pktio_open[] /** * Open a packet IO interface * @@ -300,6 +301,7 @@ typedef struct odp_pktio_capability_t { */ odp_pktio_t odp_pktio_open(const char *name, odp_pool_t pool, const odp_pktio_param_t *param); +// Asciidoc end::odp_pktio_open[] /** * Query packet IO interface capabilities