From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 29AE7379E for ; Mon, 4 Jul 2016 09:41:36 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 04 Jul 2016 00:41:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,573,1459839600"; d="scan'208";a="988589326" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 04 Jul 2016 00:41:35 -0700 Date: Mon, 4 Jul 2016 15:42:47 +0800 From: Yuanhan Liu To: Jerin Jacob Cc: dev@dpdk.org, thomas.monjalon@6wind.com, bruce.richardson@intel.com, jianbo.liu@linaro.org, huawei.xie@intel.com Message-ID: <20160704074247.GW2831@yliu-dev.sh.intel.com> References: <1467028448-8914-1-git-send-email-jerin.jacob@caviumnetworks.com> <1467371814-26754-1-git-send-email-jerin.jacob@caviumnetworks.com> <1467371814-26754-3-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467371814-26754-3-git-send-email-jerin.jacob@caviumnetworks.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 2/3] virtio: move SSE based Rx implementation to separate file 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: Mon, 04 Jul 2016 07:41:36 -0000 On Fri, Jul 01, 2016 at 04:46:37PM +0530, Jerin Jacob wrote: > * Introduced cpuflag based run-time detection to > select the SSE based simple Rx handler > * Split out SSE instruction based virtio simple Rx > implementation to a separate file As your commit log says, it does two things, therefore, I'd suggest you to do it in two patches, with each just does one thing as you mentioned. > +static void > +virtio_update_rxtx_handler(struct rte_eth_dev *dev, > + const struct rte_eth_txconf *tx_conf) > +{ > + uint8_t use_simple_rxtx = 0; > + struct virtio_hw *hw = dev->data->dev_private; > + > +#if defined RTE_ARCH_X86 > + if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE3)) > + use_simple_rxtx = 1; > +#endif > + /* Use simple rx/tx func if single segment and no offloads */ > + if (use_simple_rxtx && > + (tx_conf->txq_flags & VIRTIO_SIMPLE_FLAGS) == VIRTIO_SIMPLE_FLAGS && > + !vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) { The alignment here is not consistent, something like following is what I'd suggest: if (use_simple_rxtx && (tx_conf->txq_flags & VIRTIO_SIMPLE_FLAGS) == VIRTIO_SIMPLE_FLAGS && !vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) { --yliu