From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <"oleg@opolyakov"@northforgeinc.com> Received: from ubuntu64.mapleworks.com (unknown [207.107.126.114]) by dpdk.org (Postfix) with ESMTP id 6D73E2C28; Fri, 8 Mar 2019 16:55:58 +0100 (CET) Received: by ubuntu64.mapleworks.com (Postfix, from userid 1001) id DDE7D3A00AA; Fri, 8 Mar 2019 10:55:57 -0500 (EST) From: olegpoly123 To: keith.wiles@intel.com, thomas@monjalon.net Cc: dev@dpdk.org, olegpoly123 , stable@dpdk.org, Oeg Polyakov Date: Fri, 8 Mar 2019 10:55:47 -0500 Message-Id: <20190308155547.1695-2-olegp123@walla.co.il> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190308155547.1695-1-olegp123@walla.co.il> References: <20190308155547.1695-1-olegp123@walla.co.il> X-Mailman-Approved-At: Fri, 08 Mar 2019 17:59:29 +0100 Subject: [dpdk-dev] [PATCH v2 2/2] Define macro for iov_max default value 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: Fri, 08 Mar 2019 15:55:58 -0000 Cc: stable@dpdk.org Signed-off-by: Oeg Polyakov --- drivers/net/tap/rte_eth_tap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index cd48b2b2a..e7da73509 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -68,6 +68,8 @@ /* IPC key for queue fds sync */ #define TAP_MP_KEY "tap_mp_sync_queues" +#define TAP_IOV_DEFAULT_MAX 1024 + static int tap_devices_count; static struct rte_vdev_driver pmd_tap_drv; static struct rte_vdev_driver pmd_tun_drv; @@ -1328,8 +1330,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, long iov_max = sysconf(_SC_IOV_MAX); if (iov_max <= 0) { TAP_LOG(WARNING, - "_SC_IOV_MAX is not defined. Using 1024 as default\n"); - iov_max = 1024; + "_SC_IOV_MAX is not defined. Using %d as default\n", TAP_IOV_DEFAULT_MAX); + iov_max = TAP_IOV_DEFAULT_MAX; } uint16_t nb_desc = RTE_MIN(nb_rx_desc, iov_max - 1); struct iovec (*iovecs)[nb_desc + 1]; -- 2.14.1