]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[infiniband] Add the notion of an Ethernet queue pair type
authorMichael Brown <mcb30@ipxe.org>
Sun, 19 Sep 2010 16:35:53 +0000 (17:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 21 Sep 2010 01:12:06 +0000 (02:12 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/ipoib.c
src/include/ipxe/infiniband.h
src/net/infiniband.c

index 52ac5f03a473f909e9b8470a9193502811a78f7c..09c89bdc3cc991d23589328a18412a71dc74fb89 100644 (file)
@@ -485,6 +485,7 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
        struct ipoib_mac ll_src;
        struct ipoib_peer *src;
 
+       /* Record errors */
        if ( rc != 0 ) {
                netdev_rx_err ( netdev, iobuf, rc );
                return;
@@ -499,6 +500,12 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
                return;
        }
        ipoib_hdr = iobuf->data;
+       if ( ! av ) {
+               DBGC ( ipoib, "IPoIB %p received packet without address "
+                      "vector\n", ipoib );
+               netdev_rx_err ( netdev, iobuf, -ENOTTY );
+               return;
+       }
 
        /* Parse source address */
        if ( av->gid_present ) {
index fc04dc873869a1ba6c9d49929ede34690d67e864..be2b6e78db5c4fea9412af565d36531091ba2b38 100644 (file)
@@ -135,6 +135,7 @@ enum ib_queue_pair_type {
        IB_QPT_GSI,
        IB_QPT_UD,
        IB_QPT_RC,
+       IB_QPT_ETH,
 };
 
 /** An Infiniband Queue Pair */
index 207342710cb63dbccd61034b518a2cee70355e64..bdfc45d6b5e6e56a01da1aca02d04923e9b81b88 100644 (file)
@@ -483,7 +483,7 @@ void ib_complete_send ( struct ib_device *ibdev, struct ib_queue_pair *qp,
  *
  * @v ibdev            Infiniband device
  * @v qp               Queue pair
- * @v av               Address vector
+ * @v av               Address vector, or NULL
  * @v iobuf            I/O buffer
  * @v rc               Completion status code
  */