Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4045082imm; Mon, 30 Jul 2018 07:47:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeKNnb2Fj3kOC9ZrQs1USOzY3UK9L592Qbz+OqtI/981Vkz+BIwdUYGi7RDtPBhN08sByxO X-Received: by 2002:a65:5641:: with SMTP id m1-v6mr17185696pgs.246.1532962072584; Mon, 30 Jul 2018 07:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532962072; cv=none; d=google.com; s=arc-20160816; b=aQgt0Wp8GgWBYLy4qGbGYGyJxwjNLmoehG+aGvhX/PNq6DxhYl1X1/TzIzVVLzRpof SIQLxExn+HbPlkapzVhQ/87fUaUHbL4dkjpLwWf6zFqV1nKVk83/YDWh49zNcHpKDbIH 4n2DHOVTWunko9I+WpzbfAKfVNeRqsy7clodNYxVkb+vq2ZEe/N0p7Yc2IBBef5zc2hi TDiAKSaObnrNdkBCvWEMPTWbli3bZ4svHqdc/tl3Au+KXnJLjYiVIgN+lE7q/g0uBzmz Rljvqt4OSn/DcWMRjdzjOF2fSgJ024RelfAdUd2B/KWaDa+SgH6lfN8P8FWwgjDqSHkk UJFg== 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=lj6azP4aNafciUuJsJ075BgofrTxNlVlnabYhSg1ALw=; b=fdL98PPUQJB3qQR2231sx7GymL9wnXbX8cMTR9UKye+F7tyFvOX+CQQI0fiewLtJFw zoK6eDiMD1GsnUqiz8dGIWCgqq1aUOVR+UnVYAl53sJlQ+okarPp5ibnF49Emn1ffRaD TQ/5UIAZYGdoOy4OMC4Hjlu3ajGMEARMSE/56GIfhQqYpmZ1+j1t5VfjFtLgz1LJZ821 sqA5ofuhxmdQNNjNs5f9XMgQYuuPAzmotuCbi9j4VAvn1LGUYS60lSpuaONnXslWErhb CBh6XGE1r++F0GdUj8muxOSEJoTuX7Ln70XblVjEbdMaOVOOVWPDx1W6C7vyCKGkNjBq i70A== 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 d22-v6si11802364pfd.182.2018.07.30.07.47.37; Mon, 30 Jul 2018 07:47:52 -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 S1731962AbeG3QWG (ORCPT + 99 others); Mon, 30 Jul 2018 12:22:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:42178 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731783AbeG3QWG (ORCPT ); Mon, 30 Jul 2018 12:22:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0787BAD87; Mon, 30 Jul 2018 14:46:45 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 91EBCA0BE8; Mon, 30 Jul 2018 16:46:44 +0200 (CEST) Date: Mon, 30 Jul 2018 16:46:44 +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: <20180730144644.r3utyf4toqkjcxwd@unicorn.suse.cz> References: <4dcd60f25efe368ada4e0c035dc1d7612ab59132.1532953989.git.mkubecek@suse.cz> <20180730142825.GL13198@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730142825.GL13198@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 04:28:25PM +0200, Andrew Lunn wrote: > On Mon, Jul 30, 2018 at 02:53:27PM +0200, Michal Kubecek wrote: > > > + ETHA_DRVINFO_FWVERSION (string) firmware version > > + ETHA_DRVINFO_BUSINFO (string) device bus address > > + ETHA_DRVINFO_EROM_VER (string) expansion ROM version > > + ETHA_DRVINFO_N_PRIV_FLAGS (u32) number of private flags > > + ETHA_DRVINFO_N_STATS (u32) number of device stats > > I know there is at least one driver that has somewhat dynamic number > of statistics. It would be better to have the strings and the values > in the same message, so there is no need to first get the number of > strings, allocate the memory, get the strings, then get the values. > > > + ETHA_DRVINFO_TESTINFO_LEN (u32) number of test results > > In theory, this also does not need to be fixed. This is interesting. It would mean current (ioctl) ethtool approach with string set may not work correctly either. On the other hand, this should not be a problem for netlink interface. Statistics are unlikely to appear in notifications and daemons collecting them periodically will have to learn with it. Adding test name to notification "test started" or "test finished" seems quite natural. > > + ETHA_DRVINFO_EEDUMP_LEN (u32) EEPROM dump size > > + ETHA_DRVINFO_REGDUMP_LEN (u32) register dump size > > I would suggest removing all these _LEN properties, and let netlink > return what it needs to return. Agreed. Michal Kubecek