Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4170483imm; Mon, 30 Jul 2018 09:49:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdNJaulVWK3mkDpKbUaPT9r2yBi272gnbdh2iNBgKfQhT1QXsiiHjiA3saHrk8I8A+MVPE0 X-Received: by 2002:a63:b00f:: with SMTP id h15-v6mr17174528pgf.442.1532969345693; Mon, 30 Jul 2018 09:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532969345; cv=none; d=google.com; s=arc-20160816; b=WJ7aOCIgAbd6Mr3j8W3SDmFwyuRx8r6S2VHK9IrfywjokK4DzVbaZdZSPo7vd9w6QE LtUoOK53UloI4RyhYOqhBGA8yV8WxXcOeRiUd0mIJaJKNKjT1AHjXayKMQ3sPVKst7hx 2736dDiMqD1USNpFmCIvpGEXQRJ2+W5YL7cTW4zP+IybZi51i6Bq88MoQsr5mpyd+T1E dN0xtZB46lRbqlzOmDFj3vAEH6KabmVPxP/iAN6fCIHUD2U+P1C//VMk2IZPqX5gX3u7 zOL5+i28A8xxkpPe8ROZ+kEunhA/T1Z1XB5yfjlUUjlKFVHNIw1wVx1AVf+DM3B05iLZ 9IsQ== 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:arc-authentication-results; bh=Gx4rNK7xxx1tCmCTS5UYVE+DfzoGgFSe0teG8A+atPQ=; b=BYFhg/MDSxbS9ev9WlqCpgoin07EvYkFmhzaWdOE3Qhh0a+0dcI+r1ZGVDQma75Ofc dUoqeRmnG0wRjh9TGP7aYTllFWFd3ZkOhY87FKyTP8mdK85DwoJ6vppFk69PXSLjQugJ qDEZe5PpSDYoCSEBp112lnJM4tsEYhmesH/+NbFpdLM0vWRaTRzY1AnJoiPoIucNS4hd oND8cYC1kXx0nrdhDbwE/eU9gNwsCpHhP4Ue4pHrnmylpM+NUTIwc7lYf4VKeCto8Z5J m7fcHKS45BA3hM44XggJbItf84mGlgsXw+QvnJRZhNmusXoQa3LwUkYb7AAlolhzBl/o aPBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 k38-v6si11794676pgm.335.2018.07.30.09.48.51; Mon, 30 Jul 2018 09:49:05 -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; 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 S1732105AbeG3SXJ (ORCPT + 99 others); Mon, 30 Jul 2018 14:23:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:60548 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726798AbeG3SXI (ORCPT ); Mon, 30 Jul 2018 14:23:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B9614AEDE; Mon, 30 Jul 2018 16:47:16 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 01917A0BE8; Mon, 30 Jul 2018 18:47:14 +0200 (CEST) Date: Mon, 30 Jul 2018 18:47:14 +0200 From: Michal Kubecek To: Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Pirko , David Miller , Florian Fainelli , Roopa Prabhu , Jakub Kicinski , "John W. Linville" Subject: Re: [RFC PATCH net-next v2 09/17] ethtool: implement GET_DRVINFO message Message-ID: <20180730164714.lqf5codtzxigsufe@unicorn.suse.cz> References: <4dcd60f25efe368ada4e0c035dc1d7612ab59132.1532953989.git.mkubecek@suse.cz> <20180730142825.GL13198@lunn.ch> <20180730144644.r3utyf4toqkjcxwd@unicorn.suse.cz> <20180730154803.GB2983@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730154803.GB2983@lunn.ch> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 30, 2018 at 05:48:03PM +0200, Andrew Lunn wrote: > > For the statistics, it is a bit of a corner case. One of the Ethernet > switches in DSA can have two different PHYs linked to one MAC. One PHY > is built in, the second is connected via a SERDES interface. Which > every gets link first is used. However, the SERDES interface has > additional statistics counters. So if the SERDES is in use, we return > more statistics. If somebody was to plug in the cable at just the > wrong/right time, the count of statistics could be different to the > number of statistics. > > Another corner case i can think of. Some drivers return statistics per > queue. And there is an ioctl to change the number of queues.... > > I could also imaging tests being similar. There are more loopback > tests you can do with a SERDES which you cannot do with a built in > PHY. But so far, i've not seen anything like that. Thank you for the explanation. What I have in mind is that there are two different types of userspace applications: one shot and running long term. It can be seen in my series in the way e.g. link modes are handled. There are two formats in which a bitset can be passed: verbose (list of bits with names) or compact (just bitmaps). For one shot queries (e.g. "ethtool eth0") it's easier to use verbose format so that you get names with bit values in one package. But for long running applications processing many messages ("ethtool --monitor" or config management daemons), it's more practical to load the names once and pass only data with each notification or response. I suppose in the scenarios you mentioned the driver would be able to trigger a notification whenever the list changes so that userspace application could reload the string set. Michal Kubecek