From: David Hunt <david.hunt@intel.com>
To: dev@dpdk.org
Cc: david.hunt@intel.com, yanx.xia@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v1] lib/distributor: fix unaligned 128-bit write
Date: Fri, 16 Jul 2021 14:32:37 +0100 [thread overview]
Message-ID: <20210716133237.31464-1-david.hunt@intel.com> (raw)
When the distributor sample app is built as a 32-bit app,
the data buffer passed to find_match_vec can be unaligned,
causing a segmentation fault due to writing a 128-bit value
using _mm_store_si128(). 128-bit align the data being
passed in so this does not happen.
Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
---
lib/distributor/rte_distributor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/distributor/rte_distributor.c b/lib/distributor/rte_distributor.c
index 07e385a259..c210cf86bd 100644
--- a/lib/distributor/rte_distributor.c
+++ b/lib/distributor/rte_distributor.c
@@ -478,7 +478,7 @@ rte_distributor_process(struct rte_distributor *d,
return 0;
while (next_idx < num_mbufs) {
- uint16_t matches[RTE_DIST_BURST_SIZE];
+ uint16_t matches[RTE_DIST_BURST_SIZE] __rte_aligned(128);
unsigned int pkts;
if ((num_mbufs - next_idx) < RTE_DIST_BURST_SIZE)
--
2.17.1
next reply other threads:[~2021-07-16 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 13:32 David Hunt [this message]
2021-07-20 12:00 ` [dpdk-dev] [PATCH v1] lib/distributor: fix unaligned 128-bit write Thomas Monjalon
2021-07-20 12:31 ` Thomas Monjalon
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=20210716133237.31464-1-david.hunt@intel.com \
--to=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=yanx.xia@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.