From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BFC62A0C50; Fri, 16 Jul 2021 15:32:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4ED074067B; Fri, 16 Jul 2021 15:32:55 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9F3C840151; Fri, 16 Jul 2021 15:32:53 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="191100468" X-IronPort-AV: E=Sophos;i="5.84,245,1620716400"; d="scan'208";a="191100468" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 06:32:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,245,1620716400"; d="scan'208";a="467127889" Received: from silpixa00399952.ir.intel.com ([10.55.129.13]) by fmsmga008.fm.intel.com with ESMTP; 16 Jul 2021 06:32:48 -0700 From: David Hunt To: dev@dpdk.org Cc: david.hunt@intel.com, yanx.xia@intel.com, stable@dpdk.org Date: Fri, 16 Jul 2021 14:32:37 +0100 Message-Id: <20210716133237.31464-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] lib/distributor: fix unaligned 128-bit write 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 Sender: "dev" 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 --- 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