numam-dpdk/app/test-pmd
Wang Xiao W 6a34f91690 app/testpmd: fix error message when setting Tx VLAN
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: 92ebda07ee ("app/testpmd: add qinq stripping and insertion")

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-03-05 19:57:29 +01:00
..
cmdline.c app/testpmd: fix error message when setting Tx VLAN 2016-03-05 19:57:29 +01:00
config.c app/testpmd: fix error message when setting Tx VLAN 2016-03-05 19:57:29 +01:00
csumonly.c app/testpmd: add ability to split outgoing packets 2015-11-12 00:22:26 +01:00
flowgen.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
icmpecho.c eal: add and use unaligned integer types 2015-06-24 12:00:41 +02:00
ieee1588fwd.c app/testpmd: swap MAC in IEEE1588 forwarding 2015-12-10 22:20:08 +01:00
iofwd.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
macfwd-retry.c tailq: remove unneeded inclusions 2015-03-10 11:47:46 +01:00
macfwd.c app/testpmd: add qinq stripping and insertion 2015-07-07 16:42:11 +02:00
macswap.c app/testpmd: add qinq stripping and insertion 2015-07-07 16:42:11 +02:00
Makefile drivers: create new directory 2015-05-22 15:51:38 +02:00
mempool_anon.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
mempool_osdep.h remove trailing whitespaces 2014-06-11 00:29:34 +02:00
parameters.c app/testpmd: add parameters for new flow director modes 2015-10-29 00:02:17 +01:00
rxonly.c mbuf: remove packet type from offload flags 2015-09-03 19:22:48 +02:00
testpmd.c app/testpmd: handle SIGINT and SIGTERM 2016-01-27 17:06:51 +01:00
testpmd.h remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00
txonly.c remove extra parentheses in return statement 2016-02-10 15:47:50 +01:00