From: Rafal Kozik Date: Fri, 14 Dec 2018 13:18:29 +0000 (+0100) Subject: net/ena: add reset reason in Rx error X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9b260dbf7412819f9a5fc544872b1447d6938afe;p=dpdk.git net/ena: add reset reason in Rx error Whenever the driver will receive too many descriptors from the device, it should trigger the device reset with reset reason set to ENA_REGS_RESET_TOO_MANY_RX_DESCS. Fixes: 241da076b1f7 ("net/ena: adjust error checking and cleaning") Cc: stable@dpdk.org Signed-off-by: Rafal Kozik Acked-by: Michal Krawczyk --- diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 5e9666f74e..a47f5f7fa8 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1910,6 +1910,8 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, &ena_rx_ctx); if (unlikely(rc)) { RTE_LOG(ERR, PMD, "ena_com_rx_pkt error %d\n", rc); + rx_ring->adapter->reset_reason = + ENA_REGS_RESET_TOO_MANY_RX_DESCS; rx_ring->adapter->trigger_reset = true; return 0; }