From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 8372C2B87 for ; Sat, 9 Mar 2019 01:50:35 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id a3so15325285pff.11 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=XKvPQ3sl/QTLGU58f88XatQbaaElLPeuyiArn9aw+MrKn2kPSgoNl7wL8zihw+SlNC FJXjzzE7Q+1dJmePEXxiYSBpbLxXcM2SiXcX5eg3eIga+wnL04l/x+euAeuQRxNW86P5 FdApvwY4TdtpbipihQ0ARJWWdilfNgRx4cvvUk0MbMrlJq/NWJVmM2PXp3pFhmdziTs0 3zALGxvw1l4FxEuR1ZI48fjda77d0+pm5Te0zWpjATDXhkNXlkuhFCrSROHXqUQYoRUg ZWuYTsvik+cXQkDO6bw2tcMXpJZCZ3GCcocWSROqX0apcHmiKTaKOd9sMHB15cEjUD5d YZKQ== X-Gm-Message-State: APjAAAWe6UOvglRNh5QNw/jZOwQJCZvKbHZ3o1dBXHct0NPo9EpohZR5 QPrBBp8y5Eeak9ZClKvD2GXZYw== 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-stable] [dpdk-dev] [PATCH v4] net/tap: fix missing _SC_IOV_MAX X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches 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.