Date: Fri, 15 Feb 2019 10:40:42 +0000 (UTC) From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344151 - head/sys/dev/ena Message-ID: <201902151040.x1FAegKB028303@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mw Date: Fri Feb 15 10:40:41 2019 New Revision: 344151 URL: https://svnweb.freebsd.org/changeset/base/344151 Log: Do not use ntc for obtaining buffer on Rx in the ENA In out of order mode Rx buffer are accesses by req_id. Accessing and validating mbuf using ntc is causing false error. Increase driver revision after latest RX OOO completion fixes. Submitted by: Rafal Kozik <rk@semihalf.com> Obtained from: Semihalf Sponsored by: Amazon, Inc. MFC after: 1 week Modified: head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Fri Feb 15 10:34:27 2019 (r344150) +++ head/sys/dev/ena/ena.c Fri Feb 15 10:40:41 2019 (r344151) @@ -1473,13 +1473,7 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_r ntc = *next_to_clean; adapter = rx_ring->adapter; - rx_info = &rx_ring->rx_buffer_info[ntc]; - if (unlikely(rx_info->mbuf == NULL)) { - device_printf(adapter->pdev, "NULL mbuf in rx_info"); - return (NULL); - } - len = ena_bufs[buf].len; req_id = ena_bufs[buf].req_id; rc = validate_rx_req_id(rx_ring, req_id); @@ -1487,6 +1481,10 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_r return (NULL); rx_info = &rx_ring->rx_buffer_info[req_id]; + if (unlikely(rx_info->mbuf == NULL)) { + device_printf(adapter->pdev, "NULL mbuf in rx_info"); + return (NULL); + } ena_trace(ENA_DBG | ENA_RXPTH, "rx_info %p, mbuf %p, paddr %jx", rx_info, rx_info->mbuf, (uintmax_t)rx_info->ena_buf.paddr); Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Fri Feb 15 10:34:27 2019 (r344150) +++ head/sys/dev/ena/ena.h Fri Feb 15 10:40:41 2019 (r344151) @@ -41,7 +41,7 @@ #define DRV_MODULE_VER_MAJOR 0 #define DRV_MODULE_VER_MINOR 8 -#define DRV_MODULE_VER_SUBMINOR 2 +#define DRV_MODULE_VER_SUBMINOR 3 #define DRV_MODULE_NAME "ena"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902151040.x1FAegKB028303>