Browse Source

[infiniband] Add the notion of an Ethernet queue pair type

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
26a50c3a11
3 changed files with 9 additions and 1 deletions
  1. 7
    0
      src/drivers/net/ipoib.c
  2. 1
    0
      src/include/ipxe/infiniband.h
  3. 1
    1
      src/net/infiniband.c

+ 7
- 0
src/drivers/net/ipoib.c View File

485
 	struct ipoib_mac ll_src;
485
 	struct ipoib_mac ll_src;
486
 	struct ipoib_peer *src;
486
 	struct ipoib_peer *src;
487
 
487
 
488
+	/* Record errors */
488
 	if ( rc != 0 ) {
489
 	if ( rc != 0 ) {
489
 		netdev_rx_err ( netdev, iobuf, rc );
490
 		netdev_rx_err ( netdev, iobuf, rc );
490
 		return;
491
 		return;
499
 		return;
500
 		return;
500
 	}
501
 	}
501
 	ipoib_hdr = iobuf->data;
502
 	ipoib_hdr = iobuf->data;
503
+	if ( ! av ) {
504
+		DBGC ( ipoib, "IPoIB %p received packet without address "
505
+		       "vector\n", ipoib );
506
+		netdev_rx_err ( netdev, iobuf, -ENOTTY );
507
+		return;
508
+	}
502
 
509
 
503
 	/* Parse source address */
510
 	/* Parse source address */
504
 	if ( av->gid_present ) {
511
 	if ( av->gid_present ) {

+ 1
- 0
src/include/ipxe/infiniband.h View File

135
 	IB_QPT_GSI,
135
 	IB_QPT_GSI,
136
 	IB_QPT_UD,
136
 	IB_QPT_UD,
137
 	IB_QPT_RC,
137
 	IB_QPT_RC,
138
+	IB_QPT_ETH,
138
 };
139
 };
139
 
140
 
140
 /** An Infiniband Queue Pair */
141
 /** An Infiniband Queue Pair */

+ 1
- 1
src/net/infiniband.c View File

483
  *
483
  *
484
  * @v ibdev		Infiniband device
484
  * @v ibdev		Infiniband device
485
  * @v qp		Queue pair
485
  * @v qp		Queue pair
486
- * @v av		Address vector
486
+ * @v av		Address vector, or NULL
487
  * @v iobuf		I/O buffer
487
  * @v iobuf		I/O buffer
488
  * @v rc		Completion status code
488
  * @v rc		Completion status code
489
  */
489
  */

Loading…
Cancel
Save