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=-4.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED 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 C52E5C43381 for ; Fri, 1 Mar 2019 16:48:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9310620818 for ; Fri, 1 Mar 2019 16:48: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="t5z4JSGT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389198AbfCAQst (ORCPT ); Fri, 1 Mar 2019 11:48:49 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:37061 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728285AbfCAQss (ORCPT ); Fri, 1 Mar 2019 11:48:48 -0500 Received: by mail-qt1-f195.google.com with SMTP id a48so28502548qtb.4 for ; Fri, 01 Mar 2019 08:48:48 -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=XiE/nLlbSj3IGCv8jgch7BM8q4TlJUu2pmTtmljFPkw=; b=t5z4JSGT/hwoU8fJgHXCvSLUEkuIazJGkY6zdFYY+Z++Tt7xh4xdscsyN1xkk5QNeC E/mw2EbRkSJiyYq0QPf2JO0EJBxcxrC+wThWATTAJMLbnTkHxxtNR5dWt1DJ18fR9L72 Ere7WFNe6adqJ5xFtqmFrj5VwW+XNDrd3lTm+FCDC1K8Sw/hurzNWn18jlrZ/bfLmUNL G6rx6HGCJxfx2L/0Ziz4Ur2rE3tEAWMKFF2ABMVwxz1ZNoSM8KDi0rhcfZ7irqHGVZwP P6Tchg7OBgk/3L/r3zp/OcVO/UrjnA1YQEUQRuFQkAJJRctRAjJE3bJ0qGzX+48yBsGx Te/Q== 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=XiE/nLlbSj3IGCv8jgch7BM8q4TlJUu2pmTtmljFPkw=; b=JaFuUIKbQzFzp70w0HefUNCHgw1/7RtnKeSpnrjQTClPUdcEGEnwjp40L9+wQaRiUv DRnkqa6FPm8vOCMiHDeoS+bBHi7pyWqa1hOq4PlYGMBc9ePxm+m7M5fHW/9w2LI8fqnH bqXY1up3UenyhZRCtH5WgQNn6L/o6MFpQBlQKDHCGJuU4o182iWLmauIH+MquN4v44HW 1B/5qKtt2lP3MhBfiAxb2/dXrX/2LlokYzfJWXg4oumczPKj/89qyG6NDo0LYtb2/YYG H6WKSXUwBDHLwfnyCmfDc3l5T80aLEFjdEi31fwEcbK1YdsTtwAK8H7FaSpCkVMXm/3c SA6A== X-Gm-Message-State: APjAAAUSWr1vDZHZCYRGvg7eV+GWCyGyCjFKaGUS3scYEwJz8yW5XCEO /L3bFE940XwaUWgqBEVF+VMTHg== X-Google-Smtp-Source: APXvYqyJArCFlGL8CChti+JGKzXfn22hdWfpJv7d9Cy4tg+8gSgnZliCptCqlhk+ON4Za/QFr70vdg== X-Received: by 2002:aed:2a18:: with SMTP id c24mr4360846qtd.99.1551458927635; Fri, 01 Mar 2019 08:48:47 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id z140sm12521670qka.81.2019.03.01.08.48.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2019 08:48:47 -0800 (PST) Date: Fri, 1 Mar 2019 08:48:39 -0800 From: Jakub Kicinski To: Jiri Pirko Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com, idosch@mellanox.com, dirk.vandermerwe@netronome.com, f.fainelli@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com Subject: Re: [patch net-next 5/5] net: devlink: remove unused devlink_port_get_phys_port_name() function Message-ID: <20190301084839.1792f418@cakuba.netronome.com> In-Reply-To: <20190301162720.GL2314@nanopsycho> References: <20190301081402.6074-1-jiri@resnulli.us> <20190301081402.6074-6-jiri@resnulli.us> <20190301082529.6d7aee20@cakuba.netronome.com> <20190301162720.GL2314@nanopsycho> 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, 1 Mar 2019 17:27:20 +0100, Jiri Pirko wrote: > Fri, Mar 01, 2019 at 05:25:29PM CET, jakub.kicinski@netronome.com wrote: > >On Fri, 1 Mar 2019 09:14:02 +0100, Jiri Pirko wrote: > >> From: Jiri Pirko > >> > >> Now it is unused, remove it. > >> > >> Signed-off-by: Jiri Pirko > > > >Oh, you nuke this completely, that's going to conflict hard with my > >series :) > > > >(Provided the locking is okay) I think it'd be good if we flipped the > >logic in dev_get_phys_port_name(). Always try devlink: > > > >@@ -7872,7 +7873,7 @@ int dev_get_phys_port_name(struct net_device *dev, > > const struct net_device_ops *ops = dev->netdev_ops; > > > >+ if (!devlink_compat_phys_port_name_get(dev, name, len)) > >+ return 0; > > if (!ops->ndo_get_phys_port_name) > > return -EOPNOTSUPP; > > return ops->ndo_get_phys_port_name(dev, name, len); > > } > > > >NFP is using a single set of NDOs for PFs and VFs (which don't have > >devlink ports), so either it'd be good if I could call the devlink > >helper for real ports, or we need the above. > > That wouldn't give correct results now. Until you introduce PF/VF port > flavours, devlink_compat_phys_port_name_get() does not assemble correct > names for them. So we have to call ndo_get_phys_port_name until it knows > how to do that. Okay, yeah, this won't give correct results after my series though, so please advise on which order you want these things merged? I don't think there were any changes or concerns with my series - one commit message fix, split one helper into two, and wrap the peer into another attr in the dump? Can it go in first?