From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f173.google.com (mail-we0-f173.google.com [74.125.82.173]) by dpdk.org (Postfix) with ESMTP id 1BAB8B3A7 for ; Mon, 1 Sep 2014 12:20:42 +0200 (CEST) Received: by mail-we0-f173.google.com with SMTP id t60so5226380wes.32 for ; Mon, 01 Sep 2014 03:25:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Is6/nDviN7/9fbOBaRkSwNIIojxje6N55uFiGDY4UGc=; b=GoBd0l4C0TAdaLnxagS33eZtErV3pOPn7sepYU4yg+Ee+ew0QMS0ETBJeB8BqGV9VD jKBWTG4hNhdaFAfZI/PIMFymUecVmHgR/11vn9L7ADlXpu4wgakYbwqnHyhqmyTajpGX 1/cgicCnYS2nghT2853IMXk2cqjjp3b5t7oGmR+Ftq3J4St1kwHEb9xOb5LeXlYwM2Ew LjNf2G/2iJpcabMvgQWoIXTcUxirTe0AYJNVkTiKIxGikildOILvyiUumKD8tVqIvfyz 8ICwBs3+wHKmAgi2ZnBBmaf5qJO/KBkWQW/rlzSN+RMS961QG0zWWufIj5rK3t37jXNF fjsg== X-Gm-Message-State: ALoCoQnCmWyGm5tX7kElQCM6HzMNXEwnT/02o9OeuHyBBUOwttUX44NWpVFtBQo7rWImo2XrUGTb X-Received: by 10.180.14.169 with SMTP id q9mr20836848wic.19.1409567109018; Mon, 01 Sep 2014 03:25:09 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id lm18sm24287018wic.22.2014.09.01.03.25.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 03:25:08 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Mon, 1 Sep 2014 12:24:34 +0200 Message-Id: <1409567080-27083-12-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> References: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH v2 11/17] i40e: add log messages when rx bulk mode is not usable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 10:20:42 -0000 Signed-off-by: David Marchand --- lib/librte_pmd_i40e/i40e_rxtx.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c index 70fabaa..f410600 100644 --- a/lib/librte_pmd_i40e/i40e_rxtx.c +++ b/lib/librte_pmd_i40e/i40e_rxtx.c @@ -537,15 +537,34 @@ check_rx_burst_bulk_alloc_preconditions(__rte_unused struct i40e_rx_queue *rxq) int ret = 0; #ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC - if (!(rxq->rx_free_thresh >= RTE_PMD_I40E_RX_MAX_BURST)) + if (!(rxq->rx_free_thresh >= RTE_PMD_I40E_RX_MAX_BURST)) { + PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: " + "rxq->rx_free_thresh=%d, " + "RTE_PMD_I40E_RX_MAX_BURST=%d", + rxq->rx_free_thresh, RTE_PMD_I40E_RX_MAX_BURST); ret = -EINVAL; - else if (!(rxq->rx_free_thresh < rxq->nb_rx_desc)) + } else if (!(rxq->rx_free_thresh < rxq->nb_rx_desc)) { + PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: " + "rxq->rx_free_thresh=%d, " + "rxq->nb_rx_desc=%d", + rxq->rx_free_thresh, rxq->nb_rx_desc); ret = -EINVAL; - else if (!(rxq->nb_rx_desc % rxq->rx_free_thresh) == 0) + } else if (!(rxq->nb_rx_desc % rxq->rx_free_thresh) == 0) { + PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: " + "rxq->nb_rx_desc=%d, " + "rxq->rx_free_thresh=%d", + rxq->nb_rx_desc, rxq->rx_free_thresh); ret = -EINVAL; - else if (!(rxq->nb_rx_desc < (I40E_MAX_RING_DESC - - RTE_PMD_I40E_RX_MAX_BURST))) + } else if (!(rxq->nb_rx_desc < (I40E_MAX_RING_DESC - + RTE_PMD_I40E_RX_MAX_BURST))) { + PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: " + "rxq->nb_rx_desc=%d, " + "I40E_MAX_RING_DESC=%d, " + "RTE_PMD_I40E_RX_MAX_BURST=%d", + rxq->nb_rx_desc, I40E_MAX_RING_DESC, + RTE_PMD_I40E_RX_MAX_BURST); ret = -EINVAL; + } #else ret = -EINVAL; #endif -- 1.7.10.4