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
This commit is contained in:
parent
c51a229ca7
commit
1d65b4c095
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344151
@ -1473,12 +1473,6 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs,
|
||||
|
||||
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;
|
||||
@ -1487,6 +1481,10 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs,
|
||||
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);
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user