DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] White listing a virtual device
@ 2014-11-07 12:36 Nicolas Pernas Maradei
  2014-11-07 12:55 ` Thomas Monjalon
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pernas Maradei @ 2014-11-07 12:36 UTC (permalink / raw)
  To: dev

Hi,

I'm currently using the --vdev option to create virtual devices, mainly 
for testing. I noticed that these virtual devices are not being 
white-listed any more. That was the original behaviour when the option 
was called --use-device. Instead of that the virtual device is being 
added to the device list along with the real ones.

You can see this behaviour by running testpmd as shown below. I have 4 
Niantics on my system and they are all bound to igb_uio driver. You can 
see the 5 ports being reported.

Now, the --pci-whitelist argument lets you white list a device but it 
only accepts a PCI address as an option. My question is, how do you 
white list a virtual device? Did this feature get dropped when the 
--use-device was split into --vdev and --pci-whitelist back in 
March/April or is this just an unhandled corner case?


     [nico dpdk]((v1.7.1))# sudo 
./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 3 
--vdev=eth_pcap0,rx_pcap=eth_ipv4.pcap,tx_pcap=/dev/null
     ...

     Configuring Port 0 (socket 0)
     Port 0: 00:00:00:01:02:03       <---- PCAP virtual device
     Configuring Port 1 (socket 0)
     Port 1: 90:E2:BA:6D:EC:D4
     Configuring Port 2 (socket 0)
     Port 2: 90:E2:BA:6D:EC:D5
     Configuring Port 3 (socket 0)
     Port 3: 90:E2:BA:74:6C:B4
     Configuring Port 4 (socket 0)
     Port 4: 90:E2:BA:74:6C:B5
     Checking link statuses...
     Port 0 Link Up - speed 10000 Mbps - full-duplex
     Port 1 Link Up - speed 10000 Mbps - full-duplex
     Port 2 Link Up - speed 10000 Mbps - full-duplex
     Port 3 Link Up - speed 10000 Mbps - full-duplex
     Port 4 Link Up - speed 10000 Mbps - full-duplex
     Done
     No commandline core given, start packet forwarding
     ...


Thanks,
Nico.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 12:36 [dpdk-dev] White listing a virtual device Nicolas Pernas Maradei
@ 2014-11-07 12:55 ` Thomas Monjalon
  2014-11-07 13:13   ` Nicolas Pernas Maradei
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2014-11-07 12:55 UTC (permalink / raw)
  To: Nicolas Pernas Maradei; +Cc: dev

Hi Nicolas,

2014-11-07 12:36, Nicolas Pernas Maradei:
> I'm currently using the --vdev option to create virtual devices, mainly 
> for testing. I noticed that these virtual devices are not being 
> white-listed any more. That was the original behaviour when the option 
> was called --use-device. Instead of that the virtual device is being 
> added to the device list along with the real ones.

Yes

> Now, the --pci-whitelist argument lets you white list a device but it 
> only accepts a PCI address as an option. My question is, how do you 
> white list a virtual device? Did this feature get dropped when the 
> --use-device was split into --vdev and --pci-whitelist back in 
> March/April or is this just an unhandled corner case?

It's by design. If you add a vdev, you want to use it and there is no
reason to whitelist it, and especially no reason to blacklist a device
you created for your usage.

Do you agree?
Is there a part of the documentation which should be improved?

-- 
Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 12:55 ` Thomas Monjalon
@ 2014-11-07 13:13   ` Nicolas Pernas Maradei
  2014-11-07 13:26     ` Neil Horman
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pernas Maradei @ 2014-11-07 13:13 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On 07/11/14 12:55, Thomas Monjalon wrote:
> It's by design. If you add a vdev, you want to use it and there is no
> reason to whitelist it, and especially no reason to blacklist a device
> you created for your usage.
>
> Do you agree?

Hi Thomas,

Generally speaking you probably won't want to white list a virtual 
device - just using it. However it does seem an inconsistency in the 
design that you could add virtual devices but you can't white list them. 
If they are added to the main device list they should be treated just as 
another device.

In our particular use case we want to white list a pcap device to ensure 
that it is the only available port for testing.

