[dpdk-dev] [PATCH v4 4/4] app/testpmd: add isolated mode parameter

Thomas Monjalon thomas at monjalon.net
Tue Jun 27 10:28:51 CEST 2017


22/06/2017 03:13, Wu, Jingjing:
> From: Vasily Philipov [mailto:vasilyf at mellanox.com]
> > From: Wu, Jingjing [mailto:jingjing.wu at intel.com]
> > >
> > > > +/*
> > > >   * Avoids to check link status when starting/stopping a port.
> > > >   */
> > > >  uint8_t no_link_check = 0; /* check by default */ @@ -1422,6
> > > > +1427,15 @@ static void eth_event_callback(uint8_t port_id,
> > > >  		if (port->need_reconfig > 0) {
> > > >  			port->need_reconfig = 0;
> > > >
> > > > +			if (isolated_mode) {
> > > > +				int ret = port_flow_isolate(pi, 1);
> > > > +				if (ret) {
> > > > +					printf("Failed to apply isolated"
> > > > +					       " mode on port %d\n", pi);
> > > > +					return -1;
> > > > +				}
> > > > +			}
> > > > +
> > > Should it block the app startup if isolated-mode setting fails?
> > 
> > if isolated mode cannot be enabled on any port, that port cannot be initialized
> > and that causes testpmd to quit, at least it won't go against the user's wishes
> 
> If so, I prefer the isolated_mode to be port's argument but not global one.
> How about to add a command to configure the isolate mode?

There is already a command to configure isolate mode per-port:
	http://dpdk.org/patch/25320
	http://dpdk.org/doc/guides/testpmd_app_ug/testpmd_funcs.html#flow-syntax

I think it does not make sense to replicate this per-port command in
command line parameters.
All the other parameters are global:
	http://dpdk.org/doc/guides/testpmd_app_ug/run_app.html#testpmd-command-line-options
The idea here is to have a global isolate mode with a general option.



More information about the dev mailing list