From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id C5E6AA0613
	for <public@inbox.dpdk.org>; Thu, 26 Sep 2019 06:15:58 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 560542956;
	Thu, 26 Sep 2019 06:15:57 +0200 (CEST)
Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com
 [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 967FD1E2B
 for <dev@dpdk.org>; Thu, 26 Sep 2019 06:15:55 +0200 (CEST)
Received: from pps.filterd (m0045851.ppops.net [127.0.0.1])
 by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id
 x8Q4CbqG028576; Wed, 25 Sep 2019 21:15:53 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=pfpt0818;
 bh=1fQP5c+8PZvlNQWRV4fJPTFuPpqaRI5Ba7x2qphPipo=;
 b=W/2gqxf4exPRwhu24ZOiKqdEBwzWB2jcxQvHzUkifpb1dvgAqzJY92Twrq3oZn2EP9Dy
 hMBPEhsIIhQs4/xJrBBuWFKRDsA6fOeVbUC1larKQ1bozNt3ATXB6meYEvYIUGxA5Vti
 cg3Zg9bcIjleYFg64L6Y8vf/LLsc+fr0WfWDnoGMDDNn873Ar9jYSIQG+byzEwQ/OCtA
 dCBkflKrGiNmDGobvQ0L/Jvxo44bQ5nFdxVeBr8rJUg62TMUWKIF1HPWIu2Y/CqN1U+Z
 iJDQ+uFFbiKRNqd/tjWzAPC9MqGi5VycxvaoE3sGsnw6Ip8CxWtmeUfbLV13jd10sWmu 6Q== 
Received: from sc-exch02.marvell.com ([199.233.58.182])
 by mx0b-0016f401.pphosted.com with ESMTP id 2v8p3r80e5-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);
 Wed, 25 Sep 2019 21:15:53 -0700
Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com
 (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 25 Sep
 2019 21:15:51 -0700
Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.54) by
 SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server
 (TLS) id
 15.0.1367.3 via Frontend Transport; Wed, 25 Sep 2019 21:15:51 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=fAiRU/54LVZwXKg2+mR2Iwhzp5XDHI3d9BhXJ10AMJIQ1JFDTHnNkO4idi1l49ZCCxzxz+W6HidGZQ6JqSLQbjnEqz6LkABXLhuxQhy1Zl6KJytiVIoyqOpd9i4PKpG/o30U7zvkJztZy5tH8lZLRiI4yJKaD0NXyXHxc0Ws46wIWjeuTbphgu2ZuDOGxDUIqk2g5k7z6u3Fx/xpthNRRnOZTbvNeg8d+buDlX4mcKxCl9pDBu0S/ffYKxhbiMtDHAg1bdnXjZCWwsOYf1yfvmPyTYDwlK3i/huoDCZvpbFOYsul+5ZCm+GOf8n5C4fLsGVD2qyM7dcPorcn9V0MMQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=1fQP5c+8PZvlNQWRV4fJPTFuPpqaRI5Ba7x2qphPipo=;
 b=ewZuQrAKK3t07b9wRNdsc6X6n9/iabnQ5L7JoPj37QYxGpiGlpS8uJQUDVcsgJ5pQPXWE9bohAXcUbpQr6qQH2qMI+LXSZlvV0a45Ujaiesy062g9k1crx2tJDcdH0WotSE2XALQqXz2c431Aw0txJFcr+9yju5Q2cciDYPS6/zxwL8cyFvBGN9BGT+MagqIRoMyiPFmcnrSuE2+JQJBZ+aCI4MbCCsZ7sUPU5gid2twFU3bOBLvSIKtKY9cLzrzG/BuGFnUGVPdE2/IUO7ssfywpwlO15qXtkHQoYCVTyjxBVnOszfLVApDSxYz0z2Gv1k9hPFb5LLZIZjvFOtWkg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com;
 dkim=pass header.d=marvell.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=1fQP5c+8PZvlNQWRV4fJPTFuPpqaRI5Ba7x2qphPipo=;
 b=arnLOeJTdA1g/7oJcQgzKC+jUKXK/lysPBOWtMqVdRDkg409ibE3m4eGQt0j/BOTBv1jObfO+Am5nvBKIW8C9VykBB16zhPL0kpuI5OvXJP+9xeEd23fDj6ZTPIz2iDnvvL2EFfNofHBA8VKjIWOLW3P+4bNez3wQ0jJbZ78KsY=
