Bug 1145 - net/ice fdir flow create/destroy failed with RTE_LIBRTE_ICE_16BYTE_RX_DESC defined
Summary: net/ice fdir flow create/destroy failed with RTE_LIBRTE_ICE_16BYTE_RX_DESC de...
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: ethdev (show other bugs)
Version: 21.11
Hardware: All All
: Normal major
Target Milestone: ---
Assignee: Qimingy
URL:
Depends on:
Blocks:
 
Reported: 2022-12-09 03:04 CET by Han Shuang
Modified: 2023-02-06 11:55 CET (History)
3 users (show)



Attachments

Description Han Shuang 2022-12-09 03:04:52 CET
Fdir rx queue use the same ice_rx_queue struct as packet rx queue.
When RTE_LIBRTE_ICE_16BYTE_RX_DESC defined rxq->rx_ring type is ice_16b_rx_flex_desc.

#ifdef RTE_LIBRTE_ICE_16BYTE_RX_DESC
#define ice_rx_flex_desc ice_16b_rx_flex_desc
#else
#define ice_rx_flex_desc ice_32b_rx_flex_desc
#endif

But ice_check_fdir_programming_status check the rxdp assuming that rx_ring type is ice_32byte_rx_desc.

rxdp = (volatile union ice_32byte_rx_desc *)(&rxq->rx_ring[rxq->rx_tail]);

I think this patch will fix the bug, but not the best solution:

--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -4481,9 +4481,10 @@
        uint32_t error;
        uint32_t id;
        int ret = -EAGAIN;
+       volatile union ice_32byte_rx_desc *rx_ring = rxq->rx_ring;
 
        rxdp = (volatile union ice_32byte_rx_desc *)
-               (&rxq->rx_ring[rxq->rx_tail]);
+               (&rx_ring[rxq->rx_tail]);
        qword1 = rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len);
        rx_status = (qword1 & ICE_RXD_QW1_STATUS_M)
                        >> ICE_RXD_QW1_STATUS_S;

Note You need to log in before you can comment on or make changes to this bug.