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 5C41C426C1; Thu, 5 Oct 2023 13:51:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38A6C402C3; Thu, 5 Oct 2023 13:51:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A3D7D402A9 for ; Thu, 5 Oct 2023 13:51:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696506687; x=1728042687; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PGvz9rrsJGE6cVgVEJEyhV6MqnaoufZGGVzhpvG9rA4=; b=FaZHzfKkB5tOS2uCQdtCM/nF8loF/lIb5nG1bQ+ahJ5y44wG8JTy8rBK FOZ7/xOlfDso9Mwk4v2EgstGtQkHt2ZR+kqdsHhHq+A30LxFrpPqBLiu0 6bXHNBtNR2p7SZAUVlvtL9vuGJfwGniir5f1KUiO2COGJbMkaRnKFZYau AsxPBWGOsOv3SLE5UICqqP7ixshAjtGE8+nVtGDIIu+wu5jcDZ6rNYcdE gPCBCUs9g8bU3nYcFnTPSO+OxRT/YuJBq+OP0GLFEkdVB0n/ZGsGhNeH9 r917WLkIE7Ijhg9QGYN6PdhEVXeoQFhg6XRnw9gjoDsxtfwwKEKtG5AHy A==; X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="368545988" X-IronPort-AV: E=Sophos;i="6.03,202,1694761200"; d="scan'208";a="368545988" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 04:51:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="728421794" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="728421794" Received: from silpixa00401385.ir.intel.com ([10.237.214.41]) by orsmga006.jf.intel.com with ESMTP; 05 Oct 2023 04:51:11 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Jerin Jacob Subject: [RFC PATCH] eventdev: ensure 16-byte alignment for events Date: Thu, 5 Oct 2023 12:51:00 +0100 Message-Id: <20231005115101.12276-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The event structure in DPDK is 16-bytes in size, and events are regularly passed as parameters directly rather than being passed as pointers. To help compiler optimize correctly, we can explicitly request 16-byte alignment for events, which means that we should be able to do aligned vector loads/stores (e.g. with SSE or Neon) when working with those events. Signed-off-by: Bruce Richardson --- lib/eventdev/rte_eventdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h index 2ba8a7b090..bb0d59b059 100644 --- a/lib/eventdev/rte_eventdev.h +++ b/lib/eventdev/rte_eventdev.h @@ -1344,7 +1344,7 @@ struct rte_event { struct rte_event_vector *vec; /**< Event vector pointer. */ }; -}; +} __rte_aligned(16); /* Ethdev Rx adapter capability bitmap flags */ #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1 -- 2.39.2