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 0820CC43381 for ; Fri, 1 Mar 2019 16:45:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C188920857 for ; Fri, 1 Mar 2019 16:45:26 +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="V3lmxoPN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389088AbfCAQpZ (ORCPT ); Fri, 1 Mar 2019 11:45:25 -0500 Received: from mail-qk1-f169.google.com ([209.85.222.169]:40937 "EHLO mail-qk1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728558AbfCAQpZ (ORCPT ); Fri, 1 Mar 2019 11:45:25 -0500 Received: by mail-qk1-f169.google.com with SMTP id h28so14650438qkk.7 for ; Fri, 01 Mar 2019 08:45:24 -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=EXY4F/BV1m3tsD91+WfjvHv5SQJUjMQnB+StYF4tRLo=; b=V3lmxoPNpEIPE67nwh6ZfQTANu7QBUa72DeLwkqLQy7nlkGVSFjBNmH/2NVt/cRj+c DJrtbrOYNkdngjoGSB+73eZL5PENiRaa1mgLgYNMMjNfUgjM6K6QcjXStjS/0w4xmZEu U2wSZNyEj/NWyRCreRrhcFoIYMVwWz7W/jBKmzojzWZxInBJkUn4rMROmKCqwkJINZg9 jRqcNtTl46AVwocnay76SJIWw2kZ7GcvFjujY/hZ8eda++TkObBsL2X+4k0xWCNIv1Gx R0rD1HUbwz6nAVgbTH3jr0WXnLqd8k8aQu5sVCiLBIeDFlGiQiK/npcwXzVLozlmDO4k naVw== 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=EXY4F/BV1m3tsD91+WfjvHv5SQJUjMQnB+StYF4tRLo=; b=gXjqn6akWpBoQv2HSGq57kHfyDTJQ3dgWFV5s5NOSClIwtDldP1xEEjPTgeFH1XPwX UQXRm/6uuWdNDDyAW5eRfOmDnRYj0Q5fwdNuinMbKOyHwPJLxN+ZyHh4KaGGskqPfphg 5BeBBv85VNvQ/6RqtUxn9IM31sqHuI02jF9sr8gu8E7n+5Iys4Lt6fatXt19R/pSLSzF Q+H8xXIV7qF7qolrAZkj4yAGBCZ/ys5mz41Ol6IAZPR/7+rzMe3fBeMr/aZH/1nfJEFM YMDzqBPAVj0FIPdlQtbuPuIyVikJeuXz9KZq7Aq4nMNhwVFUOwL8fx+3tdp1ey7w8Lq4 jpqg== X-Gm-Message-State: APjAAAXBdWIYoJsF4oplKauc/Qn2PEExmr1dPMb3TFYxlD/+Y15j+k5n yDZ5yN0QgEh27EN5YvtJJzTuNA== X-Google-Smtp-Source: APXvYqw2AS/SNTO9/q303V3/ThgvNEodPmV7jqXDi5Q67KckgtlgHeEO2vm+QRCUAtebE0N556SkRw== X-Received: by 2002:a37:a09:: with SMTP id 9mr4210484qkk.341.1551458724302; Fri, 01 Mar 2019 08:45:24 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id l24sm15040264qtf.27.2019.03.01.08.45.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2019 08:45:24 -0800 (PST) Date: Fri, 1 Mar 2019 08:45:15 -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 RFC 3/8] net: devlink: introduce devlink_compat_switch_id_get() helper Message-ID: <20190301084515.5b378b37@cakuba.netronome.com> In-Reply-To: <20190301160542.6474-4-jiri@resnulli.us> References: <20190301160542.6474-1-jiri@resnulli.us> <20190301160542.6474-4-jiri@resnulli.us> 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:05:37 +0100, Jiri Pirko wrote: > From: Jiri Pirko > > Introduce devlink_compat_switch_id_get() helper which fills up switch_id > according to passed netdev pointer. Call it directly from > dev_get_port_parent_id() as a fallback when ndo_get_port_parent_id > is not defined for given netdev. > > Signed-off-by: Jiri Pirko Here my locking concerns are even stronger :S Do you want to introduce some extra ordering rules regarding lifetime of devlink ports and their netdevs?