Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp773094ybb; Thu, 28 Mar 2019 11:54:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxDxG52nwul7Ngl+C8wL6JjdTEBXXf63+ezNrk/4KiEmxfKhK8Lpp7J/ikQxeXlA+2/7jl X-Received: by 2002:a63:ef57:: with SMTP id c23mr41622602pgk.176.1553799240835; Thu, 28 Mar 2019 11:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553799240; cv=none; d=google.com; s=arc-20160816; b=PRiRjgbe7MewQh87YQ6qFopknewhMlJmowJuHUmA7pAA2Xh1MwOzF7N41VcxtpiKiX cnlgjRF9+6q0fKsOe88f7Ow6H9I8Ft+9ilEIgmycBwvrBeR/dyhXMFpUSAbCZJnl1q0N P7+qmJU6qII+aVkDFB6QtWZNf5Txo9aev0420YByUChSr/HiMmPgHEvqd2ZUcMv40RrS ZlhzlSou+lNYealoS7m+y9KwJiZkZce9g004NnK0PYri5UuV/4QnF0T/kuGBA6JmGFr0 C8qbCSFwqyXrOpwvzSfMg0pRKoMIyp6HrXkbYMAupd0f4ky+hk7QAJaxJDIS2dWnnHEw c1iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=2+yVR/eXhUEiUjrePeNYCTy0DJkUbLGQw97cbREmMac=; b=CoEBT173ewDjXuVwXWkmBMBG9cyeFs3RFHxzrvrVFebaEpdf2fWH6WoG4lr5sILbDo y+f9ZDUZeSjnu7IGdD3/P57tSrSyqloQTgK3gEolXzKElCLml5xmG7pS9RSy45rx7aB+ Md97zB/PNIXVI0x5+f+bhtavT6cut3sOwdjhyJKiptDmn8ceWzYfjhUhBKPHTngPUHLy SesG2hEUSR53Ay44+4hXDltOpMZ3ENzbfpci0Q6WWPTPQs0zV7Z8oEHZb4smY1HhFg0g 93LmURUdnWCoYA4lSHks3eQvR56m1GIr8CzSJjKi/kQHA/pMQk1SPMMLWwLfWzi6T/it sz4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=xyMgxJpI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si12169903pfh.260.2019.03.28.11.53.44; Thu, 28 Mar 2019 11:54:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=xyMgxJpI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbfC1SxC (ORCPT + 99 others); Thu, 28 Mar 2019 14:53:02 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:35632 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbfC1SxB (ORCPT ); Thu, 28 Mar 2019 14:53:01 -0400 Received: by mail-qt1-f195.google.com with SMTP id h39so24413736qte.2 for ; Thu, 28 Mar 2019 11:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=2+yVR/eXhUEiUjrePeNYCTy0DJkUbLGQw97cbREmMac=; b=xyMgxJpIBqjdCLrPI+9R+Jpw86PrmPPBqJhbUAYbNRk0GojOgnyfPNID7hmxHOmsbm OJwgAFVIlQpwuI86EOduv24+Thph9lSA++yjp97ao48qo3q8hs5e1CmymAzLEssIjG5o zsKvjE/jFuAuFrk3Wgv9u28OKmi5A5nhjN7z9WWXzDwWFuqFLPuB2+iX7v9Y7OThTCsY BAmC6cHNs0FkMZ7WkKgk0rlLB59FLWFFxNtt7uEXvixQkxPUa4AcM6AMS8+YfXOfFbk4 xBpdZ2lNFQ/S2zJQrAAqwKtFNN0fL1xOdopRu5+zs5HUK33xGeR13ov9KyZWhRXK+46T 96pQ== 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:organization:mime-version:content-transfer-encoding; bh=2+yVR/eXhUEiUjrePeNYCTy0DJkUbLGQw97cbREmMac=; b=TWvFi9pUYKt1/tgCPD+t6noaYPVeI6V0N7RVLo8zIalkOiMCbFVFhs1c1Kg6xw8vyV QtcrLcAv6kp84fb2KH8fThbcOXxQN43qaVijkWVZAjUSpZU08902XCY1lunU0UIejXEC GmHQ4WQaVcKJsQ5QKzph+7u93lLQBuShPtSA2a3BhXvJjBYYKODxWyR+y0yO6PpV8I3J n1VJIXmo/tUcPpl6ITGGRqM5SqaKxtkLf4uFY+2Kef2w33tDr3v5Xbf7+57F3BRK9kQf v4QT39PuWHQ8KigsAD+YBzuAKF1/mIaIGFU+6zV/SKgIVfetKeJjxHJS1q+2kFzqNNrJ sWIQ== X-Gm-Message-State: APjAAAXeHEvuxtIapRZBOpRGtiVVxDnhTun7VbShOgvc2rsjJysyH8+Y TU1YDPeb1Tz0HW/SN229YSsyhA== X-Received: by 2002:a0c:c950:: with SMTP id v16mr36267284qvj.204.1553799180940; Thu, 28 Mar 2019 11:53:00 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id d17sm13741961qtl.43.2019.03.28.11.52.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Mar 2019 11:53:00 -0700 (PDT) Date: Thu, 28 Mar 2019 11:52:56 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: Michal Kubecek , Florian Fainelli , David Miller , netdev@vger.kernel.org, Andrew Lunn , John Linville , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 12/22] ethtool: provide string sets with GET_STRSET request Message-ID: <20190328115256.2a7cb952@cakuba.netronome.com> In-Reply-To: <20190328173524.GR14297@nanopsycho> References: <2c29310b-a2a0-3867-a09f-51f2dc47ecd3@gmail.com> <20190328071853.GY26076@unicorn.suse.cz> <20190328134313.GO14297@nanopsycho> <20190328140428.GG26076@unicorn.suse.cz> <20190328173524.GR14297@nanopsycho> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Mar 2019 18:35:24 +0100, Jiri Pirko wrote: > Thu, Mar 28, 2019 at 03:04:28PM CET, mkubecek@suse.cz wrote: > >On Thu, Mar 28, 2019 at 02:43:13PM +0100, Jiri Pirko wrote: > >> > >> I don't like this. This should not be bitfield/set. This should be > >> simply nested array of enum values: > >> > >> enum ethtool_link_mode { > >> ETHTOOL_LINK_MODE_10baseT_Half, > >> ETHTOOL_LINK_MODE_10baseT_Full, > >> ETHTOOL_LINK_MODE_100baseT_Half, > >> ETHTOOL_LINK_MODE_100baseT_Full, > >> ETHTOOL_LINK_MODE_1000baseT_Full, > >> }; > > > >We already have such enum. The problem with your "no string" approach is > >that it requires all userspace applications to (1) keep this enum in > > That is how it is usually done. UAPI defines ATTRS and values, userspace > assigns appropriate strings. +1 FWIW, I'm with Jiri on the string situation.