ethtool output lacks supported mode info, causes network test wonkiness.

Bug #1627084 reported by Rod Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Undecided
Rod Smith

Bug Description

Two submissions, both on ARM64 hardware, appear superficially to have passed, but this is only because the ethernet/multi_iperf3_nic_device* tests are not detecting the NIC's maximum speed, and therefore are unable to determine the passing percentage. The submissions are:

* https://certification.canonical.com/hardware/201609-25111/submission/112878/
* https://certification.canonical.com/hardware/201609-25110/submission/112877/

Note that the ethernet/ethertool_check_device3* test IS showing the NIC's speed.

Also (perhaps related, perhaps not), the test output does not show the CPU load imposed by the test, as it should.

Related branches

Rod Smith (rodsmith)
Changed in checkbox-ng:
assignee: nobody → Rod Smith (rodsmith)
Jeff Lane  (bladernr)
affects: checkbox-ng → plainbox-provider-checkbox
Revision history for this message
Jeff Lane  (bladernr) wrote :

 Note that this is how the network script determines the max speed:
def max_speed(self):
        # Parse ethtool data for max speed since /sys/class/net/DEV/speed only
        # reports link speed.

        # Search for things that look like 100baseSX,
        # 40000baseNX, 10000baseT
        try:
            ethinfo = check_output(['ethtool', self.interface],
                                   universal_newlines=True,
                                   stderr=STDOUT).split(' ')
        except FileNotFoundError:
            logging.warning('ethtool not found! Unable to get max speed')
            ethinfo = None
        except CalledProcessError as e:
            logging.error('ethtool returned an error!')
            logging.error(e.output)
            ethinfo = None
        finally:
            expression = '(\\d+)(base)([A-Z]+)'
            regex = re.compile(expression)
            speeds = [0]
            if ethinfo:
                for i in ethinfo:
                    hit = regex.search(i)
                    if hit:
                        speeds.append(int(hit.group(1)))
            return max(speeds)

Also, on those systems, ethtool is not showing the advertised speeds:

Settings for enP2p1s0f2:
 Supported ports: [ ]
 Supported link modes: Not reported
 Supported pause frame use: No
 Supports auto-negotiation: No
 Advertised link modes: Not reported
 Advertised pause frame use: No
 Advertised auto-negotiation: No
 Speed: 10000Mb/s
 Duplex: Full
 Port: FIBRE
 PHYAD: 0
 Transceiver: external
 Auto-negotiation: off
 Current message level: 0x00000000 (0)

 Link detected: yes

and compare to this from an x86 system:

Settings for enP2p1s0f0:
 Supported ports: [ TP ]
 Supported link modes: 1000baseT/Full
                         10000baseT/Full
 Supported pause frame use: Symmetric
 Supports auto-negotiation: Yes
 Advertised link modes: 1000baseT/Full
                         10000baseT/Full
 Advertised pause frame use: No
 Advertised auto-negotiation: Yes
 Speed: 10000Mb/s
 Duplex: Full
 Port: Twisted Pair
 PHYAD: 0
 Transceiver: external
 Auto-negotiation: on
 MDI-X: Unknown
 Current message level: 0x0000000f (15)
          drv probe link timer
 Link detected: yes

So the bug is actually in the output of ethtool, in that there is no evidence of the supported modes in ethtool output.

summary: - ethernet/multi_iperf3_nic_device* tests not detecting NIC speed on some
- systems
+ ethtool output lacks supported mode info, causes network test wonkiness.
Revision history for this message
Jeff Lane  (bladernr) wrote :

One addition, the network test assumes that something with no supported modes listed is a wifi device and assumes no idea of the max speed and doesn't fail on the threshold at that point.

Rod Smith (rodsmith)
Changed in plainbox-provider-checkbox:
status: New → Fix Committed
Changed in plainbox-provider-checkbox:
milestone: none → 0.34.0
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.