From: bugzilla@dpdk.org
To: dev@dpdk.org
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
Date: Wed, 30 May 2018 10:50:51 +0000 [thread overview]
Message-ID: <bug-55-3@http.dpdk.org/tracker/> (raw)
https://dpdk.org/tracker/show_bug.cgi?id=55
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 buffer
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#n144
Here the else-part contains a loop which iterates over:
i = (i + 1) & mask;
The mask is:
const unsigned mask = 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 = (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 power
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?
--
Kjeld Mortensen
Tieto
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2018-05-30 10:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-55-3@http.dpdk.org/tracker/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).