From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4] testpmd: fix wrong prompt in tx_vlan set command handler Date: Sat, 05 Mar 2016 19:57:47 +0100 Message-ID: <1791028.uxNtJnaPXX@xps13> References: <1454647823-26663-1-git-send-email-xiao.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Wang, Xiao W" Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 813FA2BFE for ; Sat, 5 Mar 2016 19:59:24 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id n186so33130197wmn.1 for ; Sat, 05 Mar 2016 10:59:24 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > When using testpmd, sometimes we forget the right order of port_id and > > vid in "tx_vlan set (port_id) vlan_id[, vlan_id_outer]\n" command, and > > input "tx_vlan set 51 0", we'll get a strange prompt saying "Error, as > > QinQ has been enabled.". > > > > In cmd_tx_vlan_set_parsed function, the first thing we do is checking > > the port's vlan_offload capability, rather than checking validity of the > > port_id, therefore if it's an invalid port_id we'll get the above wrong > > message. We should always make sure that we get a valid port_id before > > we do other things. > > > > It's the similar issue for cmd_tx_vlan_set_qinq_parsed function. > > > > Fixes: 92ebda07ee58 ("app/testpmd: add qinq stripping and insertion") > > > > Signed-off-by: Wang Xiao W > > Acked-by: Pablo de Lara Applied, thanks