Received: from MWHPR18MB1645.namprd18.prod.outlook.com (10.173.241.137) by
 MWHPR18MB1197.namprd18.prod.outlook.com (10.175.6.7) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.2305.17; Thu, 26 Sep 2019 04:15:49 +0000
Received: from MWHPR18MB1645.namprd18.prod.outlook.com
 ([fe80::e0e3:ce2c:587a:d607]) by MWHPR18MB1645.namprd18.prod.outlook.com
 ([fe80::e0e3:ce2c:587a:d607%7]) with mapi id 15.20.2284.028; Thu, 26 Sep 2019
 04:15:49 +0000
From: Vamsi Krishna Attunuru <vattunuru@marvell.com>
To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= <gaetan.rivet@6wind.com>, Slava Ovsiienko
 <viacheslavo@mellanox.com>
CC: "dev@dpdk.org" <dev@dpdk.org>, "ferruh.yigit@intel.com"
 <ferruh.yigit@intel.com>, "anatoly.burakov@intel.com"
 <anatoly.burakov@intel.com>, Thomas Monjalon <thomas@monjalon.net>, "Jerin
 Jacob Kollanukkaran" <jerinj@marvell.com>
Thread-Topic: [dpdk-dev] [PATCH v1 1/1] bus/pci: probe PCI devices in
 whitelisted	order
Thread-Index: AQHVc2xR4F+OSeK6SkyydCmfpKSaYqc8GlwAgAE3F5A=
Date: Thu, 26 Sep 2019 04:15:49 +0000
Message-ID: <MWHPR18MB1645755325D193F818930E15A6860@MWHPR18MB1645.namprd18.prod.outlook.com>
References: <20190923115630.7929-1-vattunuru@marvell.com>
 <AM4PR05MB32659A26400F3A38BB7F972DD2870@AM4PR05MB3265.eurprd05.prod.outlook.com>
 <20190925090706.xeutwkjiee4hrglk@bidouze.vm.6wind.com>
In-Reply-To: <20190925090706.xeutwkjiee4hrglk@bidouze.vm.6wind.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [14.140.231.66]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 08329319-b584-4873-4669-08d74238367b
x-ms-traffictypediagnostic: MWHPR18MB1197:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <MWHPR18MB11976B8991154C19A3149358A6860@MWHPR18MB1197.namprd18.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 0172F0EF77
x-forefront-antispam-report: SFV:NSPM;
 SFS:(10009020)(4636009)(396003)(346002)(376002)(136003)(366004)(39860400002)(13464003)(189003)(199004)(81156014)(186003)(81166006)(74316002)(3846002)(6116002)(8936002)(2906002)(66066001)(86362001)(7736002)(33656002)(305945005)(7696005)(76176011)(55016002)(25786009)(6506007)(66574012)(316002)(53546011)(6436002)(71190400001)(71200400001)(14444005)(9686003)(478600001)(256004)(4326008)(99286004)(14454004)(5660300002)(446003)(76116006)(64756008)(66556008)(66476007)(54906003)(66446008)(476003)(66946007)(107886003)(52536014)(486006)(110136005)(11346002)(55236004)(102836004)(6246003)(26005)(229853002);
 DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR18MB1197;
 H:MWHPR18MB1645.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; MX:1; A:1; 
