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 38A40A05FE for ; Mon, 18 Mar 2019 18:56:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13EB24C9F; Mon, 18 Mar 2019 18:56:43 +0100 (CET) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by dpdk.org (Postfix) with ESMTP id 46F282C54 for ; Mon, 18 Mar 2019 18:56:40 +0100 (CET) Received: by mail-pg1-f171.google.com with SMTP id r124so11928835pgr.3 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=KFhUU78Adn02ZrtY4m6PaGYhO6JTxsOodtoz2ajFj7VLu5+j53HOIiApTq+98cZwdF 6Pna7sRO9W9DRSQOU70cc2alipsyEsZI2nfR+w2XH397xiwZFsawodl1CIq8uByXU9nR xsP6P8gaypu8VN9mml44Z2dspoiDYjPwUKa5pT2Rb9gWDhRegXPfylBwgpAmZg88diZq E5JOVJ5Mqg9o8pILDbMV8fQAzbvX9BblKQrJchGq4m4re22Ed6RmZ1ygBLkPRVqgxHFv LDzVF8jJJPyJEB4HCnsqVXDXV6rFFLUaRKSP+CwDjEiQJ759JV/v0vWYLMNSxaxG2eGM GC8Q== X-Gm-Message-State: APjAAAXLV+/dgVE1GwvSSKPJjs9zN06nn4TMd4kOfKd50fEP5+wbz7Np e08mkpw8aGMgKidqKCqdBegDyA== 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=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v6] 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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.