From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <olivier.matz@6wind.com>
Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50])
 by dpdk.org (Postfix) with ESMTP id 753F0B410
 for <dev@dpdk.org>; Fri, 13 Feb 2015 10:23:16 +0100 (CET)
Received: by mail-wg0-f50.google.com with SMTP id l2so15382408wgh.9
 for <dev@dpdk.org>; Fri, 13 Feb 2015 01:23:16 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references;
 bh=lbn4jyltpNYKf8mf2zTL6mhpN1iU4/C7FJHEEe+9fMo=;
 b=bspIo8xASWqVtZHVvIBVMHFTomwzeV/yNQsDaN4izfB4dHozv4TxMah7xCrAU/1SMp
 VIK9e5nDiSTZ2JroNK8ZhxVhA814e1SaedWpGrT2/LHFffrBP/gxXgwi0Vgtvwk3Z4qA
 q3Fqluad6R2LSLj0WzbI4tRXk7RRNrpdFJ5rTwaoNJumAhgceOeeXsFWHkZ79fPIarYd
 L8owde6lGhNX05y4IU8sFFZbY6zDnyriK/+919Ot3vKMmjU7CEiRA695/8iTBel3sGh8
 Ub5OU3qARvlz8BAv97dGcm02Fa2BNCyrJAYobUsi4Rx05OkAQ5KTAru9XbTwpoVrAtGZ
 pbYQ==
X-Gm-Message-State: ALoCoQm6XH9vT/y5ksVYahAsGwyVLIjVwo6S77Mz1chVUCn4KQjmm+Cti0KNhfpKrouoqfc6JrhF
X-Received: by 10.180.206.195 with SMTP id lq3mr13980878wic.73.1423819396370; 
 Fri, 13 Feb 2015 01:23:16 -0800 (PST)
Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237])
 by mx.google.com with ESMTPSA id
 a5sm2100153wib.20.2015.02.13.01.23.15
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Fri, 13 Feb 2015 01:23:16 -0800 (PST)
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Date: Fri, 13 Feb 2015 10:22:51 +0100
Message-Id: <1423819371-24222-21-git-send-email-olivier.matz@6wind.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <1423819371-24222-1-git-send-email-olivier.matz@6wind.com>
References: <1423041925-26956-1-git-send-email-olivier.matz@6wind.com>
 <1423819371-24222-1-git-send-email-olivier.matz@6wind.com>
Subject: [dpdk-dev] [PATCH v3 20/20] i40e: add debug logs for tx context
	descriptors
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Feb 2015 09:23:16 -0000

This could be useful to have this values for debug purposes.

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_pmd_i40e/i40e_rxtx.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c
index 546f4d1..c9f1026 100644
--- a/lib/librte_pmd_i40e/i40e_rxtx.c
+++ b/lib/librte_pmd_i40e/i40e_rxtx.c
@@ -1298,6 +1298,18 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			ctx_txd->l2tag2 = rte_cpu_to_le_16(cd_l2tag2);
 			ctx_txd->type_cmd_tso_mss =
 				rte_cpu_to_le_64(cd_type_cmd_tso_mss);
+
+			PMD_TX_LOG(DEBUG, "mbuf: %p, TCD[%u]:\n"
+				"tunneling_params: %#x;\n"
+				"l2tag2: %#hx;\n"
+				"rsvd: %#hx;\n"
+				"type_cmd_tso_mss: %#lx;\n",
+				tx_pkt, tx_id,
+				ctx_txd->tunneling_params,
+				ctx_txd->l2tag2,
+				ctx_txd->rsvd,
+				ctx_txd->type_cmd_tso_mss);
+
 			txe->last_id = tx_last;
 			tx_id = txe->next_id;
 			txe = txn;
@@ -1315,6 +1327,16 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			/* Setup TX Descriptor */
 			slen = m_seg->data_len;
 			buf_dma_addr = RTE_MBUF_DATA_DMA_ADDR(m_seg);
+
+			PMD_TX_LOG(DEBUG, "mbuf: %p, TDD[%u]:\n"
+				"buf_dma_addr: %#"PRIx64";\n"
+				"td_cmd: %#x;\n"
+				"td_offset: %#x;\n"
+				"td_len: %u;\n"
+				"td_tag: %#x;\n",
+				tx_pkt, tx_id, buf_dma_addr,
+				td_cmd, td_offset, slen, td_tag);
+
 			txd->buffer_addr = rte_cpu_to_le_64(buf_dma_addr);
 			txd->cmd_type_offset_bsz = i40e_build_ctob(td_cmd,
 						td_offset, slen, td_tag);
-- 
2.1.4