Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5462086ybl; Tue, 10 Dec 2019 06:29:10 -0800 (PST) X-Google-Smtp-Source: APXvYqww5mkztpPhRyGhXlpetH6C4Ov0DskV/WT1qrEPuj/yPJd0Umuxd5+dSjLt6i+G4rFJ0TAv X-Received: by 2002:a54:460c:: with SMTP id p12mr4240752oip.18.1575988150157; Tue, 10 Dec 2019 06:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575988150; cv=none; d=google.com; s=arc-20160816; b=GSsc3vTyBGxy+7Ah1eBbUyU8BRxtShoPWqavtC0BqKjHUtaNMNHyr/QEyu7zmKdDLa ZNm4njwv5sKqFlvc+BXrvwYqM/EQtAUwt7V3iEzbn6H16KH8vQXfYnB/4tqRVLOtPAyJ U7kzxkQL3xMo183+jVnmFpRMaa0SEHxSXY4vNBf53IGbstD5+t4CTY1VtOFNi6hPMvO+ znYUQnuGtKG6C29RfTBr5cg42W5rbi1G4daUfOkEnBL+OVKKSfmBqwRwQ1DntlpU3afi kTdE7l8vCNUyzKu9z7a0F7AP+5Gjyb2/++MJZ2cERluoaDZGmb+GucQI0/GvylTKrHtA YZHQ== 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=W5IUf7nsGsbe8tjOIPGAbRfLSF1koHZCPW1tiAPp8KQ=; b=hJwMVCQiikDhoEDI3+qJwIx+FzEo3VYyYhcLCy3t2gXq1wNectJjNR4BzYl1rv8xdy dN4fqtYXoYwyg2Gr03Fhd3aFu6/ObKapzB1EHRlTTpNxBQtrfbD0WCNusDWlnJoynziV 47oxIWzabnTnxFtzAnDPvdn31jpAiT4ViFdDQT6fVgjeZ11SAGqi5SLisox/n85gJzg5 CwnkuSo7WGL5t1KFVt3hiATV7JoW6pI4UH0XTP44oQsyVjZfNyaP9wilCrg1NesPQh5E 6kiwLMu9DoQkv9nIw3kBWNXtw2vxtSmR6yzG+4CwmbBrn2NtRFVP21z7y3ii2Z+6ArU2 v5Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=L2E5nPko; 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 w131si1861221oie.47.2019.12.10.06.28.56; Tue, 10 Dec 2019 06:29:10 -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=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=L2E5nPko; 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 S1727535AbfLJO1w (ORCPT + 99 others); Tue, 10 Dec 2019 09:27:52 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45946 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727333AbfLJO1w (ORCPT ); Tue, 10 Dec 2019 09:27:52 -0500 Received: by mail-wr1-f67.google.com with SMTP id j42so20292422wrj.12 for ; Tue, 10 Dec 2019 06:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=W5IUf7nsGsbe8tjOIPGAbRfLSF1koHZCPW1tiAPp8KQ=; b=L2E5nPkojADtCwJoOc2zngiVfEFaOKerMJDA+dP8i3AACTrFfXIMrkbZ9lYGWVu9sV D2erbLhpXuzHVInZHHR8xNKZ/SM9Kp8u0zdDN8Dlt+Sj0C4Sa7S0/keaBfvgNCDUEXo8 h5kebBQIiPHTu3yDYxD7ieCguFvT34pbVQXmbMVMuWJpPfTAM5RiAru/6vv47X8TyUXd Vs3IusyQUM204x2b1Y58btUqzfGzL2KEgImhUKTVNeggWhnICXA0Aq69dkdgr6qLJ31M MLm1/iZMet/4Jam1bbyZ2eZOWDvTuC4v3/jP+cvta2HH5p+QG20t2PqOlYBlqb8ASitt cqqA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=W5IUf7nsGsbe8tjOIPGAbRfLSF1koHZCPW1tiAPp8KQ=; b=b6oN/uxWzDdwk/WRPnDdxXxbL/ccktGtRf+9fWuIcCpDR7Fl33qTFMzBGx6QTDPq9v wMyah/1v9Fb/X5skNxfXOhVVKpMOjlEDZ9Mb4qyUaQ4pa1nOOXkw/6R15XK3YsgJDxvQ uWgOM1A9TW5lCnWiA1VBvafcvlLowbU368Y9xhCzzvDnV3/lqJEbhNe9Aw+86hyVg0hk Jb+dIhQjXhXvuFdD59/vNFhm3UYx+X8XJCbjyc/lxvHxXR5VVX2ltwXNSvAWEIeAweo+ u5Yt31L3Eg8p/uC2GaA7GHVmGeBBNN0JXZMpIBm9Ta/eT0vlh7wZV7Y+Kzq58iRzKZt6 gtow== X-Gm-Message-State: APjAAAVFS9HR7+D/HjerNvuu5hagCqdEeZCMtVgk7aZRjrPSHPwlMbGZ TMII8ztYD1NduMkMZUSnnp8kJQ== X-Received: by 2002:a5d:46c1:: with SMTP id g1mr3564701wrs.200.1575988070777; Tue, 10 Dec 2019 06:27:50 -0800 (PST) Received: from localhost (ip-94-113-220-172.net.upcbroadband.cz. [94.113.220.172]) by smtp.gmail.com with ESMTPSA id m10sm3468304wrx.19.2019.12.10.06.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 06:27:50 -0800 (PST) Date: Tue, 10 Dec 2019 15:27:49 +0100 From: Jiri Pirko To: Michal Kubecek Cc: David Miller , netdev@vger.kernel.org, Jakub Kicinski , Andrew Lunn , 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: <20191210142749.GA7075@nanopsycho> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tue, Dec 10, 2019 at 02:08:13PM CET, mkubecek@suse.cz 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: Jiri Pirko