From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88321A04AD; Fri, 1 May 2020 15:28:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 489241D95F; Fri, 1 May 2020 15:28:27 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 156C21D95F for ; Fri, 1 May 2020 15:28:26 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.143]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id AC0D320053; Fri, 1 May 2020 13:28:25 +0000 (UTC) Received: from us4-mdac16-21.at1.mdlocal (unknown [10.110.49.203]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id AA2F28009B; Fri, 1 May 2020 13:28:25 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.12]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 4244940058; Fri, 1 May 2020 13:28:25 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id E377F40051; Fri, 1 May 2020 13:28:24 +0000 (UTC) Received: from [127.0.0.27] (10.17.10.39) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 1 May 2020 14:28:16 +0100 To: Thomas Monjalon , , , , , , , References: <4816966.qqrk5fENW1@thomas> <20200427095737.11082-1-i.dyukov@samsung.com> <20200427095737.11082-6-i.dyukov@samsung.com> From: Andrew Rybchenko Message-ID: <33f1d60f-2c31-5449-7e52-80951065ee9b@solarflare.com> Date: Fri, 1 May 2020 16:28:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200427095737.11082-6-i.dyukov@samsung.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.17.10.39] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1020-25388.003 X-TM-AS-Result: No-4.454000-8.000000-10 X-TMASE-MatchedRID: +c13yJDs900eimh1YYHcKPZvT2zYoYOwC/ExpXrHizw7FE26mju9O1Me 5Blkpry7rdoLblq9S5pCJ8ZYRqTb4+fJixReoUHwLIRqQbCuh+6fJAVpWAwzYPo+OyIeksFJUgC 7uHFSrDJsmZC6qolIzTucUwEurQSLNyl1nd9CIt05f9Xw/xqKXXJnzNw42kCxxEHRux+uk8ifEz J5hPndGb2H3TN6hR9m2aBBdWxIRo1RRhzWadHu2jMkN/saPGV92qUSLXI4jwZjt8b4uwAC+apwr jjRUsZu+8cr2/6fK2JGY7q7P/G8VpaNu7ESofeoBDT+lxzdKMDeln/Z45sWFT8o1ntuq+pnVlxr 1FJij9s= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.454000-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1020-25388.003 X-MDID: 1588339705-rQlLJVuqGtNX Subject: Re: [dpdk-dev] [PATCH v1 5/6] doc: update sample app with unknown speed 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" On 4/27/20 12:57 PM, Ivan Dyukov wrote: > Signed-off-by: Ivan Dyukov > --- > doc/guides/sample_app_ug/link_status_intr.rst | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst > index 5283be8b7..6ebc707b7 100644 > --- a/doc/guides/sample_app_ug/link_status_intr.rst > +++ b/doc/guides/sample_app_ug/link_status_intr.rst > @@ -177,7 +177,8 @@ An example callback function that has been written as indicated below. > printf("Failed to get port %d link status: %s\n\n", > port_id, rte_strerror(-ret)); > } else if (link.link_status) { > - printf("Port %d Link Up - speed %u Mbps - %s\n\n", port_id, (unsigned)link.link_speed, > + printf("Port %d Link Up - speed %u%s - %s\n\n", port_id, (unsigned)link.link_speed, > + (link.link_speed == UINT32_MAX) ? ("(UNKNOWN)") : (" Mbps"), > (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? ("full-duplex") : ("half-duplex")); > } else > printf("Port %d Link Down\n\n", port_id); > I think that 0 looks nicer than UINT32_MAX when printed as integer keeping in mind that it is unknown.