[v4,58/58] net/txgbe: introduce log type in the driver documentation

Message ID 20201019085415.82207-59-jiawenwu@trustnetic.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net: txgbe PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing fail Testing issues
ci/iol-broadcom-Functional fail Functional Testing issues
ci/Intel-compilation fail Compilation issues

Commit Message

Jiawen Wu Oct. 19, 2020, 8:54 a.m. UTC
  Introduce available logging types, add txgbe PMD in release note.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 doc/guides/nics/txgbe.rst              | 44 +++++++++++++++++++++++++-
 doc/guides/rel_notes/release_20_11.rst |  6 ++++
 drivers/net/txgbe/txgbe_rxtx.c         |  6 ----
 drivers/net/txgbe/txgbe_rxtx.h         |  4 ---
 4 files changed, 49 insertions(+), 11 deletions(-)
  

Comments

Ferruh Yigit Oct. 26, 2020, 2:55 p.m. UTC | #1
On 10/19/2020 9:54 AM, Jiawen Wu wrote:
> Introduce available logging types, add txgbe PMD in release note.
> 

This patch does a few things, adds some documentation and removes some unsued 
macros, again like previous patch expectation was to distribute these changes 
into the patches that introduce these at first place, instead of adding macro 
first and remove it now.

I have distributed this patch to the relevant commits while merging.
  

Patch

diff --git a/doc/guides/nics/txgbe.rst b/doc/guides/nics/txgbe.rst
index 76da3d859..cd293698b 100644
--- a/doc/guides/nics/txgbe.rst
+++ b/doc/guides/nics/txgbe.rst
@@ -38,6 +38,47 @@  Prerequisites
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
 
+Pre-Installation Configuration
+------------------------------
+
+Build Options
+~~~~~~~~~~~~~
+
+The following build-time options may be enabled on build time using.
+
+``-Dc_args=`` meson argument (e.g. ``-Dc_args=-DRTE_LIBRTE_TXGBE_DEBUG_RX``).
+
+Please note that enabling debugging options may affect system performance.
+
+- ``RTE_LIBRTE_TXGBE_DEBUG_RX`` (undefined by default)
+
+  Toggle display of receive fast path run-time messages.
+
+- ``RTE_LIBRTE_TXGBE_DEBUG_TX`` (undefined by default)
+
+  Toggle display of transmit fast path run-time messages.
+
+- ``RTE_LIBRTE_TXGBE_DEBUG_TX_FREE`` (undefined by default)
+
+  Toggle display of transmit descriptor clean messages.
+
+Dynamic Logging Parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+One may leverage EAL option "--log-level" to change default levels
+for the log types supported by the driver. The option is used with
+an argument typically consisting of two parts separated by a colon.
+
+TXGBE PMD provides the following log types available for control:
+
+- ``pmd.net.txgbe.driver`` (default level is **notice**)
+
+  Affects driver-wide messages unrelated to any particular devices.
+
+- ``pmd.net.txgbe.init`` (default level is **notice**)
+
+  Extra logging of the messages during PMD initialization.
+
 Driver compilation and testing
 ------------------------------
 
@@ -46,5 +87,6 @@  for details.
 
 Limitations or Known issues
 ---------------------------
+
 Build with ICC is not supported yet.
-X86-32, Power8, ARMv7 and BSD are not supported yet.
+Power8, ARMv7 and BSD are not supported yet.
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 25ea3c20b..d28ccb611 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -160,6 +160,12 @@  New Features
   * Added SR-IOV PF support
   * Added Alveo SN1000 SmartNICs (EF100 architecture) support
 
+* **Added Wangxun txgbe PMD.**
+
+  Added a new PMD driver for Wangxun 10 Gigabit Ethernet NICs.
+
+  See the :doc:`../nics/txgbe` for more details.
+
 * **Updated Virtio driver.**
 
   * Added support for Vhost-vDPA backend to Virtio-user PMD.
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index c78a8b6b0..a0f504336 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -62,16 +62,10 @@  static const u64 TXGBE_TX_OFFLOAD_MASK = (PKT_TX_IP_CKSUM |
 #define TXGBE_TX_OFFLOAD_NOTSUP_MASK \
 		(PKT_TX_OFFLOAD_MASK ^ TXGBE_TX_OFFLOAD_MASK)
 
-#define RTE_PMD_USE_PREFETCH
-
-#ifdef RTE_PMD_USE_PREFETCH
 /*
  * Prefetch a cache line into all cache levels.
  */
 #define rte_txgbe_prefetch(p)   rte_prefetch0(p)
-#else
-#define rte_txgbe_prefetch(p)   do {} while (0)
-#endif
 
 static int
 txgbe_is_vf(struct rte_eth_dev *dev)
diff --git a/drivers/net/txgbe/txgbe_rxtx.h b/drivers/net/txgbe/txgbe_rxtx.h
index 120c2547f..6e0e86ce5 100644
--- a/drivers/net/txgbe/txgbe_rxtx.h
+++ b/drivers/net/txgbe/txgbe_rxtx.h
@@ -239,11 +239,7 @@  struct txgbe_tx_desc {
 #define RX_RING_SZ ((TXGBE_RING_DESC_MAX + RTE_PMD_TXGBE_RX_MAX_BURST) * \
 		    sizeof(struct txgbe_rx_desc))
 
-#ifdef RTE_PMD_PACKET_PREFETCH
 #define rte_packet_prefetch(p)  rte_prefetch1(p)
-#else
-#define rte_packet_prefetch(p)  do {} while (0)
-#endif
 
 #define RTE_TXGBE_REGISTER_POLL_WAIT_10_MS  10
 #define RTE_TXGBE_WAIT_100_US               100