[dpdk-dev] [PATCH] testpmd: check return value of rte_eth_dev_vlan_filter()

Jastrzebski, MichalX K michalx.k.jastrzebski at intel.com
Tue Jan 27 16:58:11 CET 2015


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, January 27, 2015 11:33 AM
> To: Jastrzebski, MichalX K
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] testpmd: check return value of
> rte_eth_dev_vlan_filter()
> 
> Hi Michal,
> 
> 2015-01-23 11:43, Michal Jastrzebski:
> > This patch modifies testpmd behavior when setting:
> > rx_vlan add all vf_port (enabling all vlanids
> > to be passed thru rx filter on VF).
> > Rx_vlan_all_filter_set() function,
> > checks if the next vlanid can be enabled by the driver.
> > Number of vlanids is limited by the NIC and thus the NIC
> > do not allow to enable more vlanids than it can allocate
> > in VFTA table.
> >
> > Signed-off by: Michal Jastrzebski <michalx.k.jastrzebski at intel.com>
> 
> checkpatch is not happy because you forgot an hyphen.
> 
> > @@ -1667,8 +1668,9 @@ rx_vlan_all_filter_set(portid_t port_id, int on)
> >
> >  	if (port_id_is_invalid(port_id))
> >  		return;
> > -	for (vlan_id = 0; vlan_id < 4096; vlan_id++)
> > -		rx_vft_set(port_id, vlan_id, on);
> > +	for (vlan_id = 0; vlan_id < 4096; vlan_id++)	{
> > +		if ( rx_vft_set(port_id, vlan_id, on) ) break;
> 
> Again, checkpatch does not like this line.
> 
Hi Thomas,
Thanks for pointed it out. I have already fixed all checkpatch.pl errors.
I will send v2 patch for this,
> And more importantly, you make it clear that sometimes we cannot enable
> all
> vlans and return no error.
Should I return this error somewhere? Isn't just printing the error best option here?
> So I wonder how is it documented in the testpmd help?
I can add a note in testpmd_funcs.rst file or I can place some info in .help_str?
What do you mean "testpmd help"?
> 
> Thanks
> --
> Thomas


More information about the dev mailing list