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 22A3745AD9; Mon, 7 Oct 2024 21:42:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EB2342C24; Mon, 7 Oct 2024 21:36:26 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 7EB8942D9F for ; Mon, 7 Oct 2024 21:36:24 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-20bc506347dso39206725ad.0 for ; Mon, 07 Oct 2024 12:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728329784; x=1728934584; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=POdglfyXRLGHBSOMmhH1eztI7X3yRmS8yAMMjBl8k6g=; b=AaZDR0X5Hc4Oq8fKzyNe2xP2sE8mGXoaNOgmW2/OBGsb2OFy3fB9xfS5imLARw5ck1 x3mvPS+6Vh/73eWg72MkyPI4B5nBAZdkWJ6YBl9QGQ82JRc9qmUFV3RY3GSX8MWt+tlb 3Clyr9GHopEOPNDdGR5IO/cH9samotFHjYP9NqOMxqKG8es5Av2mP9qT5erEWsZ0WnqW HvFpf7b7wLsTa20Dx1leAI6JYe3u/eKE9g31kle69Ul/em8f9w0AmgDXwJTo1fu0zwgH +k69/mVsvT6lGjMkbnWiQz4rnCPK8LlWSja5WyPe5fuF5VdQ+DaQ5GcGXEBsdfcwLf0R o0Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728329784; x=1728934584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=POdglfyXRLGHBSOMmhH1eztI7X3yRmS8yAMMjBl8k6g=; b=Hyqhz/8we38MRcEvIqcJYlcwOaVizzYe6WO1GzFL0lAuR9MfprTBRjlbaCsyIWZdYa svDjrTpcojqUp6mRUi6fnGOR/SR+S6TmNv0GffBrv0ymadfwL0PknO65eJX9FeeViFz0 Ik0T8HNCjC/0YjHvPEexEf+1KD2gi3d7pZ+a6ivMMw4zpXn4Ehx5Xm9CT4SBhnkzZfa0 wa2HiE00q8ANUhfqfmXiWPTd2BE8vZLqugP/0vD5TH1jxEDQBRjTR04cQvihDTRKJqkf 277AZV9AxcyysrYr2BLwXmxmDqQvY5pXsGu6cYVldOQY4U6WTS7zF680lb3IXExueAHu Dc6A== X-Forwarded-Encrypted: i=1; AJvYcCWQIvbt8tHVHoJfIYEYWSeLMiDkQdEIMUlnqHlJtt5PU6Pq+jaTPK4tiLKReQs3EeSJNxo=@dpdk.org X-Gm-Message-State: AOJu0Yy8+46yzjibS5tiweGX1OdW2DRqFHlXwcDXUUqwNiqHHte+QuSC 8tKbU9tWBAviM7aXRetygtm0xuDpo+b9sSoZ6TH/k5Y62vtYuWpf4gOq3y+GNEc= X-Google-Smtp-Source: AGHT+IGNHXSrX6PZAkooeu7NAmaGDNMw2Rio7pdKxsH1LNLyOKc3PJ9PoWt5qlAizQhxigPcNhOVuA== X-Received: by 2002:a17:90a:7c03:b0:2e1:9431:af51 with SMTP id 98e67ed59e1d1-2e1e63bda11mr14760548a91.38.1728329783723; Mon, 07 Oct 2024 12:36:23 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e20af4655dsm5871102a91.27.2024.10.07.12.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 12:36:23 -0700 (PDT) Date: Mon, 7 Oct 2024 12:36:19 -0700 From: Stephen Hemminger To: Wisam Monther Cc: Harold Huang , "dev@dpdk.org" Subject: Re: [PATCH] app/flow-perf: replace RTE_BE32/16 with rte_cpu_to_be_32/16 for variables Message-ID: <20241007123619.22413012@hermes.local> In-Reply-To: References: <20230312020009.288-1-baymaxhuang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Tue, 18 Apr 2023 11:32:50 +0000 Wisam Monther wrote: > Hi, > > > > > > > > -----Original Message----- > > > > From: Harold Huang > > > > Sent: Sunday, March 12, 2023 4:00 AM > > > > To: dev@dpdk.org > > > > Cc: Harold Huang ; Wisam Monther > > > > > > > > Subject: [PATCH] app/flow-perf: replace RTE_BE32/16 with > > > > rte_cpu_to_be_32/16 for variables > > > > > > > > In DPDK, the macros RTE_BE32 or RTE_BE16 are usually used for > > > > constant values. And functions such as rte_cpu_to_be_32 or > > > > rte_cpu_to_be_16 are optimized for variables. > > > > > > > > Signed-off-by: Harold Huang > > Acked-by: Wisam Jaddo Make sense. Really doesn't make much difference and I wounder why the macro version is necessary at all. Since the function already compiles to: #define rte_bswap32(x) ((uint32_t)(__builtin_constant_p(x) ? \ rte_constant_bswap32(x) : \ rte_arch_bswap32(x))) Acked-by: Stephen Hemminger