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 38E324587B; Tue, 27 Aug 2024 20:00:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF5AC40DF5; Tue, 27 Aug 2024 20:00:20 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 9E297402AD for ; Tue, 27 Aug 2024 20:00:18 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2020e83eca1so55164365ad.2 for ; Tue, 27 Aug 2024 11:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1724781617; x=1725386417; 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=WiUqrdOgBN/kRhP3fWtQ27z+jch5ZLjrZvQaekSJDVU=; b=QnhQ0gac19csdvMKbkERZCZuGvP9lXWwYzss/Yc+WxUG2fjC68TzWokIAOXJiN0aMz SvWh9gwqq0mRpZGxCd8ZWMhNMRBRad7qY4Bpets+hjsQBuoe8xjm71Ib6cBw22DBZMm5 f8OKkXaLj3hB3+GZke7Y0vOzdD5MAayrzBaWqrD5jMnjtOisbj0PjfwWFSAItU1uYPMO p7RJYGYmFwn+G7mgCAkYY178LTL/95/6Mq9xnirS6yyoBdi81feIQxejOTU6XzZ1N+a0 Rd1XWbnETxFaPAvM5V59sJQjoarAMo8tOYgnil0My8k3HJZmSK9rHgE1EAHbnztq2bF9 sgQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724781617; x=1725386417; 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=WiUqrdOgBN/kRhP3fWtQ27z+jch5ZLjrZvQaekSJDVU=; b=Io/YxkLBXN5awoOO4tqFX71bGtg7wfi4bg59hhgPViqjDIUGd6Shu4zYxeGGJ65gr8 QCCIm1pmQKi+h/9r/AXpZrA3LcuO553czS1FNBgviuXbQILU31MsAxzpEWgTTULH0oOH 56E8Lysv0AmgOG7F4Ij2RPoyn3xxAj4uoiBR8Bxqnr2YlSiDSoho+BS6UuUUbA5ccDbB eDdHAQxumc4vIuC6wouRWmqdjE9C+RfzzlZGyPDbwvWSU/WYjJ/EbBMcDa9XXX/95Rgr 6XWtgh8BKG4jamsM6sn+XX1gtmGNFWcWH3lO06u63J7htVREoVBtq0X7G6UOd3uCWRHw tx2w== X-Forwarded-Encrypted: i=1; AJvYcCUsqrFCqNGwD5z/iidYqVTsijb/r96WG+/rLfW7vr+81yOJwdWmZj+kffaK8W2iM38Wjew=@dpdk.org X-Gm-Message-State: AOJu0YzhVmq9GsSkrEX4drApVFBBfFmkgv3010rGG09OfyBDGsfC8iKy 8+R8B0Lc2skImyjQZ1u0VX09PMNRlPUcP0pFAo754UgSvhp5n8wTFSfnZS+o/Ls= X-Google-Smtp-Source: AGHT+IFdhy4aZJsV+39fbXkAL8/Uc/iA9rqblMrkVgsyz5D7uZk13bqsWsYWcqEnVD9LAC1mfqm85A== X-Received: by 2002:a17:902:e888:b0:201:fd52:d4e7 with SMTP id d9443c01a7336-2039e443abamr191221685ad.2.1724781617306; Tue, 27 Aug 2024 11:00:17 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2038560dc8csm85825205ad.224.2024.08.27.11.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 11:00:17 -0700 (PDT) Date: Tue, 27 Aug 2024 10:39:37 -0700 From: Stephen Hemminger To: "Varghese, Vipin" Cc: ferruh.yigit@amd.com, bruce.richardson@intel.com, konstantin.v.ananyev@yandex.ru, aman.deep.singh@intel.com, dev@dpdk.org Subject: Re: [PATCH v2 1/3] app/testpmd: add register keyword Message-ID: <20240827103924.1d1d2711@hermes.local> In-Reply-To: References: <20240716063724.850-1-vipin.varghese@amd.com> <20240821143857.1972-1-vipin.varghese@amd.com> <20240821143857.1972-2-vipin.varghese@amd.com> <20240821075502.3faa0997@hermes.local> 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, 27 Aug 2024 21:02:00 +0530 "Varghese, Vipin" wrote: > On 8/21/2024 8:25 PM, Stephen Hemminger wrote: > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > > > > On Wed, 21 Aug 2024 20:08:55 +0530 > > Vipin Varghese wrote: > > > >> diff --git a/app/test-pmd/macswap_sse.h b/app/test-pmd/macswap_sse.h > >> index 223f87a539..29088843b7 100644 > >> --- a/app/test-pmd/macswap_sse.h > >> +++ b/app/test-pmd/macswap_sse.h > >> @@ -16,13 +16,13 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb, > >> uint64_t ol_flags; > >> int i; > >> int r; > >> - __m128i addr0, addr1, addr2, addr3; > >> + register __m128i addr0, addr1, addr2, addr3; > > Some compilers treat register as a no-op. Are you sure? Did you check with godbolt. > > Thank you Stephen, I have tested the code changes on Linux using GCC and > Clang compiler. > > In both cases in Linux environment, we have seen the the values loaded > onto register `xmm`. > > ``` > registerconst__m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12, 5, 4, 3, 2, > 1, 0, 11, 10, 9, 8, 7, 6); > vmovdqaxmm0, xmmwordptr[rip+ .LCPI0_0] > > ``` > > Both cases we have performance improvement. > > > Can you please help us understand if we have missed out something? Ok, not sure why compiler would not decide to already use a register here?