Thanks,
Nico.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 13:13   ` Nicolas Pernas Maradei
@ 2014-11-07 13:26     ` Neil Horman
  2014-11-07 13:39       ` Nicolas Pernas Maradei
  0 siblings, 1 reply; 12+ messages in thread
From: Neil Horman @ 2014-11-07 13:26 UTC (permalink / raw)
  To: Nicolas Pernas Maradei; +Cc: dev

On Fri, Nov 07, 2014 at 01:13:37PM +0000, Nicolas Pernas Maradei wrote:
> On 07/11/14 12:55, Thomas Monjalon wrote:
> >It's by design. If you add a vdev, you want to use it and there is no
> >reason to whitelist it, and especially no reason to blacklist a device
> >you created for your usage.
> >
> >Do you agree?
> 
> Hi Thomas,
> 
> Generally speaking you probably won't want to white list a virtual device -
> just using it. However it does seem an inconsistency in the design that you
> could add virtual devices but you can't white list them. If they are added
> to the main device list they should be treated just as another device.
> 
> In our particular use case we want to white list a pcap device to ensure
> that it is the only available port for testing.
> 
> Thanks,
> Nico.
> 

Then you create the pcap device with --vdev, and simply don't load the pmds for
any of your physical devices (or just don't use pci-whitelist at all if you're
doing a static build).  If you do that, then the corresponding niantic driver
won't initialize any of the hardware, you'll only get the pcap port.

Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 13:26     ` Neil Horman
@ 2014-11-07 13:39       ` Nicolas Pernas Maradei
  2014-11-07 13:59         ` Thomas Monjalon
  2014-11-07 14:02         ` Neil Horman
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas Pernas Maradei @ 2014-11-07 13:39 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev


On 07/11/14 13:26, Neil Horman wrote:
> Then you create the pcap device with --vdev, and simply don't load the pmds for
> any of your physical devices (or just don't use pci-whitelist at all if you're
> doing a static build).  If you do that, then the corresponding niantic driver
> won't initialize any of the hardware, you'll only get the pcap port.
>
> Neil

Hi Neil,

What you are saying is just another way to black list the ports I don't 
want to use. I'm aware of that option (as well as using the -b option) 
but in our particular case we have several systems under test with 
different configurations and we want to use this virtual port only. 
Which seems to be a perfect use case for white listing rather than black 
listing or modifying the system configuration.

As far as I remember this option was available in previous versions.

Thanks,
Nico.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 13:39       ` Nicolas Pernas Maradei
@ 2014-11-07 13:59         ` Thomas Monjalon
  2014-11-07 14:02         ` Neil Horman
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2014-11-07 13:59 UTC (permalink / raw)
  To: Nicolas Pernas Maradei; +Cc: dev

2014-11-07 13:39, Nicolas Pernas Maradei:
> On 07/11/14 13:26, Neil Horman wrote:
> > Then you create the pcap device with --vdev, and simply don't load the pmds for
> > any of your physical devices (or just don't use pci-whitelist at all if you're
> > doing a static build).  If you do that, then the corresponding niantic driver
> > won't initialize any of the hardware, you'll only get the pcap port.
> 
> What you are saying is just another way to black list the ports I don't 
> want to use. I'm aware of that option (as well as using the -b option) 
> but in our particular case we have several systems under test with 
> different configurations and we want to use this virtual port only. 
> Which seems to be a perfect use case for white listing rather than black 
> listing or modifying the system configuration.

Sorry I don't understand why you don't want to use the blacklist option.

-- 
Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 13:39       ` Nicolas Pernas Maradei
  2014-11-07 13:59         ` Thomas Monjalon
@ 2014-11-07 14:02         ` Neil Horman
  2014-11-07 14:28           ` Nicolas Pernas Maradei
  1 sibling, 1 reply; 12+ messages in thread
From: Neil Horman @ 2014-11-07 14:02 UTC (permalink / raw)
  To: Nicolas Pernas Maradei; +Cc: dev

On Fri, Nov 07, 2014 at 01:39:52PM +0000, Nicolas Pernas Maradei wrote:
> 
> On 07/11/14 13:26, Neil Horman wrote:
> >Then you create the pcap device with --vdev, and simply don't load the pmds for
> >any of your physical devices (or just don't use pci-whitelist at all if you're
> >doing a static build).  If you do that, then the corresponding niantic driver
> >won't initialize any of the hardware, you'll only get the pcap port.
> >
> >Neil
> 
> Hi Neil,
> 
> What you are saying is just another way to black list the ports I don't want
> to use. I'm aware of that option (as well as using the -b option) but in our
> particular case we have several systems under test with different
> configurations and we want to use this virtual port only. Which seems to be
> a perfect use case for white listing rather than black listing or modifying
> the system configuration.
> 
> As far as I remember this option was available in previous versions.
> 
> Thanks,
> Nico.
> 

Ah, you want the -w option then, it still appears in the short options list in
my tree. That sets up the option parsing for all pci devices to require
whitelisting to be initalized.  virtual devices are exempt from this process
because declaring them with --vdev implicitly means you want to use them.

Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 14:02         ` Neil Horman
@ 2014-11-07 14:28           ` Nicolas Pernas Maradei
  2014-11-07 14:57             ` Thomas Monjalon
  2014-11-10  8:13             ` Olivier MATZ
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas Pernas Maradei @ 2014-11-07 14:28 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

On 07/11/14 14:02, Neil Horman wrote:
> Ah, you want the -w option then, it still appears in the short options list in
> my tree. That sets up the option parsing for all pci devices to require
> whitelisting to be initalized.  virtual devices are exempt from this process
> because declaring them with --vdev implicitly means you want to use them.
>
> Neil

Hi Neil,

Thanks for your reply. The -w option is the same as --pci-whitelist 
mentioned in my first email. Declaring a virtual device with --vdev 
means that I want to use it but there doesn't seem to be a way to say 
that I want to use only that device. Clearly the white list option is 
the way to specify this but if virtual devices are excluded from 
-w/--pci-whitelist you can't only white list the virtual devices.

