From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 69C42F971 for ; Sun, 15 Jan 2017 21:56:29 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id r144so148041238wme.1 for ; Sun, 15 Jan 2017 12:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=wHcMAatAYxrmB+XIs6qUZVatfn6SE2BC+UsCeo1Vlbo=; b=QLHWr3z4shisqJQvSo3tj1hRBFocUqLYnp30FXze9hm1lPcyH4UiaqfQVOQSAJT/NY PUsIX5XYtQaG4sa6NYJwSbqwh4GjktzlGGxn405DwymiiMgWuC0W8CR8wf8aUH9qEZX3 pXXvCGrW0hfuudPOv9SItJSLdqPySKI/oLKtOQdqhnlmjpqs/xwqVrGlfHHfbouZia5P DZAn7PO5tdGpkPfaiVLhauzzNPAaHx5xjBljMwfteMDhU8c43iD94AaC2vxsh48tZAPs 1DK/Wuv4+2m9QeJn+f9wPKmjOSieCgINi+A3PAyQaSb00e5HWidJld9QTUK4nhpzybG6 ZC/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=wHcMAatAYxrmB+XIs6qUZVatfn6SE2BC+UsCeo1Vlbo=; b=iTCDJUgYxqd8DzO7oPb9hPhmHPBUjjDhPoW5qyk4FHietB/1EPj6YLoh/YQpvVRLpW h1Fi+BdGQRe+QFQxlK+PGxL9ZqHG3henZiOuCN/xIO/5q0yWBsb80Tlu6ziJ4kriYeGD htHENwBu4aDDslxduvoyrTUgjUy4jckXT0KGhXMF+wr3W/q9Tv3u0zNAUJa3RTrduFch BGrWKXODsk+mEVuhuzhEOVoZkNiwRy7tzt0EfAKJYRBhE/QUbQXzf9QpNGFqRFAhu7Jc ZIz2lyh2mfjtGQg/KQ4/q2Ec7cLBXoZjYNNM1s0cUaVawzd+TbGgDHUor9qj6OrMjW/B HBPQ== X-Gm-Message-State: AIkVDXIGnWTq0iwDrgBohupqOoCNWfnXSZLnM1r06vB0hTtIvdSvmXeKCWMVxpMNbUkJkUlU X-Received: by 10.223.167.68 with SMTP id e4mr20550016wrd.155.1484513789155; Sun, 15 Jan 2017 12:56:29 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id l74sm23544789wmg.2.2017.01.15.12.56.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jan 2017 12:56:28 -0800 (PST) From: Thomas Monjalon To: Qiming Yang Cc: dev@dpdk.org, ferruh.yigit@intel.com, remy.horton@intel.com Date: Sun, 15 Jan 2017 21:56:27 +0100 Message-ID: <2137227.KlaXuaYADV@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1484202716-41669-2-git-send-email-qiming.yang@intel.com> References: <1484116905-57438-1-git-send-email-qiming.yang@intel.com> <1484202716-41669-1-git-send-email-qiming.yang@intel.com> <1484202716-41669-2-git-send-email-qiming.yang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 1/5] ethdev: add firmware version get 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: , X-List-Received-Date: Sun, 15 Jan 2017 20:56:29 -0000 2017-01-12 14:31, Qiming Yang: > + * @param fw_size > + * The size of the array pointed by fw_version, which should be > + * large enough to store firmware version of the device. > + * @return > + * - (0) if successful. > + * - (-ENOTSUP) if operation is not supported. > + * - (-ENODEV) if *port_id* invalid. > + * - (-EINVAL) if *fw_size* is not enough to store firmware version. > + */ > +int rte_eth_dev_fw_version_get(uint8_t port_id, > + char *fw_version, size_t fw_size); > + How to know the required size? You should return the size of the non truncated string as snprintf does. Note: Andrew Rybchenko already commented on it and you didn't reply.