From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 2A05C5F41 for ; Tue, 27 Jan 2015 11:33:47 +0100 (CET) Received: by mail-wg0-f48.google.com with SMTP id x12so13902053wgg.7 for ; Tue, 27 Jan 2015 02:33:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=dj84KInMnlvOjv5x/dYRYyjmhwaopeUxoCYuzAm+2os=; b=P2yF2stBCYPqaB5BhXK9OPojO6CcxVPQRbM7yahnf6QRT57funjDMwMDh59l5TJXJR wmKRffv4xcQuNjnQSK1OVGcoAcJokU6bdrbxwfHhU7Bh8HnDnswzdnZhD+3BqVgK9Q5V OZs4igplmAf1Issk/UB/xAbFpx8V2lx8/+llJJkzVQR365h2/+uYjw7VZjuQLK2KPxqu uQa0S+yUCvrJSgf98PLOBPEKfRxIPDKL2ATTb9kRhBXfAe5OZu29nKI+Wo5mNCKiVC9m C/ibqNPRTYmheveclrci50vD32dAAdoLFZlZStnvhs9fX9n4JyYq6Pk5W5wXkdct1pCt 7gYA== X-Gm-Message-State: ALoCoQmTbZ6n3UpaGngpPhQamW2apqt+BAzTAQYmmcdwWZSUr5GpCiWUG+ANVttQmJ3uQ58pb0OU X-Received: by 10.180.81.169 with SMTP id b9mr4501393wiy.41.1422354826914; Tue, 27 Jan 2015 02:33:46 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id z6sm1573249wix.20.2015.01.27.02.33.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jan 2015 02:33:45 -0800 (PST) From: Thomas Monjalon To: Michal Jastrzebski Date: Tue, 27 Jan 2015 11:33:20 +0100 Message-ID: <3441479.cVrRmaIGdi@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.18.2-2-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <1422009831-11092-1-git-send-email-michalx.k.jastrzebski@intel.com> References: <1422009831-11092-1-git-send-email-michalx.k.jastrzebski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] testpmd: check return value of rte_eth_dev_vlan_filter() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 10:33:47 -0000 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