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=-14.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 402E4C48BDF for ; Fri, 11 Jun 2021 02:41:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18E016108D for ; Fri, 11 Jun 2021 02:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbhFKCna (ORCPT ); Thu, 10 Jun 2021 22:43:30 -0400 Received: from mail-ot1-f42.google.com ([209.85.210.42]:39564 "EHLO mail-ot1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230358AbhFKCn2 (ORCPT ); Thu, 10 Jun 2021 22:43:28 -0400 Received: by mail-ot1-f42.google.com with SMTP id 5-20020a9d01050000b02903c700c45721so1746799otu.6 for ; Thu, 10 Jun 2021 19:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jUFxb829kZNY6qXhnW+ceq6eAYh4muY8u/n6OywWO5k=; b=e92QUNt5CPJVRobCZw8OKcQD337dpqTQ7hCTVCKxCfxr6KXmA7RVrffKiSygemosD5 Q3EDbytdSdTfn0OoMNX1SEEKLCGWppHLyidjRA9wuAPzoUsCe5DzIotSp/j/hxsmwoq/ dnbrOWgD2y68+ZchDwWWvfouy1J+nd5+BQKMpx5vHwdF4nw6lCBxbEiBRxFKqHEXBl++ DtMXAw1y2OlvTahIcWZeJFp14UMiXhbAMcxRNQ2sYZnn1V1+1xcjXh/aZnL+JXno+w5e /QfYODcqiC9XkSwrCWHii2gEygqXTJwpgyrTixucEN6v3sFPLRn8uLfIaZePYc/Gygn5 /v6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jUFxb829kZNY6qXhnW+ceq6eAYh4muY8u/n6OywWO5k=; b=h315fGw017uPbI+pE2fuM/qJiwXBy79m2HTcgnPpAsdAgRSO12J9mTnuTMDiiZb89g mzEneUZiNGj2wxBySIs+TIKF2NAx0AYevz+d44XVONLatmyJg3T2GKIZAOTwUcLCRgRz fqK+STQRzG8HXAb8HHm3IOrc+5lNsY1t4B9qEgDNDr5SU1DbYhcsBzVzuEQUuWUBeYTz XiHMO8a9kY0jB1M5dFTUesnI16MZbeckNWqYXgtRarCX9ZaHSVWWra7bI4+rYPvPhUIl 9vEtgqZY9CzvRB4UPRyTcJ5Yt+dibHkA+VN+Q0+kek+6706YGh9tURJzBO9lFelKMcy0 BaOg== X-Gm-Message-State: AOAM532gqVpGmYdU7hTofyYMX1Oa+ngpOxUWaPEUrZco4pevfRFkj4hi RZntZYxzZs4OpTatnurO9o31hfMt8LI= X-Google-Smtp-Source: ABdhPJxuHJTmr1GxwWUcWheIXNCf3m8mJAo1j0i65kYI/3qiFoAZyRplqftcbDaB/Cl4LldSCf30Mg== X-Received: by 2002:a05:6830:270a:: with SMTP id j10mr1158093otu.26.1623379216903; Thu, 10 Jun 2021 19:40:16 -0700 (PDT) Received: from Davids-MacBook-Pro.local ([8.48.134.22]) by smtp.googlemail.com with ESMTPSA id u1sm884215ooo.18.2021.06.10.19.40.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Jun 2021 19:40:16 -0700 (PDT) Subject: Re: [PATCH iproute2-next v2] devlink: Add optional controller user input To: Parav Pandit , stephen@networkplumber.org, netdev@vger.kernel.org Cc: Jiri Pirko References: <20210607192406.14884-1-parav@nvidia.com> From: David Ahern Message-ID: Date: Thu, 10 Jun 2021 20:40:14 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210607192406.14884-1-parav@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 6/7/21 1:24 PM, Parav Pandit wrote: > A user optionally provides the external controller number when user > wants to create devlink port for the external controller. > > An example on eswitch system: > $ devlink dev eswitch set pci/0033:01:00.0 mode switchdev > > $ devlink port show > pci/0033:01:00.0/196607: type eth netdev enP51p1s0f0np0 flavour physical port 0 splittable false > pci/0033:01:00.0/131072: type eth netdev eth0 flavour pcipf controller 1 pfnum 0 external true splittable false > function: > hw_addr 00:00:00:00:00:00 > > $ devlink port add pci/0033:01:00.0 flavour pcisf pfnum 0 sfnum 77 controller 1 > pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 external true splittable false > function: > hw_addr 00:00:00:00:00:00 state inactive opstate detached > > Signed-off-by: Parav Pandit > Reviewed-by: Jiri Pirko > --- > changelog: > v1->v2: (addresssed comments from David) > - split the command help output and man page to multiple lines to make it readable > --- > devlink/devlink.c | 21 ++++++++++++++++++--- > man/man8/devlink-port.8 | 21 +++++++++++++++++++++ > 2 files changed, 39 insertions(+), 3 deletions(-) > applied to iproute2-next, but ... > @@ -3795,7 +3806,9 @@ static void cmd_port_help(void) > pr_err(" devlink port param set DEV/PORT_INDEX name PARAMETER value VALUE cmode { permanent | driverinit | runtime }\n"); > pr_err(" devlink port param show [DEV/PORT_INDEX name PARAMETER]\n"); > pr_err(" devlink port health show [ DEV/PORT_INDEX reporter REPORTER_NAME ]\n"); > - pr_err(" devlink port add DEV/PORT_INDEX flavour FLAVOUR pfnum PFNUM [ sfnum SFNUM ]\n"); > + pr_err(" devlink port add DEV/PORT_INDEX flavour FLAVOUR pfnum PFNUM\n" > + " [ sfnum SFNUM ]\n" > + " [ controller CNUM ]\n"); I put both of those lines on 1 since they fit within 80. Same below.