DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <kevin.traynor@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] ixgbe: change logging for ixgbe tx code path selection
Date: Tue, 27 Oct 2015 11:41:08 +0000	[thread overview]
Message-ID: <1445946068-28183-1-git-send-email-kevin.traynor@intel.com> (raw)

Simple and vector are different tx code paths. If vector
is selected, change logging from:
PMD: ixgbe_set_tx_function(): Using simple tx code path
PMD: ixgbe_set_tx_function(): Vector tx enabled.

to:
PMD: ixgbe_set_tx_function(): Using vector tx code path

or, if simple selected:
PMD: ixgbe_set_tx_function(): Using simple tx code path

The dangling else in the #ifdef makes readability difficult,
so resolving in way that seems most readable.

Signed-off-by: Kevin Traynor <kevin.traynor@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index a598a72..11d7feb 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1963,16 +1963,18 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq)
 	/* Use a simple Tx queue (no offloads, no multi segs) if possible */
 	if (((txq->txq_flags & IXGBE_SIMPLE_FLAGS) == IXGBE_SIMPLE_FLAGS)
 			&& (txq->tx_rs_thresh >= RTE_PMD_IXGBE_TX_MAX_BURST)) {
-		PMD_INIT_LOG(DEBUG, "Using simple tx code path");
 #ifdef RTE_IXGBE_INC_VECTOR
 		if (txq->tx_rs_thresh <= RTE_IXGBE_TX_MAX_FREE_BUF_SZ &&
 				(rte_eal_process_type() != RTE_PROC_PRIMARY ||
 					ixgbe_txq_vec_setup(txq) == 0)) {
-			PMD_INIT_LOG(DEBUG, "Vector tx enabled.");
+			PMD_INIT_LOG(DEBUG, "Using vector tx code path");
 			dev->tx_pkt_burst = ixgbe_xmit_pkts_vec;
 		} else
 #endif
-		dev->tx_pkt_burst = ixgbe_xmit_pkts_simple;
+		{
+			PMD_INIT_LOG(DEBUG, "Using simple tx code path");
+			dev->tx_pkt_burst = ixgbe_xmit_pkts_simple;
+		}
 	} else {
 		PMD_INIT_LOG(DEBUG, "Using full-featured tx code path");
 		PMD_INIT_LOG(DEBUG,
-- 
1.7.4.1

             reply	other threads:[~2015-10-27 11:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 11:41 Kevin Traynor [this message]
2015-10-27 11:50 ` Bruce Richardson
2015-10-27 12:12   ` Ananyev, Konstantin
2015-10-27 12:37     ` Bruce Richardson
2015-10-27 17:31     ` Traynor, Kevin
2015-10-28 10:54       ` Bruce Richardson
2015-10-27 13:56 ` Mcnamara, John

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445946068-28183-1-git-send-email-kevin.traynor@intel.com \
    --to=kevin.traynor@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).