From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71781C282C3 for ; Tue, 22 Jan 2019 22:18:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3EF4B21726 for ; Tue, 22 Jan 2019 22:18:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="K52RxFHm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbfAVWSs (ORCPT ); Tue, 22 Jan 2019 17:18:48 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:45467 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbfAVWSs (ORCPT ); Tue, 22 Jan 2019 17:18:48 -0500 Received: by mail-qk1-f193.google.com with SMTP id y78so65339qka.12 for ; Tue, 22 Jan 2019 14:18:47 -0800 (PST) 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=Y7jkGRWIfWvfQda19n4NcwosZYfnPBTsZ5BKun7Hnaw=; b=K52RxFHm6eOqsPZ/eWnLALSlrewwplho74cseYUacxEWloDKKrD1Y28vKjp+GWJu8k GQV9cmW1HKksQDAvuLjhQ34jnP2g5LXUzzgPwlrllknAD4yLxLLMzhoNoNTnhmfNe4R+ CAaF9BPi91fpmBc/iipA5Be1BcrIstYQV9UKRHEdWxy7ZACANlmKaUchwLB7nwKC3xfL 3xo7t9m4aX88h3Tv145nraGyBPZ1VACmg3P5Qho5GoJlc6TFuvRKrdxKkPWGr40D8lO6 HLNlk7XGkghNfx7yLV4T2Xng8F9zP+K/AUl3LASvy8HEcJR0RiOuVBuS+r+95XUqw6Os oFRQ== 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=Y7jkGRWIfWvfQda19n4NcwosZYfnPBTsZ5BKun7Hnaw=; b=KOo5c/rk1QvQMVwzRXy8HkE+X3GktsePnMBXZuy+PaPyRaRuBtx8aI7D93pvJj+5iv aGw4Li5lw8lsXjfyw7h8eDBTdHS297UCeuYFISY9Vgg0VR8dq5qO3koDW1VUl5H9M99O 81MJh4DiWQ+RJCRgEzFJtzlr2JBZImjYFubciDrRLfm7UDBvTZDKRDRPxz/pkrQtRLB0 nplS8wFGXK60H+9sCqXwVxLDV39DQUb8jT0fEZ5sQrIOGShMuO+JtQIyo+ZVCRKyGXJ/ 5q6sSRMbadgtkPtRr3pLU1CvWHfPk/TYPNMuB9Zz/79AARgetxjdjZc4GqjI29SLDMW0 sq/g== X-Gm-Message-State: AJcUukeRrJP+kwPkc3pwHwSJn2sioj5ITCoCdMcohzk7U/0xPsTqzRhL mjAco+Shb0K2EedjcjviFLFh9A== X-Google-Smtp-Source: ALg8bN72GPDzbSiyjlc8T6zpD43NcR11TZlXLGOte9mhRcEkqtd0YD89h/vioj/tf/jI14qeOIr+/w== X-Received: by 2002:a37:5ac4:: with SMTP id o187mr29116389qkb.282.1548195527132; Tue, 22 Jan 2019 14:18:47 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id q5sm106108289qtq.20.2019.01.22.14.18.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 14:18:46 -0800 (PST) Date: Tue, 22 Jan 2019 14:18:42 -0800 From: Jakub Kicinski To: Michal Kubecek Cc: netdev@vger.kernel.org, Vasundhara Volam , davem@davemloft.net, michael.chan@broadcom.com, jiri@mellanox.com Subject: Re: [PATCH net-next v7 0/8] devlink: Add configuration parameters support for devlink_port Message-ID: <20190122141842.26908b27@cakuba.netronome.com> In-Reply-To: <20190118143319.GG26670@unicorn.suse.cz> References: <1547795385-12354-1-git-send-email-vasundhara-v.volam@broadcom.com> <20190118143319.GG26670@unicorn.suse.cz> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 18 Jan 2019 15:33:19 +0100, Michal Kubecek wrote: > On Fri, Jan 18, 2019 at 12:39:37PM +0530, Vasundhara Volam wrote: > > There is difference of opinion on adding WOL parameter to devlink, between > > Jakub Kicinski and Michael Chan. > > > > Quote from Jakud Kicinski: > > ******** > > As explained previously I think it's a very bad idea to add existing > > configuration options to devlink, just because devlink has the ability > > to persist the setting in NVM. Especially that for WoL you have to get > > the link up so you potentially have all link config stuff as well. And > > that n-tuple filters are one of the WoL options, meaning we'd need the > > ability to persist n-tuple filters via devlink. > > > > The effort would be far better spent helping with migrating ethtool to > > netlink, and allowing persisting there. > > > > I have not heard any reason why devlink is a better fit. I can imagine > > you're just doing it here because it's less effort for you since > > ethtool is not yet migrated. > > ******** > > > > Quote from Michael Chan: > > ******** > > The devlink's WoL parameter is a persistent WoL parameter stored in the > > NIC's NVRAM. It is different from ethtool's WoL parameter in a number of > > ways. ethtool WoL is not persistent over AC power cycle and is considered > > OS-present WoL. As such, ethtool WoL can use a more sophisticated pattern > > including n-tuple with IP address in addition to the more basic types > > (e.g. magic packet). Whereas OS-absent power up WoL should only include > > magic packet and other simple types. > > If I understand correctly, it's that way now. I'm not sure there is a > technical reason preventing more complex WoL types in the OS-absent case > in the future. Also, even with traditional ethtool WoL setting, most > NICs only support some of the types (I'm not sure if there is a NIC > which would support all of them.) > > > The devlink WoL setting does not have to match the ethtool WoL > > setting. > > IMHO this is not really a problem. We can either use an additional flag > telling kernel/driver if we are setting runtime or persistent WoL mask > or we can pass (up to) two bitmaps. I think reusing new netlink ethtool with a special flag would be a nice, complete solution. We could also address link settings this way (which are a pre-requisite for WoL). I have no strong preference on the mechanism, but for ease of setting as well as dumping would it be workable to use a nesting, like this: Run time settings: [ETHTOOL_SETTINGS_BLA] [ETHTOOL_BLA_VAL_1] [ETHTOOL_BLA_VAL_2] ... Persistent: [ETHTOOL_PERSISTENT] [ETHTOOL_SETTINGS_BLA] [ETHTOOL_BLA_VAL_1] [ETHTOOL_BLA_VAL_2] IOW encapsulate settings into a "persistent" attribute? How does that look to you, Michal? > > The card will autoneg up to the speed supported by Vaux so no special > > devlink link setting is needed. > > ******** > > Like Jakub, I'm not convinced there is a strong technical reason to have > each of the WoL settings handled through a different interface. I don't > say, though, that ethtool is necessarily the right one. If there is > a consensus that it better fits into devlink, I can imagine that both > could be accessible through devlink (for start, in drivers which choose > so, e.g. because they want to implement the persistent setting). > > Michal Kubecek