summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchenko@solarflare.com>2019-09-12 17:42:12 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-09-20 10:19:42 +0200
commit78402e16ec08db79a2e380466ff41dd939541265 (patch)
treed1018be43b620873773b960836303186dcc55e1f /app
parent2c0784eb8872d86c51d6af15b8eb0fe81cdd86bd (diff)
downloaddpdk-78402e16ec08db79a2e380466ff41dd939541265.zip
dpdk-78402e16ec08db79a2e380466ff41dd939541265.tar.gz
dpdk-78402e16ec08db79a2e380466ff41dd939541265.tar.xz
ethdev: remove redundant device info cleanup before get
rte_eth_dev_info_get() always fills in device information memory with zeros on entry. Fixes: b6719879855d ("ethdev: avoid getting uninitialized info for bad port") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/test-pmd/cmdline.c4
-rw-r--r--app/test-pmd/config.c2
2 files changed, 0 insertions, 6 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b6bc34b..e4dda93 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2319,7 +2319,6 @@ cmd_config_rss_hash_key_parsed(void *parsed_result,
uint8_t hash_key_size;
uint32_t key_len;
- memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(res->port_id, &dev_info);
if (dev_info.hash_key_size > 0 &&
dev_info.hash_key_size <= sizeof(hash_key))
@@ -2852,7 +2851,6 @@ cmd_set_rss_reta_parsed(void *parsed_result,
struct rte_eth_rss_reta_entry64 reta_conf[8];
struct cmd_config_rss_reta *res = parsed_result;
- memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(res->port_id, &dev_info);
if (dev_info.reta_size == 0) {
printf("Redirection table size is 0 which is "
@@ -2972,7 +2970,6 @@ cmd_showport_reta_parsed(void *parsed_result,
struct rte_eth_dev_info dev_info;
uint16_t max_reta_size;
- memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(res->port_id, &dev_info);
max_reta_size = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512);
if (res->size == 0 || res->size > max_reta_size) {
@@ -11091,7 +11088,6 @@ cmd_flow_director_filter_parsed(void *parsed_result,
else if (!strncmp(res->pf_vf, "vf", 2)) {
struct rte_eth_dev_info dev_info;
- memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(res->port_id, &dev_info);
errno = 0;
vf_id = strtoul(res->pf_vf + 2, &end, 10);
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1a5a5c1..523b3d3 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -478,7 +478,6 @@ port_infos_display(portid_t port_id)
}
port = &ports[port_id];
rte_eth_link_get_nowait(port_id, &link);
- memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(port_id, &dev_info);
printf("\n%s Infos for port %-2d %s\n",
info_border, port_id, info_border);
@@ -1623,7 +1622,6 @@ ring_rx_descriptor_display(const struct rte_memzone *ring_mz,
#ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC
struct rte_eth_dev_info dev_info;
- memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(port_id, &dev_info);
if (strstr(dev_info.driver_name, "i40e") != NULL) {
/* 32 bytes RX descriptor, i40e only */