From 3144e4fb646e7c03236b5f03c98dedc8eff210d6 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 9 Mar 2016 00:51:08 +0000 Subject: [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 --- src/include/ipxe/eoib.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/include/ipxe') 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,10 +49,30 @@ 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 * @@ -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 */ -- cgit v1.2.3-55-g7522