From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.161.174]) by dpdk.org (Postfix) with ESMTP id E23452A1A for ; Tue, 26 Apr 2016 10:23:11 +0200 (CEST) Received: by mail-yw0-f174.google.com with SMTP id g133so6488333ywb.2 for ; Tue, 26 Apr 2016 01:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=lSK1aE2AUouNVyV8nVHbalqqxZQZ1QgUvjuGk4kxhNo=; b=bw920KMMu+FHUnFswxRSt3oV4031RA9M7qzSRQQUzJ7ADg+KKzwpdShTQ1MpK+Ecyd 2assI64jJp7nR2Lwi0fYuyUDAtknTbr1pxSpTfOC7Sv5WDYQ3f4DvkS5Ea+5FMj9aad0 ykyooaPK+OWiyzlP48weMvI+MDaEtcivab9tY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=lSK1aE2AUouNVyV8nVHbalqqxZQZ1QgUvjuGk4kxhNo=; b=RU40mfbFm3IYpjM4IlTECyNeakbPWrvbYAs8YmDD1Ni6j+7/O6J0/FDGzILQ6nT7x7 XHN+2enlV1KWjsyYVINX70T6aUILv0Avspo/2QQbIqR2TCrTZO0Sjk1C7hjMWF+kRkKj /qltud5zS5Vq6F79kztn9ZCBXM7TnCdaVKZAibcJ88bFBB+EUjPYPqMBeYIwSWLQlgl8 kUhoa0boBoiqYmuSnTYvhrMqytDgcIVSDng2fzJt/adv8nq6OyLbVebNtFB24/qtz9TB 8K0LA+Fvd4a44q48BI692uP+L6gxp2dGUd6YGHl3UOeJjmwtxhFVBo5+gUEvyp5GtfXD qPiQ== X-Gm-Message-State: AOPr4FUVBrSK0IsyHKFTm3XyGFX6MA743S64A454cVIVhp2P1QQY7ulRpr2d0JMhMgCCNtZmf2fIUu+B6DKaEbm2 MIME-Version: 1.0 X-Received: by 10.129.159.197 with SMTP id w188mr665924ywg.233.1461658991298; Tue, 26 Apr 2016 01:23:11 -0700 (PDT) Received: by 10.37.202.67 with HTTP; Tue, 26 Apr 2016 01:23:11 -0700 (PDT) In-Reply-To: <20160425163555.GA11448@bricha3-MOBL3> References: <1461159902-16680-1-git-send-email-jianbo.liu@linaro.org> <20160425163555.GA11448@bricha3-MOBL3> Date: Tue, 26 Apr 2016 16:23:11 +0800 Message-ID: From: Jianbo Liu To: Bruce Richardson Cc: dev@dpdk.org, Jerin Jacob , "Zhang, Helin" , "Ananyev, Konstantin" Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH 1/4] ixgbe: rearrange vector PMD code for x86 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 08:23:12 -0000 On 26 April 2016 at 00:35, Bruce Richardson wrote: > On Wed, Apr 20, 2016 at 09:44:59PM +0800, Jianbo Liu wrote: >> move SSE-dependent code to new file "ixgbe_rxtx_vec_sse.h" >> >> Signed-off-by: Jianbo Liu >> --- >> drivers/net/ixgbe/ixgbe_rxtx_vec.c | 369 +---------------------------- >> drivers/net/ixgbe/ixgbe_rxtx_vec_sse.h | 408 +++++++++++++++++++++++++++++++++ >> 2 files changed, 409 insertions(+), 368 deletions(-) >> create mode 100644 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.h >> > Hi Jianbo, > > functionally I've given this a quick sanity test and see no issues with performance > on the x86(_64) side of things. > > However, in terms of how the driver split in done in this set of patches, I think > it might be better to reverse what goes in the header files and in the .c files. > Rather than having the common code in the .c file and the arch specific code in > the header file, I think the common code should be in a header file and the > arch specific code in a .c file. > > The reason for this is the need for possibly different compiler flags to be > passed for the vector drivers from the makefile e.g. as is done by my patchset > for i40e [http://dpdk.org/dev/patchwork/patch/12082/]. This would be a bit more > awkward if that one C file is shared by multiple architectures, as we'd have > architecture specific branches in both makefile and C file. As well as that, > the possibility exists of multiple vector drivers for one architecture, e.g. > an SSE and AVX driver for x86_64 with selection of code patch at runtime as done > by the ACL library. In that case, you want multiple vector code paths compiled > with different CFLAG overrides, which necessitates different C files. > > Therefore, I think using a C file per instruction set/architecture, rather than > a header file per arch may be more expandable in future. > Good suggestion. I will submit v2 later. Thanks! Jianbo