Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5419714ybl; Tue, 10 Dec 2019 05:50:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwDneHP9sRPUOy6dWaIaGzfpqUKg+NMeZjcIh9Df/1SGkZWkLRFuKuBIZ9K4i/zk1EwSRxt X-Received: by 2002:aca:f5cc:: with SMTP id t195mr3974081oih.163.1575985836106; Tue, 10 Dec 2019 05:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575985836; cv=none; d=google.com; s=arc-20160816; b=cCh+4PL2Pf+ANtY9yTl1T4q5JCFbWoazi9N3P7/01LEL+Kx/0kedl5VSdCcl0/9S0Y ue3OretZXbhKK4/fmgsAg/uP/cXWgDV/X6GMwSSza7LZbWLYO24CZoZte67xhUShyQ/6 xgaq+8dI9GC7GDWzMzSoHwj1U6SvOiZGoujS+Tga90CeL+8+S0SaDs+yMujp9iyIYo7E fTN5zdANa55BhY+V2X+0RZj7ATvMewBMcdYRfJax/mBK4Ki8gzpF+CEU3WezZZeHizJw OwfIoHRajoDTxp/zfkf3Shjb++D8LfqkeOTV5875BikagAqOup42BmOX+eWb5N7tgikQ iFDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TxOgTAvMrFvIY/xWQTFemzYKWt8cKg0T6qd8rkjWoAc=; b=EHRjvBLcMbiZgHCh/FJP/t2oZAcThvLpYQp+6EkyrIkkzi79ibDpXVR3Yat+ty8STh 2YL+n8c0+mPOp90UdUVTjDJmLstJ64NIkH5w9n8hJzSqKbt+uv9SBkrjRgwcjUrlw0Hq unOG90y2RJPbRHn2VRB3V/16u94FZDMoEm4T49jEUGfU9Qs6l1eUOG5b7zZKHWAbSFo7 P8edyC5UfV1Wi6YUjG6LACilZ9a8APsSbSC3EHI47rvShYxelWpqflI92tqwfzkVZ+uv fa8dsVO1++ApND6+nLITyHQyQaVtUviKgbgkqDWm6VCnT1HlB8F4fH4BCfW/KZyH1Zt6 g5dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=3ktR9TNw; 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 z1si1797143otp.70.2019.12.10.05.50.23; Tue, 10 Dec 2019 05:50:36 -0800 (PST) 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=fail header.i=@lunn.ch header.s=20171124 header.b=3ktR9TNw; 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 S1727466AbfLJNtk (ORCPT + 99 others); Tue, 10 Dec 2019 08:49:40 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44780 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbfLJNtk (ORCPT ); Tue, 10 Dec 2019 08:49:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TxOgTAvMrFvIY/xWQTFemzYKWt8cKg0T6qd8rkjWoAc=; b=3ktR9TNw8012Jk5deFD8YQVULI Tf+1U9L8eOuV8HnnIbtHluBDDixrZI/hzORPC0nme6llG5uf0hcHBzdS6k2Ra6HAmbcxDK+6e9uZC 3t37gGvLNpYAcFXnTDrXNqa3qZ/3l/pKGmaWFkOv5mUufQDDNQsCnIqQwG2RudI9QScI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.92.2) (envelope-from ) id 1ieftI-0004OR-WF; Tue, 10 Dec 2019 14:49:29 +0100 Date: Tue, 10 Dec 2019 14:49:28 +0100 From: Andrew Lunn To: Michal Kubecek Cc: David Miller , netdev@vger.kernel.org, Jakub Kicinski , Jiri Pirko , Florian Fainelli , John Linville , Stephen Hemminger , Johannes Berg , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 5/5] ethtool: provide link mode names as a string set Message-ID: <20191210134928.GC16369@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 02:08:13PM +0100, Michal Kubecek wrote: > Unlike e.g. netdev features, the ethtool ioctl interface requires link mode > table to be in sync between kernel and userspace for userspace to be able > to display and set all link modes supported by kernel. The way arbitrary > length bitsets are implemented in netlink interface, this will be no longer > needed. > > To allow userspace to access all link modes running kernel supports, add > table of ethernet link mode names and make it available as a string set to > userspace GET_STRSET requests. Add build time check to make sure names > are defined for all modes declared in enum ethtool_link_mode_bit_indices. > > Once the string set is available, make it also accessible via ioctl. > > Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Andrew