[PATCH 0/2 V2] add DCB support to NetworkManager



This patchset is to add DCB support to NetworkManager.
Its function is like dcbtool, and it will communicate with lldpad through
liblldp_clif shared library.

This patchset is on top of commit c3b29cec713f(ip6: only change ra_flags with
device_set_ra_flags()).

1 DCB ifcfg example

TYPE=Ethernet
DEVICE=eth0
HWADDR=00:11:22:33:44:ee
BOOTPROTO=none
IPADDR=1.2.3.4
PREFIX=24
GATEWAY=1.1.1.1

# dcb global switch
# use DCB=off to turn it off
DCB=on

# application settings
# It also supports DCB_APP_ISCSI_XXX and DCB_APP_FIP_XXX.
DCB_APP_FCOE=yes
DCB_APP_FCOE_CFG=08
DCB_APP_FCOE_ENABLE=yes
DCB_APP_FCOE_ADVERTISE=yes
DCB_APP_FCOE_WILLING=yes

DCB_APP_ISCSI=yes
DCB_APP_ISCSI_CFG=40
DCB_APP_ISCSI_ENABLE=yes
DCB_APP_ISCSI_ADVERTISE=yes
DCB_APP_ISCSI_WILLING=yes

# priority group settings
DCB_PG_UP2TC=76543210
DCB_PG_PCT=25,0,0,75,0,0,0,0
DCB_PG_ID=0000111f
DCB_PG_UPPCT=25,25,25,25,50,25,25,0
DCB_PG_STRICT=01010101
DCB_PG_ENABLE=yes
DCB_PG_ADVERTISE=yes
DCB_PG_WILLING=yes

# priority flow control settings
DCB_PFC_UP=00010000
DCB_PFC_ENABLE=yes
DCB_PFC_ADVERTISE=yes
DCB_PFC_WILLING=no

NOTE:
1 What forms a minimum valid ifcfg for DCB?
DCB=on

DCB_APP_FCOE=yes
DCB_APP_FCOE_ENABLE=yes
DCB_APP_FCOE_ADVERTISE=yes
DCB_APP_FCOE_WILLING=yes

DCB_PFC_ENABLE=yes
DCB_PFC_ADVERTISE=yes
DCB_PFC_WILLING=yes

2 For application settings, it also supports DCB_APP_ISCSI_XXX and
DCB_APP_FIP_XXX. 

TEST:
I compared the commands (messages that liblldp_clif will send to lldpad) that
are generated by NetworkManager and dcbtool, and tried most combinations,
and can confirm that NetworkManager will generate the same commands with
dcbtool in the same situation.

TODO:
1 DCB ifcfg writer
2 lldpad monitor
If lldpad daemon has not been started, NetworkManager should start it, and
postpone activation of DCB capable interface. 
3 test it on real hardware
I will test the whole patchset with real hardware (FCoE and iSCSI).

Changelog:
V2: make it accept more than one application settings,
store app settings with GSList.

Weiping Pan (2):
  ifcfg-rh: add ifcfg-dcb parser
  DCB: generate commands and send them to lldpad

 configure.ac                                       |   17 +
 docs/api/generate-settings-spec.c                  |    2 +
 docs/libnm-util/libnm-util-docs.sgml               |    1 +
 include/nm-dbus-glib-types.h                       |    2 +
 libnm-util/Makefile.am                             |    2 +
 libnm-util/libnm-util.ver                          |   26 +
 libnm-util/nm-connection.c                         |   24 +-
 libnm-util/nm-connection.h                         |    2 +
 libnm-util/nm-setting-dcb.c                        | 1185 ++++++++++++++++++++
 libnm-util/nm-setting-dcb.h                        |  165 +++
 libnm-util/nm-utils.c                              |  191 ++++
 libnm-util/nm-utils.h                              |   10 +
 src/Makefile.am                                    |    1 +
 src/nm-manager.c                                   |   94 ++
 src/settings/plugins/ifcfg-rh/reader.c             |  479 ++++++++-
 .../ifcfg-rh/tests/network-scripts/ifcfg-test-dcb  |   47 +
 .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c         |   43 +
 17 files changed, 2289 insertions(+), 2 deletions(-)
 create mode 100644 libnm-util/nm-setting-dcb.c
 create mode 100644 libnm-util/nm-setting-dcb.h
 create mode 100644 src/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-dcb

-- 
1.7.4.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]