From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id DAAD3A05FE for ; Mon, 18 Mar 2019 18:56:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29405378B; Mon, 18 Mar 2019 18:56:41 +0100 (CET) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by dpdk.org (Postfix) with ESMTP id 49696378B for ; Mon, 18 Mar 2019 18:56:40 +0100 (CET) Received: by mail-pg1-f180.google.com with SMTP id q206so11917017pgq.4 for ; Mon, 18 Mar 2019 10:56:40 -0700 (PDT) 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=ruEaqv/63stpMJhwL1h2URo+9IogSRuCmfJVoXYFPNE=; b=mFxVaXBXNoS+5x5V5LPo80xjbLUwhnbeBdnSqR0i3pAiU++RrQztnviecq21lEP59T hLBrV+X1Vj6YyIJB8rk+ItLjkXUBuEU9KnmW69rEmaCjnfcED234x3vNh97qLunDX24Z NzjGgrrqGk8plU/4gWEiv98vRIhT8xRygAAUpKkB2FSuSsgqkQr8Ktd3qDqBPx6wWpvg taM1OV+1wYUYfxyvGUE4STUqkzvkNJ2vu6B8kjeZ4izCKmeI7W5fJf3oz45kwey9T63F q7WfWD9XISz17gqOMP7Aem4qBh3R6iBflWhCI+9EbvrS3xrNXw5hSHDIt/MKFvjiR8qx pysw== 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=ruEaqv/63stpMJhwL1h2URo+9IogSRuCmfJVoXYFPNE=; b=G1VGUZ5crKWIl2dxeFPC0YCBOjIp8iZQBRDVaTQmKFtLEjHO7hob6PR2ZP6JQZtnYN yTm5d6VgDX2DgxyStwTQlZDQhEgHkkgvKf8L3ZTMWDctGX+WkKx+7lUR4o8VCpONU7pX 3+djDi0EecoK9lHhxfimrYKjQh6KvGrnPIUn74EngQG9K4KILfAu9xtkJrpw/FiFnxip Fx5IVdTuXr84DX8SyoGTSBl02Z1GZDTSPoPtgR1gFCKIWJNDD58JXgug0FGJ820YT59A lvevS+NaRjgVzUJlMJFX/yQ7Q7h6EKicmJRXqv+yOj9u7OKBVfn7CHAMDtSvNClk6xeh gxHA== X-Gm-Message-State: APjAAAWTB612B3+z2AwsvuWUOIR2j4clNCOCYGLc5aDZpuuLzPjhhXXD HWzmWg0p2sm66mL2oPB2l+QhuA== X-Google-Smtp-Source: APXvYqzQOCrmHlmDJ4qW9goVWqFfnPq8Em1cCqTtgxUv2eFiClecQX1dHgRZF/l+Hja/yIHe36ydMw== X-Received: by 2002:a17:902:7103:: with SMTP id a3mr749542pll.214.1552931799372; Mon, 18 Mar 2019 10:56:39 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l184sm19074750pfc.41.2019.03.18.10.56.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 10:56:39 -0700 (PDT) Date: Mon, 18 Mar 2019 10:56:36 -0700 From: Stephen Hemminger To: olegpoly123 Cc: keith.wiles@intel.com, thomas@monjalon.net, dev@dpdk.org, stable@dpdk.org Message-ID: <20190318105636.2a96f3ab@shemminger-XPS-13-9360> In-Reply-To: <20190318165523.4086-1-olegp123@walla.co.il> References: <20190318165523.4086-1-olegp123@walla.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190318175636.ACLO1u7osguemrQ3cQS0DH82dmCVzYNzaQ3DOoeY6z0@z> On Mon, 18 Mar 2019 12:55:23 -0400 olegpoly123 wrote: > 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); Looking at this a little more carefully. 1. Trivial: TAP_LOG() already adds a newline. 2. TAP device should not be silently reducing the number of receive descriptors. 3. TAP device be using IOV_MAX to set rx_descriptor limit. (in dev_info) The ethdev would rx_queue_setup with any request for too large a value.