瀏覽代碼

[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>
tags/v1.20.1
Michael Brown 9 年之前
父節點
當前提交
1a9ed68cbb
共有 2 個檔案被更改,包括 23 行新增2 行删除
  1. 2
    2
      src/drivers/net/eoib.c
  2. 21
    0
      src/include/ipxe/eoib.h

+ 2
- 2
src/drivers/net/eoib.c 查看文件

454
 
454
 
455
 	/* Join multicast group */
455
 	/* Join multicast group */
456
 	if ( ( rc = ib_mcast_join ( eoib->ibdev, eoib->qp,
456
 	if ( ( rc = ib_mcast_join ( eoib->ibdev, eoib->qp,
457
-				    &eoib->membership, &eoib->broadcast, 0,
458
-				    eoib_join_complete ) ) != 0 ) {
457
+				    &eoib->membership, &eoib->broadcast,
458
+				    eoib->mask, eoib_join_complete ) ) != 0 ) {
459
 		DBGC ( eoib, "EoIB %s could not join broadcast group: %s\n",
459
 		DBGC ( eoib, "EoIB %s could not join broadcast group: %s\n",
460
 		       eoib->name, strerror ( rc ) );
460
 		       eoib->name, strerror ( rc ) );
461
 		return rc;
461
 		return rc;

+ 21
- 0
src/include/ipxe/eoib.h 查看文件

48
 
48
 
49
 	/** Peer cache */
49
 	/** Peer cache */
50
 	struct list_head peers;
50
 	struct list_head peers;
51
+
52
+	/** Multicast group additional component mask */
53
+	unsigned int mask;
51
 };
54
 };
52
 
55
 
56
+/**
57
+ * Force creation of multicast group
58
+ *
59
+ * @v eoib		EoIB device
60
+ */
61
+static inline void eoib_force_group_creation ( struct eoib_device *eoib ) {
62
+
63
+	/* Some dubious EoIB implementations require each endpoint to
64
+	 * force the creation of the multicast group.  Yes, this makes
65
+	 * it impossible for the group parameters (e.g. SL) to ever be
66
+	 * modified without breaking backwards compatiblity with every
67
+	 * existing driver.
68
+	 */
69
+	eoib->mask = ( IB_SA_MCMEMBER_REC_PKEY | IB_SA_MCMEMBER_REC_QKEY |
70
+		       IB_SA_MCMEMBER_REC_SL | IB_SA_MCMEMBER_REC_FLOW_LABEL |
71
+		       IB_SA_MCMEMBER_REC_TRAFFIC_CLASS );
72
+}
73
+
53
 extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr,
74
 extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr,
54
 			 struct ib_address_vector *broadcast,
75
 			 struct ib_address_vector *broadcast,
55
 			 const char *name );
76
 			 const char *name );

Loading…
取消
儲存