[dpdk-dev] [PATCH v2 1/1] pci: default to whitelist mode

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Mar 30 21:36:43 CEST 2017


2017-03-28 13:02, Van Haaren, Harry:
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Gaëtan Rivet
> > On Tue, Mar 28, 2017 at 01:20:00PM +0100, Bruce Richardson wrote:
> > >On Tue, Mar 28, 2017 at 02:01:29PM +0200, Gaetan Rivet wrote:
> > >> Expects all devices to be explicitly defined before being probed.
> > >>
> > >> The blacklist mode can be prone to errors, coaxing users in capturing
> > >> devices that could be used for management or otherwise.
> > >> The whitelist mode offers users more control and highlight mistakes by
> > >> making them visible on the command line.
> > >>
> > >> This is more useful to have a clear idea of the state of the system used,
> > >> which is better in the context of standalone / headless applications.
> > >>
> > >> Using the -b option will revert to the original behavior.
> > >>
> > >> Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
> > >> ---
> > >> v2: justify this default behavior evolution.
> > >> ---
> > >
> > >I don't have major objections to this patch, though it does make it
> > >mandatory to use port parameters where before it was not. The one
> > >suggestion I will make is that, if we take this approach, we should
> > >probably add a --wl-all (whitelist-all) flag to go back to having all
> > >ports automatically bound, if so desired.
> > >
> > 
> > Are there use cases where the blacklist mode would be used without
> > blacklisting any device? The current -b option is almost enough for the
> > same level of functionality.
> > 
> > If there is an actual need to a full PCI probe, adding this option is
> > certainly possible. I was thinking otherwise of allowing "all" as an
> > argument to -w, which would have our users using -wall or -w=all, which
> > seems clear enough.
> 
> 
> If I understand correctly an app that runs without any port parameters to EAL would now fail to find any ports?
> 
> That would result in;
> - testing frameworks (DTS, fd.io perf lab, customers, etc) would fail if not specifying ports
> - beginners just running ./app/testpmd would need to specify the "magic" -w-all
> - confusion about why previously working DPDK apps are now failing due to not finding any devices
> 
> I'm not totally opposed, but we should consider carefully what impacts this change will have across the whole DPDK ecosystem, and if the change is worth it. If decided that "Yes its worth it", we would need to communicate this change very clearly. All documentation regarding running any DPDK app would need to be updated as part of this change.
> 
> Personally I don't see the large benefit this patch brings, but more of a disturbance in the DPDK; I'm open to be convinced otherwise.

I agree it is much more a disturbance to change the default behaviour.
Both options -b/-w are already available for people who really care.

Anyway, the default behaviour should be an application policy.
One day, we will have to make all these command line magics optional,
and rely on the application implementation.


More information about the dev mailing list