diff options
Diffstat (limited to 'src/drivers/net/ipoib.c')
-rw-r--r-- | src/drivers/net/ipoib.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c index a56ceb89..55123006 100644 --- a/src/drivers/net/ipoib.c +++ b/src/drivers/net/ipoib.c @@ -57,8 +57,6 @@ struct ipoib_queue_set { struct ib_completion_queue *cq; /** Queue pair */ struct ib_queue_pair *qp; - /** Receive work queue fill level */ - unsigned int recv_fill; /** Receive work queue maximum fill level */ unsigned int recv_max_fill; }; @@ -565,7 +563,7 @@ static void ipoib_data_complete_recv ( struct ib_device *ibdev __unused, if ( completion->syndrome ) { netdev_rx_err ( netdev, iobuf, -EIO ); - goto done; + return; } iob_put ( iobuf, completion->len ); @@ -574,7 +572,7 @@ static void ipoib_data_complete_recv ( struct ib_device *ibdev __unused, "contain GRH\n", ipoib ); DBGC_HD ( ipoib, iobuf->data, iob_len ( iobuf ) ); netdev_rx_err ( netdev, iobuf, -EIO ); - goto done; + return; } iob_pull ( iobuf, sizeof ( struct ib_global_route_header ) ); @@ -583,16 +581,13 @@ static void ipoib_data_complete_recv ( struct ib_device *ibdev __unused, "contain IPoIB header\n", ipoib ); DBGC_HD ( ipoib, iobuf->data, iob_len ( iobuf ) ); netdev_rx_err ( netdev, iobuf, -EIO ); - goto done; + return; } ipoib_pshdr = iob_push ( iobuf, sizeof ( *ipoib_pshdr ) ); /* FIXME: fill in a MAC address for the sake of AoE! */ netdev_rx ( netdev, iobuf ); - - done: - ipoib->data.recv_fill--; } /** @@ -732,7 +727,6 @@ static void ipoib_meta_complete_recv ( struct ib_device *ibdev __unused, } done: - ipoib->meta.recv_fill--; free_iob ( iobuf ); } @@ -747,7 +741,7 @@ static void ipoib_refill_recv ( struct ipoib_device *ipoib, struct io_buffer *iobuf; int rc; - while ( qset->recv_fill < qset->recv_max_fill ) { + while ( qset->qp->recv.fill < qset->recv_max_fill ) { iobuf = alloc_iob ( IPOIB_PKT_LEN ); if ( ! iobuf ) break; @@ -755,7 +749,6 @@ static void ipoib_refill_recv ( struct ipoib_device *ipoib, free_iob ( iobuf ); break; } - qset->recv_fill++; } } |