From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 12A991B495; Wed, 9 Jan 2019 15:57:39 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id b11so7957067wmj.1; Wed, 09 Jan 2019 06:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nxM39Jobxe6hZ9/SVjFiSgyh5bwn4p3FrmwwY0WHTOk=; b=Vh6nNHbW4Z88HpD9xiCLQE8iZYSrk5MuxGzyn7/NT6bGPiZ4KtGO4ZZX+FSe4VsoaL TikL2CZ6ptJIa4kAaOFqRPqglslZhgPSQt4TngKsnA7apEpbQaa1H1PkdYZZHKOzbjW8 8XIHlo8WWfcjMzwkFuQTm/rRT0RHMJvSgnkljpL+FY7c8SHO3HLB1DkSm26AP57GvZmD gNSUcf3wVj5aBb8gab2RsPIPrnQU/D2MLWjJh/TGAg6wlUJkSbuej6hsdlSfiKc9Eu5j Wsba3WPI3yigj3BoNDr5PLDPS4Hra9mdINWJ8cFacBRBvJObQE2vaHNMQYCf+0TXb2xP 1wJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nxM39Jobxe6hZ9/SVjFiSgyh5bwn4p3FrmwwY0WHTOk=; b=afYlyGdawE1H7hNZESg0Dt8JoaZiqJCUjcXfZojULc5kxobGU96YvmHZduBv288QlZ c9ol19dzEVCFUvQH3Vliv3Xr0YPy1vTf5HG5b2emrJV4mAGP7mZAnejb1bMmtGmFt+G1 IaBIsmqHio9ssrD+VNYrUAFAght7N5eYUNMry0LGONyXfxmOEy+lazKGcEFccRqTWL3j bDanndl3Du6Yfx/DI7qfr6+x2xsqyee9/zDUmI9L2MmdYSRKuKLJz0/nVrSm13m1M+7Q E5QBCBhROSGqaOOzVXMMX6UHD1W4Sn85WlQsFDeA04Kn0zjltuemsKE33h4kxOwXxDjn GaJA== X-Gm-Message-State: AJcUukcW7oNwYegX8N1y4mu7tHyRRmyUmNSm3YMnr08ZSEcWr2YWx683 0Yu9tY+kawGZP0DxewrJjFEsDqdd7Qj5aA== X-Google-Smtp-Source: ALg8bN63nTST5CHKfxpO+CjiZUMXVe+h/cYKpwoGKCFDlomSFqMKXLl3pSA63yIMeY8aCSN0sKcVpw== X-Received: by 2002:a1c:864f:: with SMTP id i76mr5878067wmd.83.1547045858298; Wed, 09 Jan 2019 06:57:38 -0800 (PST) Received: from herc.netio.cloud ([212.199.245.54]) by smtp.gmail.com with ESMTPSA id o4sm51256703wrq.66.2019.01.09.06.57.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 06:57:37 -0800 (PST) From: Rami Rosen To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com, yuanhan.liu@linux.intel.com, stable@dpdk.org, Rami Rosen Date: Wed, 9 Jan 2019 16:57:30 +0200 Message-Id: <1547045850-121102-1-git-send-email-ramirose@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] examples/vhost: remove unnecessary method and constant X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 14:57:39 -0000 This cleanup patch removes a method and a constant which are now unnecessary in the VHOST sample applicaiopn, namely the validate_num_devices() method and the MAX_DEVICES constant. Fixes: 56fe86f8dcaf ("examples/vhost: embed statistics into device structure") Cc: stable@dpdk.org Signed-off-by: Rami Rosen --- examples/vhost/main.c | 22 ---------------------- 1 file changed, 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 @@ struct mbuf_table { } /* - * 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 @@ struct mbuf_table { 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) -- 1.8.3.1