Virtualization Digest, Vol 60, Issue 17
Subsystems (2)
Hi,
Can someone please point me to where I can find this early version of the IEEE802.1Qbg implementation? When I downloaded the 0.9.38 version of lldpad, it does not have the latest set of code mentioned below. Thanks.
Arpit.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, August 25, 2010 8:42 AM
To: [email protected]
Subject: Virtualization Digest, Vol 60, Issue 17
Send Virtualization mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.linux-foundation.org/mailman/listinfo/virtualization
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific than "Re: Contents of Virtualization digest..."
Today's Topics:
1. [PATCH 01/10] consolidation of MIN and MAX macros in common.h (Jens Osterkamp)
2. implementation of IEEE 802.1Qbg in lldpad (Jens Osterkamp)
3. [PATCH 02/10] implementation of IEEE 802.1Qbg in lldpad, part 1 (Jens Osterkamp)
----------------------------------------------------------------------
Message: 1
Date: Wed, 25 Aug 2010 14:27:33 +0200
From: Jens Osterkamp <[email protected]>
Subject: [PATCH 01/10] consolidation of MIN and MAX macros in common.h
To: [email protected],
[email protected], [email protected]
Cc: [email protected], Jens Osterkamp <[email protected]> Message-ID:
<[email protected]>
This patch consolidates a modified version of the already existing MIN macro in lldpad to include/common.h and add a MAX macro.
--- include/common.h | 14 ++++++++++++++ include/dcb_protocol.h | 4 ---- 2 files changed, 14 insertions(+), 4 deletions(-)
include/common.h +14 -0
@@ -387,4 +387,18 @@ typedef int socklen_t;const char *wpa_ssid_txt (u8 *ssid,size_t ssid_len); +#define MIN (x,y) \ + ({ \ + typeof (x) __x = (x); \ + typeof (y) __y = (y); \ + __x < __y ? __x : __y; \ + }) + +#define MAX (x,y) \ + ({ \ + typeof (x) __x = (x); \ + typeof (y) __y = (y); \ + __x > __y ? __x : __y; \ + }) +#endif /* COMMON_H */
include/dcb_protocol.h +0 -4
@@ -58,10 +58,6 @@ typedef enum {#define DUP_DCBX_TLV_LLINK 0x0020#define TOO_MANY_NGHBRS 0x0040 -//#ifndef min /*todo: change to min() -#define MIN (x, y) ((x) < (y) ? x : y) -//#endif -#define INIT_DCB_OUI {0x00,0x1b,0x21}int add_adapter (char *device_name);
--
1.7.1
------------------------------
Message: 2
Date: Wed, 25 Aug 2010 14:27:32 +0200
From: Jens Osterkamp <[email protected]>
Subject: implementation of IEEE 802.1Qbg in lldpad
To: [email protected],
[email protected], [email protected]
Cc: [email protected]
Message-ID:
<[email protected]>
Hi,
this set of patches contains the initial implementation of the IEEE 802.1Qbg
standard: code for the exchange of EVB TLVs in LLDP frames to negotiate VSI capabalities as well as VDP VSI TLVs between a host with virtual machines and an adjacent switch.
It supports setting the parameters of the TLV exchange from the command line using lldptool.
VDP profiles consisting of mode,mgrid,typeid,typeidversion,instanceid,mac,vlan can be given to lldpad with lldptool or sent to lldpad via netlink messages from the kernel or another program, e.g. libvirt.
VDP profiles are processed through the VDP/VSI and ECP state machines and sent out in ECP frames.
ACK frames are received and processed through ECP and VDP/VSI state machines.
It implements a VDP bridge role for a port together with a lldptool command to switch a port to the bridge role.
The patches have been rebased to lldpad 0.9.38 and still contain code to log low-level protocol activity more verbosely than necessary.
In comparison to the last posted series, several changes have been made:
- all EVB TLV patches have been folded into one
- ECP and VDP implementation now only consists of 3 patches: ECP, VDP and VDP commandline interface
- the protocol specific ecp structure has been moved away from the general port structure
- the non-standard ECP_TX_IDLE state has been removed from the ECP TX state machine which causes ecp frames to be sent out immediately to allow sequence synchronization
- VDP subtype has changed from 0 to 2
- some network byte order in the VSI tlv have been fixed
- vdp config variables are now saved in subsection "vdp" under the interface in lldpad.conf
- some compiler warnings have been fixed
- many other small bug fixes
For more information about lldpad take a look at
http://sourceforge.net/projects/e1000/files/DCB%20Tools/lldpad/
Please review and comment.
Thanks !
Jens
------------------------------
Message: 3
Date: Wed, 25 Aug 2010 14:27:34 +0200
From: Jens Osterkamp <[email protected]>
Subject: [PATCH 02/10] implementation of IEEE 802.1Qbg in lldpad, part
1
To: [email protected],
[email protected], [email protected]
Cc: [email protected], Jens Osterkamp <[email protected]> Message-ID:
<[email protected]>
This patch contains the first part of an initial implementation of the IEEE 802.1Qbg standard: it implements code for the exchange of EVB capabilities between a host with virtual machines and an adjacent switch. For this it adds a new EVB TLV to LLDP.
Exchange of EVB TLV may be enabled or disabled on a per port basis. Information about the information negotiated by the protocol can be queried on the commandline with lldptool.
This patch adds support for querying and setting parameters used in the exchange of EVB TLV messages.
The parameters that can be set are:
- forwarding mode
- host protocol capabilities (RTE, ECP, VDP)
- no. of supported VSIs
- retransmission timer exponent (RTE)
The parameters are implemented as a local policy: all frames received by an adjacent switch are validated against this policy and taken over where appropriate. Negotiated parameters are stored in lldpads config, picked up again and used at the next start.
The patch applies to lldpad 0.9.38 and still contains code to log protocol activity more verbosely than it would be necessary in the final version.
--- Makefile.am | 10 +- include/lldp.h | 19 ++ include/lldp_evb.h | 80 ++++++ include/lldp_evb_clif.h | 51 ++++ include/lldp_evb_cmds.h | 31 +++ include/lldp_tlv.h | 1 + lldp_evb.c | 658 +++++++++++++++++++++++++++++++++++++++++++++++ lldp_evb_clif.c | 226 ++++++++++++++++ lldp_evb_cmds.c | 512 ++++++++++++++++++++++++++++++++++++ lldpad.c | 2 + lldptool.c | 2 + 11 files changed, 1588 insertions(+), 4 deletions(-) create mode 100644 include/lldp_evb.h create mode 100644 include/lldp_evb_clif.h create mode 100644 include/lldp_evb_cmds.h create mode 100644 lldp_evb.c create mode 100644 lldp_evb_clif.c create mode 100644 lldp_evb_cmds.c
Makefile.am +6 -4
@@ -37,7 +37,7 @@ lldpad_include_HEADERS = include/dcb_types.h include/dcbtool.h \ include/dcb_osdep.h include/clif.h include/lldp_dcbx_cmds.h include/common.h \ include/lldpad.h include/os.h include/includes.h include/lldp_mand_cmds.h \ include/clif_msgs.h include/lldp_basman_cmds.h include/lldp_8023_cmds.h \ -include/lldp_med_cmds.h include/lldp_dcbx_cfg.h +include/lldp_med_cmds.h include/lldp_dcbx_cfg.h include/lldp_evb_cmds.h noinst_HEADERS = include/config.h include/ctrl_iface.h \ include/dcb_driver_if_types.h include/dcb_driver_interface.h \
@@ -47,7 +47,7 @@ include/event_iface.h include/messages.h include/parse_cli.h include/version.h \ include/lldptool_cli.h include/list.h \ include/lldp_mand_clif.h include/lldp_basman_clif.h include/lldp_med_clif.h \ include/lldp_8023_clif.h include/lldp_dcbx_clif.h include/lldptool.h \ -include/lldp_rtnl.h +include/lldp_rtnl.h include/lldp_evb_clif.h lldpad_SOURCES = lldpad.c config.c drv_cfg.c ctrl_iface.c event_iface.c eloop.c \ common.c os_unix.c lldp_dcbx_cmds.c log.c lldpad_shm.c \
@@ -62,10 +62,12 @@ lldp_dcbx_cfg.c include/lldp_dcbx_cfg.h \ lldp_util.c include/lldp_util.h \ lldp_mand.c include/lldp_mand.h \ lldp_mand_cmds.c lldp_basman_cmds.c lldp_8023_cmds.c lldp_med_cmds.c \ +lldp_evb_cmds.c \ lldp_tlv.c include/lldp_tlv.h \ lldp_basman.c include/lldp_basman.h \ lldp_med.c include/lldp_med.h \ -lldp_8023.c include/lldp_8023.h +lldp_8023.c include/lldp_8023.h \ +lldp_evb.c include/lldp_evb.h
@@ -74,7 +76,7 @@ $(lldpad_include_HEADERS) $(noinst_HEADERS) lldptool_SOURCES = lldptool.c clif.c lldptool_cmds.c common.c os_unix.c \ lldp_mand_clif.c lldp_basman_clif.c lldp_med_clif.c lldp_8023_clif.c \ -lldp_dcbx_clif.c $(lldpad_include_HEADERS) $(noinst_HEADERS) +lldp_dcbx_clif.c lldp_evb_clif.c $(lldpad_include_HEADERS) $(noinst_HEADERS) nltest_SOURCES = nltest.c nltest.h
include/lldp.h +19 -0
@@ -45,6 +45,8 @@/* Telecommunications Industry Association TR-41 Committee */ #define OUI_TIA_TR41 0x0012bb +#define OUI_IEEE_8021Qbg 0x001b3f +/* IEEE 802.3AB Clause 9: TLV Types */ #define CHASSIS_ID_TLV 1#define PORT_ID_TLV 2
@@ -186,5 +188,22 @@ enum {#define LLDP_8023_LINKAGG_CAPABLE (1 << 0)#define LLDP_8023_LINKAGG_ENABLED (1 << 1) +/* IEEE 802.1Qbg subtype */ +#define LLDP_EVB_SUBTYPE 0 + +/* forwarding mode */ +#define LLDP_EVB_CAPABILITY_FORWARD_STANDARD (1 << 7) +#define LLDP_EVB_CAPABILITY_FORWARD_REFLECTIVE_RELAY (1 << 6) + +/* EVB supported protocols */ +#define LLDP_EVB_CAPABILITY_PROTOCOL_RTE (1 << 2) +#define LLDP_EVB_CAPABILITY_PROTOCOL_ECP (1 << 1) +#define LLDP_EVB_CAPABILITY_PROTOCOL_VDP (1 << 0) + +/* EVB specific values */ +#define LLDP_EVB_DEFAULT_MAX_VSI 4096 +#define LLDP_EVB_DEFAULT_SVSI 3295 +#define LLDP_EVB_DEFAULT_RTE 15 +void somethingChangedLocal (char *ifname);#endif /* _LLDP_H */
include/lldp_evb.h new file +80 -0
80 lines not on this page · raw message
include/lldp_evb_clif.h new file +51 -0
51 lines not on this page · raw message
include/lldp_evb_cmds.h new file +31 -0
@@ -0,0 +1,31 @@ +/******************************************************************************* + +implementation of EVB TLVs for LLDP +(c) Copyright IBM Corp. 2010 + +Author(s): Jens Osterkamp <[email protected]> + +This program is free software; you can redistribute it and/or modify it +under the terms and conditions of the GNU General Public License, +version 2, as published by the Free Software Foundation. + +This program is distributed in the hope it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +The full GNU General Public License is included in this distribution in +the file called "COPYING". + +*******************************************************************************/ + +#ifndef _LLDP_EVB_CMDS_H +#define _LLDP_EVB_CMDS_H + +struct arg_handlers *evb_get_arg_handlers (); + +#endif
include/lldp_tlv.h +1 -0
@@ -144,6 +144,7 @@ int tlv_ok(struct unpacked_tlv *tlv);#define TLVID_8021 (sub) TLVID(OUI_IEEE_8021, (sub))#define TLVID_8023 (sub) TLVID(OUI_IEEE_8023, (sub))#define TLVID_MED (sub) TLVID(OUI_TIA_TR41, (sub)) +#define TLVID_8021Qbg (sub) TLVID(OUI_IEEE_8021Qbg, (sub))/* the size in bytes needed for a packed tlv from unpacked tlv */ #define TLVSIZE (t) ((t) ? (2 + (t)->length) : 0)
lldp_evb.c new file +658 -0
658 lines not on this page · raw message
lldp_evb_clif.c new file +226 -0
226 lines not on this page · raw message
lldp_evb_cmds.c new file +512 -0
512 lines not on this page · raw message
lldpad.c +2 -0
@@ -49,6 +49,7 @@#include "lldp_dcbx.h" #include "lldp_med.h" #include "lldp_8023.h" +#include "lldp_evb.h" #include "config.h" #include "lldpad_shm.h" #include "clif.h"
@@ -63,6 +64,7 @@ struct lldp_module *(*register_tlv_table[])(void) = { dcbx_register, med_register, ieee8023_register, + evb_register, NULL, };
lldptool.c +2 -0
@@ -39,6 +39,7 @@#include "lldp_med_clif.h" #include "lldp_8023_clif.h" #include "lldp_dcbx_clif.h" +#include "lldp_evb_clif.h" #include "lldptool.h" #include "lldptool_cli.h" #include "lldp_mod.h"
@@ -156,6 +157,7 @@ struct lldp_module *(*register_tlv_table[])(void) = { ieee8023_cli_register, med_cli_register, dcbx_cli_register, + evb_cli_register, NULL, };
--
1.7.1
------------------------------
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization
End of Virtualization Digest, Vol 60, Issue 17
**********************************************