aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/eoib.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2016-03-09 00:51:08 +0000
committerMichael Brown <mcb30@ipxe.org>2016-03-09 08:43:40 +0000
commit3144e4fb646e7c03236b5f03c98dedc8eff210d6 (patch)
tree3e22ccb0ae99cf3c4b7721a3fd5c2ab60b44fd84 /src/include/ipxe/eoib.h
parent1a9ed68cbbbe7280fe85fe7a8c06748134130db3 (diff)
downloadipxe-3144e4fb646e7c03236b5f03c98dedc8eff210d6.tar.gz
[eoib] Support non-FullMember gateway devices
Some EoIB implementations utilise an EoIB-to-Ethernet gateway device that does not perform a FullMember join to the multicast group for the EoIB broadcast domain. This has various exciting side-effects, such as requiring every EoIB node to send every broadcast packet twice. As an added bonus, the gateway may also break the EoIB MAC address to GID mapping protocol by sending Ethernet-sourced packets from the wrong QPN. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/eoib.h')
-rw-r--r--src/include/ipxe/eoib.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/ipxe/eoib.h b/src/include/ipxe/eoib.h
index acae542b6..93f496c36 100644
--- a/src/include/ipxe/eoib.h
+++ b/src/include/ipxe/eoib.h
@@ -49,11 +49,31 @@ struct eoib_device {
/** Peer cache */
struct list_head peers;
+ /** Send duplicate packet to gateway (or NULL)
+ *
+ * @v eoib EoIB device
+ * @v original Original I/O buffer
+ */
+ void ( * duplicate ) ( struct eoib_device *eoib,
+ struct io_buffer *original );
+ /** Gateway (if any) */
+ struct ib_address_vector gateway;
/** Multicast group additional component mask */
unsigned int mask;
};
/**
+ * Check if EoIB device uses a gateway
+ *
+ * @v eoib EoIB device
+ * @v has_gw EoIB device uses a gateway
+ */
+static inline int eoib_has_gateway ( struct eoib_device *eoib ) {
+
+ return ( eoib->duplicate != NULL );
+}
+
+/**
* Force creation of multicast group
*
* @v eoib EoIB device
@@ -77,5 +97,7 @@ extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr,
extern struct eoib_device * eoib_find ( struct ib_device *ibdev,
const uint8_t *hw_addr );
extern void eoib_destroy ( struct eoib_device *eoib );
+extern void eoib_set_gateway ( struct eoib_device *eoib,
+ struct ib_address_vector *av );
#endif /* _IPXE_EOIB_H */