From patchwork Tue Oct 9 22:33:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 46448 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1115B1B534; Wed, 10 Oct 2018 00:33:56 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id A5E601B4D1 for ; Wed, 10 Oct 2018 00:33:45 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 535592203C; Tue, 9 Oct 2018 18:33:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 09 Oct 2018 18:33:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=xHdGx5nlWB cK2orD7tyqifxmzZRTx536xUTbg1ZtRhs=; b=LLG7oyD87aqZZ30enXSF7cK61q PupzyuTLhsQRV49bYLM5cu0hv376pzPIVdcrUGRbn7sGCysAGNT4b1im+06GqRVC cPGGE7RabXjuF64XPrSsCPhbTuomHK6a0S6W7v7hmtftV+snA/rpK681GDmHiats BoyvW+sPxHvfPwrKw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=xHdGx5nlWBcK2orD7tyqifxmzZRTx536xUTbg1ZtRhs=; b=ufB7QMAI 0YiDzrMuKO7MvYn//pirZDhVseX2wkzJ/nTI0hve1FJHJ3TcPEYA/lW/QMlguD28 SKlXnaAePD8TDLS6ZMJlWhouk28vXm+LQQkeX6Da6Muzx59BgtffBd8ddPzOO3qA m5LXifiO7PZT9L6kdXI4FE2yH0CKf0Lz2FpkhSLo3Nite5QtPx9H4Dja7gdpBqtw 57o75AJcZYrihRcwAdUdt5qVnnBoGJKhiDPFlfUldOWzr0zvJFdyuolrQQfPUbVG wAHeU0cThxiIdW+/5UfAhV3c9A3zhCtZTskSlvBoJFURWp3UkOdYF3OHKbIg0yNb 8ZcUlWvJ5TtNoA== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5FDD8102DD; Tue, 9 Oct 2018 18:33:44 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com Date: Wed, 10 Oct 2018 00:33:36 +0200 Message-Id: <20181009223338.18307-5-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181009223338.18307-1-thomas@monjalon.net> References: <20181007222554.4886-1-thomas@monjalon.net> <20181009223338.18307-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 4/6] doc: replace doxygen example in contribution guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The provided example of doxygen header is about a deprecated function. It is replaced by rte_spinlock_trylock() which is small and good enough for the purpose. Signed-off-by: Thomas Monjalon Reviewed-by: Andrew Rybchenko --- doc/guides/contributing/documentation.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst index 097575ad7..0165990ed 100644 --- a/doc/guides/contributing/documentation.rst +++ b/doc/guides/contributing/documentation.rst @@ -615,19 +615,14 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati .. code-block:: c /** - * Attach a new Ethernet device specified by arguments. - * - * @param devargs - * A pointer to a strings array describing the new device - * to be attached. The strings should be a pci address like - * `0000:01:00.0` or **virtual** device name like `net_pcap0`. - * @param port_id - * A pointer to a port identifier actually attached. + * Try to take the lock. * + * @param sl + * A pointer to the spinlock. * @return - * 0 on success and port_id is filled, negative on error. + * 1 if the lock is successfully taken; 0 otherwise. */ - int rte_eth_dev_attach(const char *devargs, uint8_t *port_id); + int rte_spinlock_trylock(rte_spinlock_t *sl); * Doxygen supports Markdown style syntax such as bold, italics, fixed width text and lists. For example the second line in the ``devargs`` parameter in the previous example will be rendered as: