From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by dpdk.org (Postfix) with ESMTP id DCDB5682E for ; Tue, 26 Aug 2014 16:05:39 +0200 (CEST) Received: by mail-we0-f182.google.com with SMTP id k48so14766419wev.41 for ; Tue, 26 Aug 2014 07:09:40 -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=PqiFfIz8dSwm8LJawja7iV/Ejy7qMWaFacY9l3QWqGA=; b=W3RXrUU9w/94N699cVth9hSFp5ywH15tpEz4Bgz810pmMxYcLjjXLrk81Hzsc3zd15 nVAgrcYId6Mp0LTyib7Y1971iEJp94j460Lh4f90Eld7GqPvZlW4wvVXWf39kAjpxF19 8syZaW0N1bUoR6g6vyOzaYs9E3zAZRv4gXQ6usexzj7fn2eHmWADjpMFwMaxW1/J1+0G FBECeV52xKieZOvb2hs80jxOWyv3U2bSqOXI97Bzpzl1NnAWyOIOOlyN6wzL4z3yatPt hrpgkGtYuO59PNvOeFCQOiwNAyVy2Ip90Qu89cgWoVdTkWOeuRVDjqE8tblR6cviCqIA ESIw== X-Gm-Message-State: ALoCoQnNYF2/gIdCSeFfCkG1kxq2uWbLr5tshbwwXV2XJetBINddZ/fd+KH4SyFN3cNYkJAfwUAv X-Received: by 10.194.77.180 with SMTP id t20mr2538523wjw.118.1409062179927; Tue, 26 Aug 2014 07:09:39 -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 cy9sm12543569wib.18.2014.08.26.07.09.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2014 07:09:39 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Tue, 26 Aug 2014 16:09:17 +0200 Message-Id: <1409062162-19575-8-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409062162-19575-1-git-send-email-david.marchand@6wind.com> References: <1409062162-19575-1-git-send-email-david.marchand@6wind.com> Subject: [dpdk-dev] [PATCH 07/11] 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: Tue, 26 Aug 2014 14:05:40 -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 d592ad6..de3701d 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\n", + 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\n", + 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\n", + 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\n", + rxq->nb_rx_desc, I40E_MAX_RING_DESC, + RTE_PMD_I40E_RX_MAX_BURST); ret = -EINVAL; + } #else ret = -EINVAL; #endif -- 1.7.10.4