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 54B49A04DB; Tue, 11 Aug 2020 17:47:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 05B331C020; Tue, 11 Aug 2020 17:47:24 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id CE7B4A3 for ; Tue, 11 Aug 2020 17:47:21 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id f9so2060422pju.4 for ; Tue, 11 Aug 2020 08:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PVkjmglbVX2OjoBECM0lAvsLhBAd3yUuFMJDri7Dl6k=; b=mMEElM5uEOmq4FxcwFWt5cfiH3xM7Nt4QawyOKyVveFHAHh12gJ7oVEkyQxrdiKO29 gDYefAqnL+1hIsdunX7U8uAtj1eK+6RLmR1t3AlyjLhcF5WVDKMcj7VfejSj8DGbGo6T 3YRniRMeCLu1kPvVH/CMXzB3wZ72cGwsjifCNfxvtjN+Mybm7QT+UeK4GezRLql2t3Sv n+ZDYbvvlQRKRNQxAN48TgEhAS1RizpG7ycUWISWmvcNBWJRS1imBr3LQvKFE/ZelgQk d0EUg2fmAQu7gcQPtd6tH15OKWx7vVNzXc6IjmOLAxKeK/598aVktlPCnptqxQxdH9oT wmQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PVkjmglbVX2OjoBECM0lAvsLhBAd3yUuFMJDri7Dl6k=; b=Maflec0jGEhUvHbykO3AV2iWhhb8KKnE0fgk9cS+pmwLdy12YMAMms/GzceV8H09DW WHMehhjlGpgVyVws/oDaUhYPhzbe73vvM7N1Tb3ed5eZ098vjRSI1g6boX0Q5UX1QShr zwiLoXHBQfbAKWPl4ITlvQolTFAvhKcqnNvbhO26ciQKbtCXu53ivK2ZZfhYXeZusSP5 jtqznq9D4igVpVaw00RigfdT3MVptxg3rwfdZ2AZYyp547gZV7zT+J+hz5KdrvLy/2VZ jQj9ii5GJ05dARgag+2mWzGFGfpr0+dVDmockG0csTpvM4ZECgv5BgYH+jH7xcpWzcZE gejA== X-Gm-Message-State: AOAM53223wkGhBM/+LW4oUukRYt3Ohdcl248Bo/+UIB7/siiVGInQO9g 3Q3Td48tS0hvOLHsfRTWKUuVBg== X-Google-Smtp-Source: ABdhPJxbqvSq202jJ8J4VVxUcztbk6FrKy5utUui4QarDPRKffMVOflQVLjUh5mrm+U87EWgoodPyA== X-Received: by 2002:a17:90a:ea8e:: with SMTP id h14mr1674792pjz.105.1597160840931; Tue, 11 Aug 2020 08:47:20 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id x28sm26347690pfj.73.2020.08.11.08.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 08:47:20 -0700 (PDT) Date: Tue, 11 Aug 2020 08:47:11 -0700 From: Stephen Hemminger To: Ivan Dyukov Cc: dev@dpdk.org, v.kuramshin@samsung.com, thomas@monjalon.net, david.marchand@redhat.com, ferruh.yigit@intel.com, arybchenko@solarflare.com, wei.zhao1@intel.com, jia.guo@intel.com, beilei.xing@intel.com, qiming.yang@intel.com, wenzhuo.lu@intel.com, mb@smartsharesystems.com, nicolas.chautru@intel.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, cristian.dumitrescu@intel.com, radu.nicolau@intel.com, akhil.goyal@nxp.com, declan.doherty@intel.com, skori@marvell.com, pbhagavatula@marvell.com, jerinj@marvell.com, kirankumark@marvell.com, david.hunt@intel.com, anatoly.burakov@intel.com, xiaoyun.li@intel.com, jingjing.wu@intel.com, john.mcnamara@intel.com, jasvinder.singh@intel.com, byron.marohn@intel.com, yipeng1.wang@intel.com Message-ID: <20200811084711.62f06560@hermes.lan> In-Reply-To: <20200811085246.28735-3-i.dyukov@samsung.com> References: <20200427095737.11082-1-i.dyukov@samsung.com> <20200811085246.28735-1-i.dyukov@samsung.com> <20200811085246.28735-3-i.dyukov@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v9 02/24] ethdev: add a link status text representation 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 Tue, 11 Aug 2020 11:52:21 +0300 Ivan Dyukov wrote: > Link status structure keeps complicated values which are hard to > represent to end user. e.g. link_speed has INT_MAX value which > means that speed is unknown, link_duplex equal to 0 means > 'half-duplex' etc. To simplify processing of the values > in application, new dpdk function is introduced. > > This commit adds function which treat link status structure > and format it to text representation. User may create custom > link status string using format string. If format string is NULL, > the function construct standard link status string. > > Signed-off-by: Ivan Dyukov Why pander to driver specific link messages? This should come from core code in one format for all drivers.