From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id AC1E94C8B; Wed, 30 May 2018 12:50:51 +0200 (CEST) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Wed, 30 May 2018 10:50:51 +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: 17.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: kjeld.mortensen@tieto.com X-Bugzilla-Status: CONFIRMED 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: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://dpdk.org/tracker/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 55] I40E PMD driver in vector mode implicitly requires number of RX descriptors in a ring to be power of two X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 10:50:51 -0000 https://dpdk.org/tracker/show_bug.cgi?id=3D55 Bug ID: 55 Summary: I40E PMD driver in vector mode implicitly requires number of RX descriptors in a ring to be power of two Product: DPDK Version: 17.11 Hardware: x86 OS: Linux Status: CONFIRMED Severity: major Priority: Normal Component: ethdev Assignee: dev@dpdk.org Reporter: kjeld.mortensen@tieto.com Target Milestone: --- We have experienced instability of the I40E PMD in case it is compiled in vector mode (CONFIG_RTE_LIBRTE_I40E_INC_VECTOR). General observation: We see instability in case we set the number of RX descriptors in a ring bu= ffer to something which is NOT the power of two. Debugging was done on 17.11, but code inspection was performed on latest master. --- Observation 1, process hang (infinite loop?): Debugging points to: _i40e_rx_queue_release_mbufs_vec http://dpdk.org/browse/dpdk/tree/drivers/net/i40e/i40e_rxtx_vec_common.h#n1= 44 Here the else-part contains a loop which iterates over: i =3D (i + 1) & mask; The mask is: const unsigned mask =3D rxq->nb_rx_desc - 1; This suggests that nb_rx_desc assumes a power of two. --- Observation 2, some RX packets are unexpectedly empty (but we do not have in depth view in this case): A more general (quick and incomplete) code inspection of the RX vector part= of the I40E driver source code gave the following finding: In the procedure _recv_raw_pkts_vec, http://dpdk.org/browse/dpdk/tree/drivers/net/i40e/i40e_rxtx_vec_sse.c#n453 we have: rxq->rx_tail =3D (uint16_t)(rxq->rx_tail & (rxq->nb_rx_desc - 1)); Again this suggests to me that it is assumed that nb_rx_desc should be a po= wer of two in the vector case. --- We certainly understand that one can optimize performance using a power-of-= two assumption about the RX ring buffer size. For example, this seems what the FM10K driver does: 15.2.1.1. Prerequisites and Pre-conditions http://dpdk.org/doc/guides/nics/fm10k.html In this case FM10K has documented the "limitation" and also has an explicit check using the rte_is_power_of_2 procedure in case of vectorization. Should we have something similar for I40E in vector mode?=20 -- Kjeld Mortensen Tieto --=20 You are receiving this mail because: You are the assignee for the bug.=