From patchwork Fri Dec 9 02:04:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: bugzilla@dpdk.org X-Patchwork-Id: 120683 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1F0B9A034C; Fri, 9 Dec 2022 03:04:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA08440E03; Fri, 9 Dec 2022 03:04:54 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id B0214400D6 for ; Fri, 9 Dec 2022 03:04:53 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 77E49A0540; Fri, 9 Dec 2022 03:04:53 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 1145] net/ice fdir flow create/destroy failed with RTE_LIBRTE_ICE_16BYTE_RX_DESC defined Date: Fri, 09 Dec 2022 02:04:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 21.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: hanshuang87@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org https://bugs.dpdk.org/show_bug.cgi?id=1145 Bug ID: 1145 Summary: net/ice fdir flow create/destroy failed with RTE_LIBRTE_ICE_16BYTE_RX_DESC defined Product: DPDK Version: 21.11 Hardware: All OS: All Status: UNCONFIRMED Severity: major Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: hanshuang87@gmail.com Target Milestone: --- 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;