From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] testpmd: check return value of rte_eth_dev_vlan_filter() Date: Tue, 27 Jan 2015 11:33:20 +0100 Message-ID: <3441479.cVrRmaIGdi@xps13> References: <1422009831-11092-1-git-send-email-michalx.k.jastrzebski@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Michal Jastrzebski Return-path: In-Reply-To: <1422009831-11092-1-git-send-email-michalx.k.jastrzebski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 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. And more importantly, you make it clear that sometimes we cannot enable all vlans and return no error. So I wonder how is it documented in the testpmd help? Thanks -- Thomas