summaryrefslogtreecommitdiffstats
path: root/sys/net/ieee8023ad_lacp.h
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2007-05-19 07:47:04 +0000
committerthompsa <thompsa@FreeBSD.org>2007-05-19 07:47:04 +0000
commit782a1a76be38c25949a671d38bb47c9afbc79f41 (patch)
tree6cabc7fbafa1ef930526acba684bdc5fe2f92b80 /sys/net/ieee8023ad_lacp.h
parent679817d46eac654da1954c5fc5a167f9d1f60a8c (diff)
downloadFreeBSD-src-782a1a76be38c25949a671d38bb47c9afbc79f41.zip
FreeBSD-src-782a1a76be38c25949a671d38bb47c9afbc79f41.tar.gz
Implement the Marker Protocol. A marker frame is placed on the interface queue
of each port and any further packets are blocked, when the all the marker frames have been returned to us from the remote network device then we can be sure that all interface queues are empty. This is needed when a port is added or removed from the aggregation since it will affect the hash based distribution, if the queues are not empty then a packet from an existing connection may be placed on a different interface and arrive out of order. This was previously achieved by suppressing transmission for 1 second, now that there is an active feedback this timeout as been increased to 3 seconds and used as a fallback.
Diffstat (limited to 'sys/net/ieee8023ad_lacp.h')
-rw-r--r--sys/net/ieee8023ad_lacp.h52
1 files changed, 28 insertions, 24 deletions
diff --git a/sys/net/ieee8023ad_lacp.h b/sys/net/ieee8023ad_lacp.h
index 5761e3e..04bd878 100644
--- a/sys/net/ieee8023ad_lacp.h
+++ b/sys/net/ieee8023ad_lacp.h
@@ -62,6 +62,7 @@
#define LACP_STATE_EXPIRED (1<<7)
#define LACP_PORT_NTT 0x00000001
+#define LACP_PORT_MARK 0x00000002
#define LACP_PORT_PROMISC 0x00000004
#define LACP_PORT_LADDRCHANGED 0x00000008
#define LACP_PORT_ATTACHED 0x00000010
@@ -157,7 +158,30 @@ struct lacpdu {
uint8_t ldu_resv[50];
} __packed;
-#define LACP_TRANSIT_DELAY 1000 /* in msec */
+/*
+ * IEEE802.3ad marker protocol
+ *
+ * protocol (on-wire) definitions.
+ */
+struct lacp_markerinfo {
+ uint16_t mi_rq_port;
+ uint8_t mi_rq_system[ETHER_ADDR_LEN];
+ uint32_t mi_rq_xid;
+ uint8_t mi_pad[2];
+} __packed;
+
+struct markerdu {
+ struct ether_header mdu_eh;
+ struct slowprothdr mdu_sph;
+
+ struct tlvhdr mdu_tlv;
+ struct lacp_markerinfo mdu_info;
+ struct tlvhdr mdu_tlv_term;
+ uint8_t mdu_resv[90];
+} __packed;
+
+#define MARKER_TYPE_INFO 0x01
+#define MARKER_TYPE_RESPONSE 0x02
enum lacp_selected {
LACP_UNSELECTED,
@@ -181,8 +205,10 @@ struct lacp_port {
struct ifnet *lp_ifp;
struct lacp_peerinfo lp_partner;
struct lacp_peerinfo lp_actor;
+ struct lacp_markerinfo lp_marker;
#define lp_state lp_actor.lip_state
#define lp_key lp_actor.lip_key
+#define lp_systemid lp_actor.lip_systemid
struct timeval lp_last_lacpdu;
int lp_lacpdu_sent;
enum lacp_mux_state lp_mux_state;
@@ -229,35 +255,13 @@ struct lacp_softc {
#define LACP_LONG_TIMEOUT_TIME (3 * LACP_SLOW_PERIODIC_TIME)
#define LACP_CHURN_DETECTION_TIME (60)
#define LACP_AGGREGATE_WAIT_TIME (2)
+#define LACP_TRANSIT_DELAY 3000 /* in msec */
/*
int tlv_check(const void *, size_t, const struct tlvhdr *,
const struct tlv_template *, boolean_t);
*/
-/*
- * IEEE802.3ad marker protocol
- *
- * protocol (on-wire) definitions.
- */
-
-struct markerdu {
- struct ether_header mdu_eh;
- struct slowprothdr mdu_sph;
-
- struct tlvhdr mdu_tlv;
- uint16_t mdu_rq_port;
- uint8_t mdu_rq_system[6];
- uint8_t mdu_rq_xid[4];
- uint8_t mdu_pad[2];
-
- struct tlvhdr mdu_tlv_term;
- uint8_t mdu_resv[90];
-} __packed;
-
-#define MARKER_TYPE_INFO 1
-#define MARKER_TYPE_RESPONSE 2
-
#define LACP_STATE_EQ(s1, s2, mask) \
((((s1) ^ (s2)) & (mask)) == 0)
OpenPOWER on IntegriCloud