received-spf: None (protection.outlook.com: marvell.com does not designate
 permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: E87p9Ex2m/pbST8BiCDN7ESzuFdxqlL3lQ0Ou3QWUt9dWj5LxllXbMdceKco7tZ3IIloyqnEj91ztXvxMAFzsLfKE4AkNVRkoobHnVoIT6IyE9yPxofR+8ApN9h/26UzUC5HD1qDPw4M+dPPq0Bq7gzmUP4f6TgiJ1PFBKkLZ1Ep32Uc3s+ElApZR+B4s6hfyUDX8pEwk/wLGwpIgGvAgFVPG08OeR8nGJ6cpBvaxhsSM8bFTDXyKgs1JuGlr9CH9Ls/wx3MUAZkOQkGpTKrELvsfXX3QBp6UMt5q87xO3OXHNWOJ0bBruVEpfThsDkcA6LIZNtqcDTzeoFLcTXmxYQtpfoVNPK1/YUghaT6OY6SDp9HnP4jvHAwo20tQpgQCj68FZySuv3Lv4JggAc2B1gdf2rpYX7hoaIg1WhmFBA=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 08329319-b584-4873-4669-08d74238367b
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2019 04:15:49.1806 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 7QYpUm7r2c0BaKUB3BnCe5PzqN5EKIf4siJoxhpfwCo31mZX9npoz+USvvqc2RafpOpaWpnV0HoL2s4hwxoGTA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR18MB1197
X-OriginatorOrg: marvell.com
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8
 definitions=2019-09-26_01:2019-09-25,2019-09-26 signatures=0
Subject: Re: [dpdk-dev] [PATCH v1 1/1] bus/pci: probe PCI devices in
 whitelisted	order
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of Ga=EBtan Rivet
Sent: Wednesday, September 25, 2019 2:37 PM
To: Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: Vamsi Krishna Attunuru <vattunuru@marvell.com>; dev@dpdk.org; ferruh.yi=
git@intel.com; anatoly.burakov@intel.com; Thomas Monjalon <thomas@monjalon.=
net>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: Re: [dpdk-dev] [PATCH v1 1/1] bus/pci: probe PCI devices in whitel=
isted order

On Wed, Sep 25, 2019 at 06:41:36AM +0000, Slava Ovsiienko wrote:
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of vattunuru@marvell.com
> > Sent: Monday, September 23, 2019 14:57
> > To: dev@dpdk.org
> > Cc: gaetan.rivet@6wind.com; ferruh.yigit@intel.com;=20
> > anatoly.burakov@intel.com; Thomas Monjalon <thomas@monjalon.net>;=20
> > jerinj@marvell.com; Vamsi Attunuru <vattunuru@marvell.com>
> > Subject: [dpdk-dev] [PATCH v1 1/1] bus/pci: probe PCI devices in=20
> > whitelisted order
> >=20
> > From: Vamsi Attunuru <vattunuru@marvell.com>
> >=20
> > Current pci bus driver scans pci devices in the order that it read from=
 sysfs.
> > Accordingly all or whitelisted devices are getting probed.
> >=20
> > Patch modifies the probing order of whitelisted pci devices in a=20
> > sequence the devices are whitelisted(using EAL flags).
>=20
> Thanks, it would be nice to have opportunity to control probing order,=20
> it might be useful for bonded devices and representors either.
>=20
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
>=20
> >=20
> > It ensures the eth devices that application uses are probed in=20
> > device whitelisted sequence, in turn it facilitates the packet=20
> > forwarding applications to work without any packet loss or=20
> > performance drop when the underneath network ports have different=20
> > bandwidths. By altering the whitelist order applications like=20
> > testpmd, l2fwd can forward the ingress traffic to egress port that has =
of equivalent bandwidth.
> >=20
> > Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>

Hello Vamsi, Viacheslav,

This is a nice patch. I agree that port dependency could be better handled.=
 The port-mapping part however should be managed at the app level.

Vamsi, you gave the example of l2fwd and testpmd, being able to properly co=
nfigure forwarding directions implicitly. I think the better approach here =
is to add these configurations items within the apps directly. Configuring =
the mapping at the port level is not precise enough. The proper control is =
about cores, port and queues, not only ports.
This patch only solves a limited part of this issue with testpmd.

I wrote a command to do this, that collided with some stream rework from In=
tel at the time (3, 4 years back?), so I did not take the time to force it =
through. If there is a need we could discuss about adding this back. I had =
needed it to write a PMD, that could be useful to others.

As you say Viacheslav, there are use-cases that will rely on fine-grained p=
robe order. However, this patch solves this issue only regarding PCI device=
s, depending on other PCI devices. We have in EAL an improper hack about it=
, forcing the vdev probe last, because usually ports depending on others ar=
e virtual ones. As this patch shows, the hack is not sufficient, and as the=
 hack shows, this patch does not cover everything.

A solution, would be an EAL parameter (I propose --no-dev), that disable pr=
obing for all buses. Applications and devices requiring a fine-grained prob=
e order, are then free to start in this mode (and maybe force it through EA=
L conf), then hotplug ports as they see fit.

This will keep the existing behavior stable for current apps, while allowin=
g flexibility for the more advanced ones.


Hi Gaetan,

Thanks, vdev part was not taken care in this patch. Rather than imposing ho=
tplug for every application which requires port mapping, If vdev probing or=
der is also handled same as pdevs(in whitelist order),  existing whitelisti=
ng feature will serve the port mapping requirement, right. Also the existin=
g applications get benefited instead of overloading them with more configur=
ation options.  If these probing order is not needed by default, it can be =
triggered using an EAL parameter(not added yet).

Regards,
A Vamsi

--
Ga=EBtan Rivet
6WIND