svn commit: r320880 - head/sys/dev/ena

Zbigniew Bodek zbb at FreeBSD.org
Mon Jul 10 22:11:31 UTC 2017


Author: zbb
Date: Mon Jul 10 22:11:30 2017
New Revision: 320880
URL: https://svnweb.freebsd.org/changeset/base/320880

Log:
  Fix error check for Rx mbuf allocation in ENA driver
  
  ena_alloc_rx_mbuf() will return positive error code
  on failure. Act accordingly.
  
  Submitted by: Krishna Yenduri <kyenduri at brkt.com>

Modified:
  head/sys/dev/ena/ena.c

Modified: head/sys/dev/ena/ena.c
==============================================================================
--- head/sys/dev/ena/ena.c	Mon Jul 10 21:55:24 2017	(r320879)
+++ head/sys/dev/ena/ena.c	Mon Jul 10 22:11:30 2017	(r320880)
@@ -1032,7 +1032,7 @@ ena_refill_rx_bufs(struct ena_ring *rx_ring, uint32_t 
 		    &rx_ring->rx_buffer_info[next_to_use];
 
 		rc = ena_alloc_rx_mbuf(adapter, rx_ring, rx_info);
-		if (rc < 0) {
+		if (rc != 0) {
 			device_printf(adapter->pdev,
 			    "failed to alloc buffer for rx queue\n");
 			break;


More information about the svn-src-head mailing list