diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-03-09 00:45:09 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-03-09 08:43:40 +0000 |
commit | 1a9ed68cbbbe7280fe85fe7a8c06748134130db3 (patch) | |
tree | 4b096046e3831f049fb0a1581840a64fc4a6e7ec | |
parent | ecd93cfc116dd95864634b837e2b8dff09ae5dce (diff) | |
download | ipxe-1a9ed68cbbbe7280fe85fe7a8c06748134130db3.zip ipxe-1a9ed68cbbbe7280fe85fe7a8c06748134130db3.tar.gz ipxe-1a9ed68cbbbe7280fe85fe7a8c06748134130db3.tar.bz2 |
[eoib] Allow the multicast group to be forcefully created
Some EoIB implementations require each individual EoIB node to create
the multicast group for the EoIB broadcast domain.
It is left as an exercise for the interested reader to determine how
such an implementation might ever allow the parameters of such a
multicast group to be changed without requiring a simultaneous upgrade
of every driver on every operating system on every machine currently
attached to the fabric.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/drivers/net/eoib.c | 4 | ||||
-rw-r--r-- | src/include/ipxe/eoib.h | 21 |
2 files changed, 23 insertions, 2 deletions
diff --git a/src/drivers/net/eoib.c b/src/drivers/net/eoib.c index 44eed4c..a5f9e29 100644 --- a/src/drivers/net/eoib.c +++ b/src/drivers/net/eoib.c @@ -454,8 +454,8 @@ static int eoib_join_broadcast_group ( struct eoib_device *eoib ) { /* Join multicast group */ if ( ( rc = ib_mcast_join ( eoib->ibdev, eoib->qp, - &eoib->membership, &eoib->broadcast, 0, - eoib_join_complete ) ) != 0 ) { + &eoib->membership, &eoib->broadcast, + eoib->mask, eoib_join_complete ) ) != 0 ) { DBGC ( eoib, "EoIB %s could not join broadcast group: %s\n", eoib->name, strerror ( rc ) ); return rc; diff --git a/src/include/ipxe/eoib.h b/src/include/ipxe/eoib.h index c53880b..acae542 100644 --- a/src/include/ipxe/eoib.h +++ b/src/include/ipxe/eoib.h @@ -48,8 +48,29 @@ struct eoib_device { /** Peer cache */ struct list_head peers; + + /** Multicast group additional component mask */ + unsigned int mask; }; +/** + * Force creation of multicast group + * + * @v eoib EoIB device + */ +static inline void eoib_force_group_creation ( struct eoib_device *eoib ) { + + /* Some dubious EoIB implementations require each endpoint to + * force the creation of the multicast group. Yes, this makes + * it impossible for the group parameters (e.g. SL) to ever be + * modified without breaking backwards compatiblity with every + * existing driver. + */ + eoib->mask = ( IB_SA_MCMEMBER_REC_PKEY | IB_SA_MCMEMBER_REC_QKEY | + IB_SA_MCMEMBER_REC_SL | IB_SA_MCMEMBER_REC_FLOW_LABEL | + IB_SA_MCMEMBER_REC_TRAFFIC_CLASS ); +} + extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr, struct ib_address_vector *broadcast, const char *name ); |