From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla@dpdk.org
Subject: [Bug 55] I40E PMD driver in vector mode implicitly
requires number of RX descriptors in a ring to be power of two
Date: Wed, 30 May 2018 10:50:51 +0000
Message-ID:
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
To: dev@dpdk.org
Return-path:
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
Sender: "dev"
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.=