I want to be able to have the same command line arguments across several 
systems under test without having to know where the physical devices are 
(to black list them).

My issue is not that I don't want to black list the physical devices 
it's just that I want to white list the virtual ones. I don't see why 
that option is not available.

Thanks,
Nico.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 14:28           ` Nicolas Pernas Maradei
@ 2014-11-07 14:57             ` Thomas Monjalon
  2014-11-07 15:01               ` Nicolas Pernas Maradei
  2014-11-10  8:13             ` Olivier MATZ
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2014-11-07 14:57 UTC (permalink / raw)
  To: Nicolas Pernas Maradei; +Cc: dev

2014-11-07 14:28, Nicolas Pernas Maradei:
> Thanks for your reply. The -w option is the same as --pci-whitelist 
> mentioned in my first email. Declaring a virtual device with --vdev 
> means that I want to use it but there doesn't seem to be a way to say 
> that I want to use only that device. Clearly the white list option is 
> the way to specify this but if virtual devices are excluded from 
> -w/--pci-whitelist you can't only white list the virtual devices.
> 
> I want to be able to have the same command line arguments across several 
> systems under test without having to know where the physical devices are 
> (to black list them).
> 
> My issue is not that I don't want to black list the physical devices 
> it's just that I want to white list the virtual ones. I don't see why 
> that option is not available.

OK, now I better understand your need.
I think that your use case was simply forgotten when designing the
new behaviour.
Could you prepare a patch for this need?
Or maybe you could workaround with a script based on lspci to blacklist all
network devices?

-- 
Thomas

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 14:57             ` Thomas Monjalon
@ 2014-11-07 15:01               ` Nicolas Pernas Maradei
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Pernas Maradei @ 2014-11-07 15:01 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On 07/11/14 14:57, Thomas Monjalon wrote:
> OK, now I better understand your need.
> I think that your use case was simply forgotten when designing the
> new behaviour.
> Could you prepare a patch for this need?
> Or maybe you could workaround with a script based on lspci to blacklist all
> network devices?

Hi Thomas,

Thanks for your reply. That explains it then. I'll try to put a patch 
together the following week.

Thanks,
Nico.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-07 14:28           ` Nicolas Pernas Maradei
  2014-11-07 14:57             ` Thomas Monjalon
@ 2014-11-10  8:13             ` Olivier MATZ
  2014-11-16 21:07               ` Nicolas Pernas Maradei
  1 sibling, 1 reply; 12+ messages in thread
From: Olivier MATZ @ 2014-11-10  8:13 UTC (permalink / raw)
  To: Nicolas Pernas Maradei, Neil Horman; +Cc: dev

Hi Nicolas,

> Thanks for your reply. The -w option is the same as --pci-whitelist
> mentioned in my first email. Declaring a virtual device with --vdev
> means that I want to use it but there doesn't seem to be a way to say
> that I want to use only that device. Clearly the white list option is
> the way to specify this but if virtual devices are excluded from
> -w/--pci-whitelist you can't only white list the virtual devices.
> 
> I want to be able to have the same command line arguments across several
> systems under test without having to know where the physical devices are
> (to black list them).
> 
> My issue is not that I don't want to black list the physical devices
> it's just that I want to white list the virtual ones. I don't see why
> that option is not available.

What about using the --no-pci option ?

It would blacklist all physical devices (as PCI devices are the only
ones supported today).

Regards,
Olivier

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] White listing a virtual device
  2014-11-10  8:13             ` Olivier MATZ
@ 2014-11-16 21:07               ` Nicolas Pernas Maradei
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Pernas Maradei @ 2014-11-16 21:07 UTC (permalink / raw)
  To: Olivier MATZ, Neil Horman; +Cc: dev


On 10/11/14 08:13, Olivier MATZ wrote:
> What about using the --no-pci option ?
>
> It would blacklist all physical devices (as PCI devices are the only
> ones supported today).

Hi Olivier,

Your idea does work for me. Although it's more a workaround than a real 
solution. I'll be submitting a patch that allows virtual devices to be 
white/black listed shortly.

Thanks,
Nico.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-11-16 20:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07 12:36 [dpdk-dev] White listing a virtual device Nicolas Pernas Maradei
2014-11-07 12:55 ` Thomas Monjalon
2014-11-07 13:13   ` Nicolas Pernas Maradei
2014-11-07 13:26     ` Neil Horman
2014-11-07 13:39       ` Nicolas Pernas Maradei
2014-11-07 13:59         ` Thomas Monjalon
2014-11-07 14:02         ` Neil Horman
2014-11-07 14:28           ` Nicolas Pernas Maradei
2014-11-07 14:57             ` Thomas Monjalon
2014-11-07 15:01               ` Nicolas Pernas Maradei
2014-11-10  8:13             ` Olivier MATZ
2014-11-16 21:07               ` Nicolas Pernas Maradei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).