dpdk: remove SFP eeprom dump from 'show hardware-interfaces' and 'show hardware-inter... 71/21071/2
authorLijian.Zhang <Lijian.Zhang@arm.com>
Fri, 2 Aug 2019 02:42:48 +0000 (10:42 +0800)
committerDave Barach <openvpp@barachs.net>
Tue, 6 Aug 2019 11:48:37 +0000 (11:48 +0000)
Type: fix

It's time-consuming to execute 'show hardware-interfaces detail' in CSIT script.
'show hardware-interfaces' dumps SFP eeprom, via a software emulated I2C bus.
Currently 'show hardware-interfaces', 'show hardware-interfaces verbose' and
'show hardware-interfaces detail' give exactly the same output,
and they all will dump SFP eeprom.
Will move the SFP eeprom dump to 'show hardware-interfaces detail' only,
and use “show hardware-interfaces verbose” in CSIT script to save time.

Change-Id: I1a6e5a0ca5fce5b4f0b9a6eb4e9dfd76d45b2487
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
src/plugins/dpdk/device/format.c

index 7bba3eb..d57dc34 100644 (file)
@@ -602,8 +602,11 @@ format_dpdk_device (u8 * s, va_list * args)
          vec_free (s2);
        }
 
-      s = format (s, "%Umodule: %U\n", format_white_space, indent + 2,
-                 format_dpdk_device_module_info, xd);
+      if (1 < verbose)
+       {
+         s = format (s, "%Umodule: %U\n", format_white_space, indent + 2,
+                     format_dpdk_device_module_info, xd);
+       }
 
       s = format (s, "%Umax rx packet len: %d\n", format_white_space,
                  indent + 2, di.max_rx_pktlen);