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 1D8F2457A1; Mon, 12 Aug 2024 17:34:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AA7B4065F; Mon, 12 Aug 2024 17:34:31 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id C03DE402BB for ; Mon, 12 Aug 2024 17:34:29 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-70d2ae44790so3105546b3a.2 for ; Mon, 12 Aug 2024 08:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723476869; x=1724081669; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+3/ahRenIwhOHRYBMH96lOvkIm5/69zbBVKCxU4+Vrw=; b=C3tfCuJNGKSaaSMum/xDaFJ8NxHASBXlaUsSURigiGMPNZ2YtpRZvcwShAdqiAWwaS sq9tygi9hqecNsgxjnTSlkBn8jsmcjylHOvhlzaWDLyGLu6A3X0wamSq8ebjZNeQntmv PfmnmyIlZz3Nt+Zmo/pyBxjrZeJbfXs+GQf4MawmXqhYxs7KwrCA41P6wOvvAzaKifTc zlZ+BRyaeijE0XopilTGs+H0mYpwF6i7CAcZk8LxSf2vgbsAXx4QgERZT84DqbuQkNAe yTrplb1F0L5DzUwH+aaCB0ZW7FiJuCs4YqghIfMknGJe83TTjNVFhd1sd+hc8psQKW8W OHng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723476869; x=1724081669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+3/ahRenIwhOHRYBMH96lOvkIm5/69zbBVKCxU4+Vrw=; b=clLuJ5I7j2Bj4lWv1PcwNvnYBdHTXPUDUNkhQ7njc+i0vlyP0PKND421FCjoJhLA/F MorI8f4pkxpaATAXOgBh/f/0O0mtLJ/UbduBNNOEdE6qMzhudLOTmbJZDTZEFwyyictE RAlUz6OwavR1ZW32iuiNoc77vksSdihNSMTMHePH/J6s/8fflMWOZEDovG7UB76Z7ZLO QNmpSwz+4G8XcMYzxTtAskMA6trGumsLZcoDj8+o1h0VHEQMkWovjdX/M+FjWzB/1qRa BgqoCEge5JG0RIuYGxWp0INWEfb2oUfYzOOYtg34InKmOO57sg0YlF4NMKpOal8RXqc2 12zg== X-Gm-Message-State: AOJu0Yy7dP9YrAGEYJMxy/ZIefs37pReTONapFLyHaYy6rTEdY2jFOsm i32U4Qgws+cDlGgIxx/jbZP/6FhvZi1ojEmkrwNTR6qoSAU6GFbPnDz/DHGb1Lm+33KClUiToyY g X-Google-Smtp-Source: AGHT+IGhfSc6wFOxm96Daglbdixv0oN5wlsHG6aHHWZ9SXBpY9DkP7+IfZjZiVOHpmMzJ7aCsR8o8g== X-Received: by 2002:a17:902:ce89:b0:1fd:a54e:bc28 with SMTP id d9443c01a7336-201ca1e6760mr6673645ad.63.1723476868897; Mon, 12 Aug 2024 08:34:28 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-200bb9b2eb0sm39195155ad.170.2024.08.12.08.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2024 08:34:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Shai Brandes , Evgeny Schemeilin , Ron Beider , Amit Bernstein , Wajeeh Atrash , Igor Chauskin , Michal Krawczyk , Artur Rojek Subject: [PATCH] net/ena: revert redefining memcpy Date: Mon, 12 Aug 2024 08:34:17 -0700 Message-ID: <20240812153417.65225-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <200~bug-1510-3@http.bugs.dpdk.org> References: <200~bug-1510-3@http.bugs.dpdk.org> 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 Redefining memcpy as rte_memcpy has no performance gain on current compilers, and introduced bugs like this one where rte_memcpy() will be detected as referencing past the destination. Bugzilla ID: 1510 Fixes: 142778b3702a ("net/ena: switch memcpy to optimized version") Signed-off-by: Stephen Hemminger --- drivers/net/ena/base/ena_plat_dpdk.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index 21b96113c7..291db6cabe 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -26,7 +26,6 @@ #include #include -#include typedef uint64_t u64; typedef uint32_t u32; @@ -70,13 +69,7 @@ typedef uint64_t dma_addr_t; #define ENA_UDELAY(x) rte_delay_us_block(x) #define ENA_TOUCH(x) ((void)(x)) -/* Redefine memcpy with caution: rte_memcpy can be simply aliased to memcpy, so - * make the redefinition only if it's safe (and beneficial) to do so. - */ -#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64_MEMCPY) || defined(RTE_ARCH_ARM_NEON_MEMCPY) -#undef memcpy -#define memcpy rte_memcpy -#endif + #define wmb rte_wmb #define rmb rte_rmb #define mb rte_mb -- 2.43.0