Skip to content

Instantly share code, notes, and snippets.

@teclator
Last active May 17, 2016 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teclator/c1012f264b96bc39a191a4227320bce4 to your computer and use it in GitHub Desktop.
Save teclator/c1012f264b96bc39a191a4227320bce4 to your computer and use it in GitHub Desktop.

The Problem

Currently in Yast Network Configuration, in case that we have some Netcard with NPAR or SR-IOV capabilities there is no way to know if we are creating a Bonding with two devices with the same physical port. It not makes sense or at least could not produce the expecpted results and the normal case is to combine two devices from different Ethernet ports.

Bonding, Teaming or Link Agregation is a way to combine multiple network connections to increase the throughput, bandwith and to provide redundancy.

cloud_networking_team_mode

NPAR (NIC Partitioning) provides the capability to create multiple native Ethernet interfaces that share a single physical port.

SR-IOV enables a Single Root Function (for example, a single Ethernet port), to appear as multiple, separate, physical device

The Goal

  • Inform the user about the physical port id of a device (a physical port id could be something like: (001018dd97f0).
  • Warn the user that he is creating a Bond with 2 devices sharing the same same Ethernet port but permit him to continue if he decided to.

Current steps for Bonding

In this steps i had configured a bonding in a Host with 2 Etherned ports with 8vfs (SR-IOV). So in the list of devices we will see at least 2 PF's (eth0 and eth1) and 14 VF's from eth2 to eth15. We could ignore br0 and br1 that are two bridges.

In the first step, maybe could be interesting to have the physical_port id in the description of the device as other parameter.

FirstScreen AddBonding

In this step we will see all the interfaces that had been marked as bonding slave or not configured yet. Could be interesting to add the physical_port id at he right of them.

BondSlavesSelection

At this point we could alert the user that he is creating a bond with some interfaces sharing the same physical port id and maybe group them in same way for example eth2..eth8 share this physical_port_id and eth9..15 share this physical port id.

We could do it when the user press Next to save or we could do when he click in the checkbox to add a new one. The problem with the checkbox aproach is that if we have a lot of interfaces if the user wants to add all of them we will be alerting him every time he press in one.

BondSlavesSelected ConfiguredBonding Bond0 Description VF Description

Some issues addressed during reviews

Device Overview

When Lukas saw the Physical Port ID in the Overview dialog, he asked about the different aspect of the element ones with label and text and others as a list. It seems to be intentional having something like physical information with labels and the rest as a list.

deviceoverview deviceoverviewgui

Should we fix/refactor this in some way?

Sorting bonding Slaves

After Share the first screenshots some sugestions were proposed like table sorting and filtering/search of certain device. So i was playing with tables with headers, multiselection, and with check mark inside the table, but i don't want to loose having at the top the current devices part of the bond.

screenshot from 2016-05-11 07-53-31 screenshot from 2016-05-11 07-52-44

Currently Proposal

I added the Physical Port Id of a device to the Overview dialog in case it exists and also at right of the Slave's description in the Bond Slaves or Bridged Devices dialog

screenshot from 2016-05-11 12-46-45

bond_slaves

Regarding to sorting of devices, i now take care of the available devices order, ordering them by device name but adjusting the numeric part so ["eth0", "eth1", "eth5", "eth2", "eth11"] will be sorted as ["eth0", "eth1", "eth2", "eth5", "eth11"]

screenshot from 2016-05-11 07-52-44

Final Implementation

Physical Port Id has been added to the Device Overview and also to the Bond Slave's description in the Bond Slaves selection table.

screenshot from 2016-05-16 09-47-53

screenshot from 2016-05-16 09-46-09

In case the user selected more than one device sharing the same Physical Port ID he will be warned about it when pressed Next.

screenshot from 2016-05-16 09-47-09

screenshot from 2016-05-16 09-49-12

We had some discussions about trying to improve Bond Slaves interface but at the end only sorting of available devices for bonding had been improved. In some cases available devices weren't sorted properly, now they are sorted by device name taking care of numerical parts.

screenshot from 2016-05-16 09-48-28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment