net/null: remove redundant check

There is no need to check if the argument exist or not,
`rte_kvargs_process` returns success if the argument is not provided at
all.

Fixes: c743e50c475f ("null: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Ferruh Yigit 2020-03-02 17:36:42 +00:00
parent 62a667f386
commit c21a276bd8

View File

@ -610,16 +610,12 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
if (kvlist == NULL)
return -1;
if (rte_kvargs_count(kvlist, ETH_NULL_PACKET_SIZE_ARG) == 1) {
ret = rte_kvargs_process(kvlist,
ETH_NULL_PACKET_SIZE_ARG,
&get_packet_size_arg, &packet_size);
if (ret < 0)
goto free_kvlist;
}
if (rte_kvargs_count(kvlist, ETH_NULL_PACKET_COPY_ARG) == 1) {
ret = rte_kvargs_process(kvlist,
ETH_NULL_PACKET_COPY_ARG,
@ -627,7 +623,6 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
if (ret < 0)
goto free_kvlist;
}
}
PMD_LOG(INFO, "Configure pmd_null: packet size is %d, "
"packet copy is %s", packet_size,