+
+/* Two lacp_info structures are tx_equal if and only if they do not differ in
+ * ways which would require a lacp_pdu transmission. */
+static bool
+info_tx_equal(struct lacp_info *a, struct lacp_info *b)
+{
+
+ /* LACP specification dictates that we transmit whenever the actor and
+ * remote_actor differ in the following fields: Port, Port Priority,
+ * System, System Priority, Aggregation Key, Activity State, Timeout State,
+ * Sync State, and Aggregation State. The state flags are most likely to
+ * change so are checked first. */
+ return !((a->state ^ b->state) & (LACP_STATE_ACT
+ | LACP_STATE_TIME
+ | LACP_STATE_SYNC
+ | LACP_STATE_AGG))
+ && a->port_id == b->port_id
+ && a->port_priority == b->port_priority
+ && a->key == b->key
+ && a->sys_priority == b->sys_priority
+ && eth_addr_equals(a->sys_id, b->sys_id);
+}