From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 7B071F94 for ; Sat, 9 Mar 2019 01:50:35 +0100 (CET) Received: by mail-pg1-f196.google.com with SMTP id k11so14443182pgb.8 for ; Fri, 08 Mar 2019 16:50:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iAaQoC6ASsmzbsCxgWi5M+x2jiJed1Wnq0DUhL4HCZM=; b=hBEX3ujiRTCzNT7XDXVKLd6F9DcgKv3fPW8rNR7X/CdjUYAsXw/hAaqv4tsh4MRexB 0E4K/WF8Zz2AxBG6XyvsAwiUOhoQCDzuMwZ6kCUVUWgWMJz3hIn0Nw++2tyveVhU9aHP 36KevADD867VkaDB6vNYC281zlh9sIhbu0rgaEAzSCTF/+kEx8wmhsWheJ/m4tEhGU91 h5SFpjG5z36hBicBLwfa7Xf4TyvKLdXuZA+4fKtbWUvi+u5ZDkUM02yB+K2e3DAohBnm db5EM3dEa0bl5idNiw+8fXt3JVOVuvk8QDAOIUHypcjh/2AHM9XAqacS9gM7Ocw9XcQy KWGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iAaQoC6ASsmzbsCxgWi5M+x2jiJed1Wnq0DUhL4HCZM=; b=WU8rjgM/O986MgfBs7XGMAHb9ibSdC3Rl07j8rTFBNC/XA/jfmpOK1fLr2CIdG4xGH eaqTQNFQuQt6IxPbIffnEPzIxpBpuS6YaUO7iE3pVlHwcT8p1MOErnyk1N4ncuIOu2Qh fVdSttHA505f4OdjL/u1evlTQI5+pGn3dyspKioHUBZqAglNVqaCZf3svJ2d4L9kyxms 0/Wssig8C3DbOFjqNRPZkc3yHULDD/JQGpoqz3iyV75GKkzaXjNiVixoGuqotTViPrIw Apgu5lsz75clztvG4B0tgfsRIGZOT6pcqo2ftaoTHQ283KmnmjrSbB4Go8VgNzmSjZPS oSjg== X-Gm-Message-State: APjAAAV5Befki1+AzyT80e/dvQkra/X/DTgk9YVQ6cRBKue8imtUTlQ3 mKSzwCrX8RPAZeYY2hai45Hdzg== X-Google-Smtp-Source: APXvYqwUYAzYOjvqiUgCSjGLRQ4MEg/hKv/CG66PFiUKxL792BqlMxxYoJMVXZug4N9CrPO13YEiPQ== X-Received: by 2002:a63:1014:: with SMTP id f20mr19581350pgl.293.1552092634578; Fri, 08 Mar 2019 16:50:34 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j24sm11579364pgl.58.2019.03.08.16.50.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Mar 2019 16:50:34 -0800 (PST) Date: Fri, 8 Mar 2019 13:51:53 -0800 From: Stephen Hemminger To: olegpoly123 Cc: keith.wiles@intel.com, thomas@monjalon.net, dev@dpdk.org, stable@dpdk.org Message-ID: <20190308135140.431772b6@shemminger-XPS-13-9360> In-Reply-To: <20190308190658.6313-1-olegp123@walla.co.il> References: <20190308190658.6313-1-olegp123@walla.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] net/tap: fix missing _SC_IOV_MAX 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: Sat, 09 Mar 2019 00:50:35 -0000 On Fri, 8 Mar 2019 14:06:58 -0500 olegpoly123 wrote: > struct rx_queue *rxq = &internals->rxq[rx_queue_id]; > struct rte_mbuf **tmp = &rxq->pool; > long iov_max = sysconf(_SC_IOV_MAX); > + > + if (iov_max <= 0) { > + TAP_LOG(WARNING, > + "_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]; Don't mix code and declarations.