diff options
author | Rami Rosen <ramirose@gmail.com> | 2019-01-09 16:57:30 +0200 |
---|---|---|
committer | Ferruh Yigit <ferruh.yigit@intel.com> | 2019-01-14 17:44:29 +0100 |
commit | 352cf50d9a9d95ca8207ce526d4fa7cd9894dba6 (patch) | |
tree | 8c5fd03675abde13d8a7eda99f177e052c1ab3fa /examples | |
parent | f9204d8a23c3312e2939170e6d70c7b5ef7e42d9 (diff) | |
download | dpdk-next-eventdev-352cf50d9a9d95ca8207ce526d4fa7cd9894dba6.zip dpdk-next-eventdev-352cf50d9a9d95ca8207ce526d4fa7cd9894dba6.tar.gz dpdk-next-eventdev-352cf50d9a9d95ca8207ce526d4fa7cd9894dba6.tar.xz |
examples/vhost: remove unnecessary method and constant
This cleanup patch removes a method and a constant which
are now unnecessary in the VHOST sample application, namely
the validate_num_devices() method and the MAX_DEVICES
constant.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/vhost/main.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/examples/vhost/main.c b/examples/vhost/main.c index dc9ea10..f722a13 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -55,9 +55,6 @@ #define INVALID_PORT_ID 0xFF -/* Max number of devices. Limited by vmdq. */ -#define MAX_DEVICES 64 - /* Maximum long option length for option parsing. */ #define MAX_LONG_OPT_SZ 64 @@ -215,21 +212,6 @@ get_eth_conf(struct rte_eth_conf *eth_conf, uint32_t num_devices) } /* - * Validate the device number according to the max pool number gotten form - * dev_info. If the device number is invalid, give the error message and - * return -1. Each device must have its own pool. - */ -static inline int -validate_num_devices(uint32_t max_nb_devices) -{ - if (num_devices > max_nb_devices) { - RTE_LOG(ERR, VHOST_PORT, "invalid number of devices\n"); - return -1; - } - return 0; -} - -/* * Initialises a given port using global settings and with the rx buffers * coming from the mbuf_pool passed as parameter */ @@ -270,10 +252,6 @@ port_init(uint16_t port) tx_rings = (uint16_t)rte_lcore_count(); - retval = validate_num_devices(MAX_DEVICES); - if (retval < 0) - return retval; - /* Get port configuration. */ retval = get_eth_conf(&port_conf, num_devices); if (retval < 0) |