From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CAC36A00E6 for ; Thu, 16 May 2019 18:07:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4067C5F44; Thu, 16 May 2019 18:07:02 +0200 (CEST) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 67EB85B40 for ; Thu, 16 May 2019 18:07:00 +0200 (CEST) Received: by mail-pl1-f194.google.com with SMTP id c5so1834085pll.11 for ; Thu, 16 May 2019 09:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cgyJbAnSofFybMkw6n468ApiD41dDr9aTElC4uDPSQc=; b=E3hVszng5vZoJx16OwOOinByZ/Q3CtacvsWZtz2wRoINeH0Xf8IeCsU2xUIfrBBzRt +Te7dhun3bpRj1mV5uUfqtvS8VyeF8xklUM7OnTQw1DQQZ37Ql8ukR76dVc+/RX8554t P6XcO0rb3bmIyjyqMfijhYxlnaGl8uOsVeQqYttNf9atdoaU3HuDQ6qhP7uSCWeJEIxU H4STurxNcl29UhDkAKPeNQdF2Puuxy/WcUyA/CfjgaeskW1oszUTETmu+JH+B9K0SyNK /RJoJGa9mnqH2tcaHGcximC+aM/scMnjQ42rgmTPltU3IPzyJOE/jtHJZ9zohnowcWKm KaGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cgyJbAnSofFybMkw6n468ApiD41dDr9aTElC4uDPSQc=; b=orixo5xvdgmTsnAtoCFa5apTV7nZ0Qv7cwlhhvru7sNDMe7xE6ESP1mGjYg4Pmzr14 brinCUc6IJYT2NVOkWAZKh3jh+08EL+07+uLYXamHb52kN5IQgqde7kzh4ycxKOUqQhe F8XZk/wf26VK3N1kGj4t5MEUiwu1DlXwto4+yE4+ihOCeNmeFDhIoZmm90z+CWJhDWxB 1IdhGdXKn3sJHbFctXOr67m/19mx0Fv11Gj+HW+q/oGPszpR8h9l0Twp5QoHrNgHDMhH g2W+HKb6iplHEu+cB0A5dll6jkzIF+3EgvQZ5IktKYIm6UE0JcMyID12fx9YiNFWkiEd NI+Q== X-Gm-Message-State: APjAAAXGhujDFY0F5wHlB61U8fxqeF9gVe5lIzuGVw/P4p2D/dUD42lM LuKejTlarnjhM49BUuX7mCUKwus5sqE= X-Google-Smtp-Source: APXvYqyQBX3lJBZCjq6yqFLabFj+dijm/UVGJ/0lkjKvRZBEFdT9CjMKQ1Yq4TLYCzAhBwcZwco5EA== X-Received: by 2002:a17:902:7c8f:: with SMTP id y15mr21278723pll.341.1558022819484; Thu, 16 May 2019 09:06:59 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g7sm3684903pgr.46.2019.05.16.09.06.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 May 2019 09:06:59 -0700 (PDT) Date: Thu, 16 May 2019 09:06:52 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: dev@dpdk.org Message-ID: <20190516090652.5ad965f4@hermes.lan> In-Reply-To: <20190516160337.GA632@bricha3-MOBL.ger.corp.intel.com> References: <20190515221952.21959-1-stephen@networkplumber.org> <20190515221952.21959-5-stephen@networkplumber.org> <20190516160337.GA632@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 4/4] net/ether: use bitops to speedup comparison X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On Thu, 16 May 2019 17:03:37 +0100 Bruce Richardson wrote: > On Wed, May 15, 2019 at 03:19:52PM -0700, Stephen Hemminger wrote: > > Using bit operations like or and xor is faster than a loop > > on all architectures. Really just explicit unrolling. > > > > Similar cast to uint16 unaligned is already done in > > other functions here. > > > > Signed-off-by: Stephen Hemminger > > --- > > lib/librte_net/rte_ether.h | 17 +++++++---------- > > 1 file changed, 7 insertions(+), 10 deletions(-) > > > Rather than casting to unaligned values, which gives compiler warnings in > some cases, I believe we should just mark the ethernet addresses as always > being 2-byte aligned and simplify things. [unless we have a good use case > where we won't have 2-byte alignment???]. > > See patch: http://patches.dpdk.org/patch/53482/ > > Regards, > /Bruce I agree. Then you could also remove the unaligned_uint16_t that already exists in rte_ether.h Do you want me to put your patch in my series?