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=-3.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_GIT 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 56CECC43381 for ; Tue, 26 Feb 2019 18:24:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2172E217F5 for ; Tue, 26 Feb 2019 18:24:51 +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="g9G+o6lf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbfBZSYt (ORCPT ); Tue, 26 Feb 2019 13:24:49 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:37031 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728920AbfBZSYt (ORCPT ); Tue, 26 Feb 2019 13:24:49 -0500 Received: by mail-qt1-f194.google.com with SMTP id a48so16069853qtb.4 for ; Tue, 26 Feb 2019 10:24:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r5rtHN9IePcX5BsntNYDzNaB9cnnXvhfj9fpSQRxNto=; b=g9G+o6lfIK/97/iTM1gZqVLiXUb1mQcicv+fSqA39wIza3yO6EGyZH5C9UhGGefyzz SIN9/r6H6FhZ6F64ltgOOjVnlPmsWwsKaZDet4YaNZ2UztIWuh6qRwB3FDe7CXh3IySY DQEjxDF61p4yZuxtw/7aVjvxWgbtvfotsiX78jR+cJw5KYh3jjk9IxPO/WlfGBR4RAOq F0a4r4ghbKKTIg7cVkqybdNc35Ky6rHJaN+BTcis729IOFHlOewHmLuVU4LAqlZvvYL7 MSxvFYHx1ESt+O8akDnj2PeLKWnoXhDlfDkwVislsSp6S/Tc2frgoL0jRHJknuGdCSAt lTkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r5rtHN9IePcX5BsntNYDzNaB9cnnXvhfj9fpSQRxNto=; b=cP/Dyhshebz3+g9ZwNHqb8TlCQLPAyIjIxAskXRe+c4Ail1istfFjwIBgs4tjTuyTS xGGxSWtaYLahzrAG+EVFED/lAFdoUx3eefPhOos+3ywYg/s1xMJlKmRXqgJSCOnePpob IZi/fLYgpqi7B8FMefSNx6c+GfWkxod1juya4huIf5bdXFUzcevrX4KS/znh/pn1cDUx /qmRtc3syy+GyPjtTeMpBUFpVqs0BU30e0hRd0uZQGf3WFCpTsQAqgwEBDBsMn/pKbpV sCZCnMpkgBqNCZSZU2GTLvLwEltQiJOfHdH1wjxTWLrNFH5oFMmJ35Les1kgQ+dj2ezT 2K/Q== X-Gm-Message-State: AHQUAuZ9nT/rdm6dt/WwCe52n26IaLCk80x0b6c0FUb+7a4bNqU8ZokV kNufXRUq0w1mHPvZ2G370Cs+uA== X-Google-Smtp-Source: AHgI3IYdvrcdkOgSzLMNrWxc7lP9RcPnbRePJoSngayVWraIgYqMRng4TnhYw1vay/IqNZ3MdbTGOg== X-Received: by 2002:aed:3f2c:: with SMTP id p41mr19083633qtf.261.1551205488344; Tue, 26 Feb 2019 10:24:48 -0800 (PST) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id u31sm9733892qth.15.2019.02.26.10.24.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 10:24:47 -0800 (PST) From: Jakub Kicinski To: davem@davemloft.net, jiri@resnulli.us Cc: oss-drivers@netronome.com, netdev@vger.kernel.org, Jakub Kicinski Subject: [PATCH net-next 0/8] devlink: add PF and VF port flavours Date: Tue, 26 Feb 2019 10:24:28 -0800 Message-Id: <20190226182436.23811-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! This series brings port flavours for SR-IOV NICs. First patch reshuffles nfp port registration to make the port info available at netdev registration time. Next the VF and PF port flavours are added to the core and the nfp driver. The existing port information (split) is now physical port-specific. The currently deployed NFPs have a single PF per PCIe link which means multiport cards have multiple logical ports (netdevs) per function. This forces us to add a notion of a PCIe subport (implemented in patches 4 and 5). With that in place nfp driver can now switch to using the devlink_port_get_phys_port_name() helper (patch 6). Next two patches add a notion of a peer netdev, this is the netdev "on the other side of the link". It can be used to inform users which PF and VF corresponds to which port/"representor" without the need for bus info parsing. Last but not least - I fix some kdoc warnings :) Jakub Kicinski (8): nfp: split devlink port init from registration devlink: add PF and VF port flavours nfp: register devlink ports of all reprs devlink: allow subports on devlink PCI ports nfp: switch to devlink_port_get_phys_port_name() devlink: introduce port's peer netdevs nfp: expose PF peer netdevs devlink: fix kdoc drivers/net/ethernet/netronome/nfp/abm/main.c | 1 + .../net/ethernet/netronome/nfp/flower/main.c | 1 + .../net/ethernet/netronome/nfp/nfp_devlink.c | 60 ++++++- .../net/ethernet/netronome/nfp/nfp_net_main.c | 17 +- .../net/ethernet/netronome/nfp/nfp_net_repr.c | 16 +- drivers/net/ethernet/netronome/nfp/nfp_port.c | 33 +--- drivers/net/ethernet/netronome/nfp/nfp_port.h | 4 + include/net/devlink.h | 41 ++++- include/uapi/linux/devlink.h | 9 ++ net/core/devlink.c | 153 +++++++++++++++--- 10 files changed, 268 insertions(+), 67 deletions(-) -- 2.19.2