Przeglądaj źródła

[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 lat temu
rodzic
commit
26a50c3a11
3 zmienionych plików z 9 dodań i 1 usunięć
  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 Wyświetl plik

@@ -485,6 +485,7 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
485 485
 	struct ipoib_mac ll_src;
486 486
 	struct ipoib_peer *src;
487 487
 
488
+	/* Record errors */
488 489
 	if ( rc != 0 ) {
489 490
 		netdev_rx_err ( netdev, iobuf, rc );
490 491
 		return;
@@ -499,6 +500,12 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
499 500
 		return;
500 501
 	}
501 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 510
 	/* Parse source address */
504 511
 	if ( av->gid_present ) {

+ 1
- 0
src/include/ipxe/infiniband.h Wyświetl plik

@@ -135,6 +135,7 @@ enum ib_queue_pair_type {
135 135
 	IB_QPT_GSI,
136 136
 	IB_QPT_UD,
137 137
 	IB_QPT_RC,
138
+	IB_QPT_ETH,
138 139
 };
139 140
 
140 141
 /** An Infiniband Queue Pair */

+ 1
- 1
src/net/infiniband.c Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz