Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2018-01-16 Thread Ferruh Yigit
On 11/30/2017 7:35 AM, Yuanhan Liu wrote: > The ethdev name is taken from the "name" parameter from the helper > function rte_eth_dev_allocate(name). The name is given by the caller, > thus, there is no way to guarantee all the callers will follow the > same syntax, leaving us the port name is not

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-18 Thread Thomas Monjalon
Let's summarize and resume this thread. We need a generic syntax to describe a device. This syntax can be used - before initializing the device (i.e. whitelist/blacklist) - or after the initialization (e.g. user config) We need to answer 4 questions: 1/ what are the separators (co

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-18 Thread Thomas Monjalon
18/12/2017 23:30, Stephen Hemminger: > On Mon, 18 Dec 2017 23:25:37 +0100 > Thomas Monjalon wrote: > > > 05/12/2017 14:20, Thomas Monjalon: > > > 05/12/2017 12:04, Adrien Mazarguil: > > > > Just for information, this "port=x" argument in mlx4 is consistent with > > > > the > > > > value found

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-18 Thread Stephen Hemminger
On Mon, 18 Dec 2017 23:25:37 +0100 Thomas Monjalon wrote: > 05/12/2017 14:20, Thomas Monjalon: > > 05/12/2017 12:04, Adrien Mazarguil: > > > Just for information, this "port=x" argument in mlx4 is consistent with > > > the > > > value found in /sys/class/net/ethX/dev_port under Linux. If we ch

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-18 Thread Thomas Monjalon
05/12/2017 14:20, Thomas Monjalon: > 05/12/2017 12:04, Adrien Mazarguil: > > Just for information, this "port=x" argument in mlx4 is consistent with the > > value found in /sys/class/net/ethX/dev_port under Linux. If we choose to use > > a port index (instead of a MAC or something else), it would m

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-06 Thread Yuanhan Liu
On Tue, Dec 05, 2017 at 06:22:05PM +0100, Adrien Mazarguil wrote: > > > > > Just for information, this "port=x" argument in mlx4 is consistent > > > > > with the > > > > > value found in /sys/class/net/ethX/dev_port under Linux. If we choose > > > > > to use > > > > > a port index (instead of a M

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-05 Thread Adrien Mazarguil
On Tue, Dec 05, 2017 at 04:28:00PM +0100, Thomas Monjalon wrote: > 05/12/2017 14:58, Yuanhan Liu: > > On Tue, Dec 05, 2017 at 02:20:05PM +0100, Thomas Monjalon wrote: > > > 05/12/2017 12:04, Adrien Mazarguil: > > > > > > > Hi Yuanhan, > > > > > > > > > > > > > > On Mon, Dec 04, 2017 at 09:55:31P

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-05 Thread Thomas Monjalon
05/12/2017 14:58, Yuanhan Liu: > On Tue, Dec 05, 2017 at 02:20:05PM +0100, Thomas Monjalon wrote: > > 05/12/2017 12:04, Adrien Mazarguil: > > > > > Hi Yuanhan, > > > > > > > > > > On Mon, Dec 04, 2017 at 09:55:31PM +0800, Yuanhan Liu wrote: > > > > rte_devargs is identified by the name (pci id f

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-05 Thread Yuanhan Liu
On Tue, Dec 05, 2017 at 02:20:05PM +0100, Thomas Monjalon wrote: > 05/12/2017 12:04, Adrien Mazarguil: > > > Hi Yuanhan, > > > > > > On Mon, Dec 04, 2017 at 09:55:31PM +0800, Yuanhan Liu wrote: > > > rte_devargs is identified by the name (pci id for pci device). It also > > > includes other driv

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-05 Thread Thomas Monjalon
05/12/2017 12:04, Adrien Mazarguil: > Hi Yuanhan, > > On Mon, Dec 04, 2017 at 09:55:31PM +0800, Yuanhan Liu wrote: > > rte_devargs is identified by the name (pci id for pci device). It also > > includes other driver specific key-value options. It's not clear for the > > user to know which one (or

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-05 Thread Adrien Mazarguil
Hi Yuanhan, On Mon, Dec 04, 2017 at 09:55:31PM +0800, Yuanhan Liu wrote: > On Fri, Dec 01, 2017 at 10:47:50AM +0100, Gaëtan Rivet wrote: > > On Thu, Nov 30, 2017 at 10:44:58PM +0100, Thomas Monjalon wrote: > > > 30/11/2017 22:21, Stephen Hemminger: > > > > On Thu, 30 Nov 2017 18:35:11 +0100 > > >

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-04 Thread Yuanhan Liu
On Fri, Dec 01, 2017 at 10:47:50AM +0100, Gaëtan Rivet wrote: > On Thu, Nov 30, 2017 at 10:44:58PM +0100, Thomas Monjalon wrote: > > 30/11/2017 22:21, Stephen Hemminger: > > > On Thu, 30 Nov 2017 18:35:11 +0100 > > > Thomas Monjalon wrote: > > > > > > > 30/11/2017 18:15, Stephen Hemminger: > > >

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-12-01 Thread Gaëtan Rivet
On Thu, Nov 30, 2017 at 10:44:58PM +0100, Thomas Monjalon wrote: > 30/11/2017 22:21, Stephen Hemminger: > > On Thu, 30 Nov 2017 18:35:11 +0100 > > Thomas Monjalon wrote: > > > > > 30/11/2017 18:15, Stephen Hemminger: > > > > Some thoughts. > > > > 1) Not all devices are PCI; look at recent VMBUS

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-11-30 Thread Thomas Monjalon
30/11/2017 22:21, Stephen Hemminger: > On Thu, 30 Nov 2017 18:35:11 +0100 > Thomas Monjalon wrote: > > > 30/11/2017 18:15, Stephen Hemminger: > > > Some thoughts. > > > 1) Not all devices are PCI; look at recent VMBUS > > > > Yes, we need a syntax which works for every devices. > > I suggest t

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-11-30 Thread Stephen Hemminger
On Thu, 30 Nov 2017 18:35:11 +0100 Thomas Monjalon wrote: > 30/11/2017 18:15, Stephen Hemminger: > > Some thoughts. > > 1) Not all devices are PCI; look at recent VMBUS > > Yes, we need a syntax which works for every devices. > I suggest to use the prefix "pci:" before the PCI id. > We need al

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-11-30 Thread Thomas Monjalon
30/11/2017 18:15, Stephen Hemminger: > Some thoughts. > 1) Not all devices are PCI; look at recent VMBUS Yes, we need a syntax which works for every devices. I suggest to use the prefix "pci:" before the PCI id. We need also a prefix and ids for NXP buses. We could use "vmbus:" before VMBUS ids. H

Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name

2017-11-30 Thread Stephen Hemminger
On Thu, 30 Nov 2017 15:35:30 +0800 Yuanhan Liu wrote: > The ethdev name is taken from the "name" parameter from the helper > function rte_eth_dev_allocate(name). The name is given by the caller, > thus, there is no way to guarantee all the callers will follow the > same syntax, leaving us the por