Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2017 22:11:30 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320880 - head/sys/dev/ena
Message-ID:  <201707102211.v6AMBUO2016650@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707102211.v6AMBUO2016650>