From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by dpdk.org (Postfix) with ESMTP id 82849378B for ; Thu, 28 Feb 2019 17:44:41 +0100 (CET) Received: by mail-ed1-f41.google.com with SMTP id j89so17523495edb.9 for ; Thu, 28 Feb 2019 08:44:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WEYyPDO/lkzqRQBbBoENXOAtDjfMQvRlqzbWqP98iVk=; b=Bnr3PFNzVAXKYiRm+Eu3stDy4l+KHnm/2dBd31o5TKmtTSyfwludzeA/sfvhYEVZrT 5nzA1fYPWviIvaWkngipXKog0uFIaOPSpLJZAvVeiCbZyApMcVZwpZP3XtFEUJqVSTwH IBQ4Tkm0TN5PAnuNEXpnkWUZO3A3fCk2fuHqxs4hGZD7ahYwZbO+hevWTRELdvpXlMcL /q3j2mfGNcJ56Olv86tnZMEB29rwan1q1lc86jgnH3sMK+oozDGD1OfvdCVB1g8PkRpZ i/siIGEryx3F3OMkIxxJN8ZQZqMbh1UkARi74cAY5mTZArcsvyRIWnGYJap6ZyE3j9SA VogA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WEYyPDO/lkzqRQBbBoENXOAtDjfMQvRlqzbWqP98iVk=; b=j6pbTO5gexKr19zMU6DdFnwb7M3+4eTRCIkC6TJ+FNcx6swLE35z5PNeFW0LbJJ46Z ccksM+06mE1a0TDSCLtxeY4T4dqIK5q+XVpxijIg02QiewY/2uR8gcpJHZbDjoQ2yUT5 sUJ6J7Jf5aURoPgvW58kbLM1sg8avTb8pVCCxNTK3+GcRlVg7FUyPwMzvRDOzb3BkQAL wknYaYDSbKVVmp9Y9y5MUfRoz4xgdK/qW4EStV43h6EyOU9vhj4dLqDTXlEoB4iadWKV sFPs8ZTvAvDGYnYtOwQf106Q1pSbZPEbmCOpguEXAefiRGZUkAJMDM708TXqAwSDWb/C pWRg== X-Gm-Message-State: AHQUAubORCg0ECv03dRK+5mCC4nUolM00juoKuerlOk8PSYmF8I7naNY ynbS+QjLZJitghfVW6VYXVrAZ/tL0DxUkqTqg78= X-Google-Smtp-Source: AHgI3Ib0da0UiYW6EMm+CPXvgfPCzd9EgD1bENHqx273VFzl0zuTJkmfBjItSD6thFpt4juXMWfgyjVM2fGkF92HF/Y= X-Received: by 2002:a17:906:61d6:: with SMTP id t22mr6147260ejl.151.1551372281068; Thu, 28 Feb 2019 08:44:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rami Rosen Date: Thu, 28 Feb 2019 18:44:32 +0200 Message-ID: To: Dekel Peled Cc: Shahaf Shuler , Yongseok Koh , "dev@dpdk.org" , Ori Kam , Matan Azrad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC] net/mlx5: support new naming scheme for representors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 16:44:41 -0000 Hi, Dekel, It seems that the link to the patch in your post is broken. Regards, Rami Rosen =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=94=D7=B3, 28 = =D7=91=D7=A4=D7=91=D7=A8=D7=B3 2019, 12:04, =D7=9E=D7=90=D7=AA Dekel Peled = =E2=80=8F: > In current kernel implementation, the physical port name for representors > is a numeric string (i.e. '0', '1', etc.). > > Kernel patch [1] implements an updated scheme for naming of representors > ports. > The new scheme gives a unique name for each port using the PF ID and the > VF ID. > Uplink representors are named 'p0', 'p1', etc. > VF representors are named 'pf0vf0', 'pf0vf1', 'pf1vf0', 'pf1vf1', etc. > > This RFC describes the suggested changes to MLX5 PMD, in order to support > the new naming scheme, while maintaining support of the existing naming > scheme. > > During PCI probing, MLX5 PMD uses Netlink to query the kernel for switch > information. > The response is processed by mlx5_nl_switch_info_cb(). > If this query fails, MLX5 PMD attempts to use sysfs to query for switch > information. > This query is implemented in mlx5_sysfs_switch_info(); > > The following section describes the suggested changes by pseudocode: > mlx5_nl_switch_info_cb() > { > Parse the netlink response message. > If found type IFLA_PHYS_PORT_NAME { > Convert payload string to number, store as port-name. > /* START NEW CODE */ > If convert failed { > If found substring "vf" in payload string { > Convert the remainder of payload string t= o > number > Store as port-name. > } > } > /* END OF NEW CODE */ > } > } > > mlx5_sysfs_switch_info() > { > Convert ifindex to ifname. > Open file /sys/class/net//phys_port_name > Try to convert file contents to number, if succeeded store as > port-name. > /* START NEW CODE */ > If convert failed { > Try to convert file contents to 'pf'/number/'vf'/number. > If succeeded, store last number as port-name. > } > /* END OF NEW CODE */ > } > > [1] http://l-gerrit.mtl.labs.mlnx:8080/#/c/upstream/linux/+/160883/ >