[lldp-devel] [PATCH 2/6] evb22 add support for gpid bit

Thomas Richter tmricht at linux.vnet.ibm.com
Tue Feb 5 16:24:57 UTC 2013


Report gpid bit to VDP upper layer protocol.

Signed-off-by: Thomas Richter <tmricht at linux.vnet.ibm.com>
---
 include/lldp_qbg22.h |    5 +++--
 qbg/lldp_evb22.c     |    3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/lldp_qbg22.h b/include/lldp_qbg22.h
index ed2e0ff..633e67b 100644
--- a/include/lldp_qbg22.h
+++ b/include/lldp_qbg22.h
@@ -30,8 +30,8 @@
  * Messages are sent from:
  * EVB --> ECP: Max number of retries (R) and retransmit timeout (RTE).
  *
- * EVB --> VDP: Max number of Reinit-keep-Alive (RKA) and Resource wait delay
- *		(RWD)
+ * EVB --> VDP: Max number of Reinit-keep-Alive (RKA) Resource wait delay (RWD)
+ *		and groupid support.
  *
  * VDP --> ECP: VSI Information as payload
  * ECP --> VDP: VSI Information as payload
@@ -68,6 +68,7 @@ struct evb22_to_ecp22 {		/* Notification from EVB to ECP */
 struct evb22_to_vdp22 {		/* Notification from EVB to VDP */
 	unsigned char max_rwd;	/* Max number of resource wait delay */
 	unsigned char max_rka;	/* Max number of reinit keep alive */
+	unsigned char gpid;	/* Support group ids in VDP */
 };
 
 struct vdp22_to_ecp22 {		/* Notification from VDP to ECP */
diff --git a/qbg/lldp_evb22.c b/qbg/lldp_evb22.c
index e5ffa9d..82d0cda 100644
--- a/qbg/lldp_evb22.c
+++ b/qbg/lldp_evb22.c
@@ -256,6 +256,9 @@ static void evb22_update_tlv(struct evb22_data *ed)
 	qbg.data_type = EVB22_TO_VDP22;
 	qbg.u.b.max_rka = evb_ex_rka(ed->out.rl_rka);
 	qbg.u.b.max_rwd = evb_ex_rwd(ed->out.evb_mode);
+	/* Support group identifiers when advertised by both sides */
+	qbg.u.b.gpid = evb_ex_bgid(ed->out.bridge_s)
+		       && evb_ex_sgid(ed->out.station_s);
 	modules_notify(LLDP_MOD_VDP22, ed->ifname, &qbg);
 }
 
-- 
1.7.1



More information about the lldp-devel mailing list