app/testpmd: fix Rx offload search

There is an error in function search_rx_offload(),
it will break when get unexpected return value from function
rte_eth_dev_rx_offload_name(), but rte_eth_dev_rx_offload_name()
will return some unexpected value indeed.

Fixes: c73a907187 ("app/testpmd: add commands to test new offload API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
This commit is contained in:
Wei Zhao 2018-11-07 14:14:29 +08:00 committed by Ferruh Yigit
parent a5e7c52dac
commit 054075ea90

View File

@ -17805,10 +17805,7 @@ search_rx_offload(const char *name)
if (!strcasecmp(single_name, name)) {
found = 1;
break;
} else if (!strcasecmp(single_name, "UNKNOWN"))
break;
else if (single_name == NULL)
break;
}
single_offload <<= 1;
}