From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0049.outbound.protection.outlook.com [104.47.42.49]) by dpdk.org (Postfix) with ESMTP id AD5D12C06 for ; Mon, 4 Jul 2016 10:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qScb7Z+vG6rADU+4XcRPY52mUNZmimRY3e0XEGocBpk=; b=jaiFN9Ul/6S+TmwD2w1UvuuIFhzNFBJNm1386wKHstaVDFMfUOVQUKFXvMjE+SftT8MTVz7mgoC591+qxPqIOtCN5OqFBc7KmFeoVUl5+MmjlDZOI5Joowv1KHIQDyDJQH/Vev5F5SLylc7txecppBwNaeWtfnaPQnq70q7QeB8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) with Microsoft SMTP Server (TLS) id 15.1.534.14; Mon, 4 Jul 2016 08:38:33 +0000 Date: Mon, 4 Jul 2016 14:08:14 +0530 From: Jerin Jacob To: Yuanhan Liu CC: , , , , Message-ID: <20160704083813.GB12596@localhost.localdomain> 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> <20160704074247.GW2831@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160704074247.GW2831@yliu-dev.sh.intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0006.INDPRD01.PROD.OUTLOOK.COM (10.164.137.13) To BY1PR0701MB1721.namprd07.prod.outlook.com (10.162.111.140) X-MS-Office365-Filtering-Correlation-Id: 1376454b-f102-47f4-a38f-08d3a3e696e8 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 2:Ojf5gEOViLqPqNtdjGolNyizi3Ux+9WFXQzHCLjA4aMr70RDrL4XZexAhOoj1qlkloyTZLt0BAH05fUFG4oVxuLdbFu7EO2z3PlLe+hh9nx9ESQ5LYL28ksI7Zks5K3wtUSC07OXkoXuQYPvm/v1CFdelaYwwO904z1VT10QqhMIm6lSHHYlGA3A1i00xKPH; 3:WYuyC9HRFraaKChEv7RTheADQHIICRiHZB2NUduxkQUtd0WWIKpE0fp0VrCxbB0D3wFZ24Yejbaa0D74F8wuY4f8NnvOR1NdUQv22jKHe/N9kQOn9e+QzXYYjvOvhCLH X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 25:d7S1vKDGhR2d7Y7XC9KUWmMpP/a02CgLGY5wADpVMPzmZlXpgHANnfvam+GgEM+yPHGZOQgQchnUFuwgllXhkf8zlfOdwyonkHQ6lEMQ+q7GkdSygzxC2kDtuf1eHKQQlwvgyK6ROXCY6lpRB0jmvGqDazlaeTNYxf5ZeYfpCHKz14Ww+5OyVlon5wKCUyg79goksyKwhbBxhF5Gq0xGvsMC5UFLoZRknfgDKo1Or7pOHkVTbzAvWpSwwmCv00xRuWJbeOvOwzyk4mu81cvNCh1GuHGL7qNmRyACVvXME28CSeLEFuYL+OwNYm2XVl6t3hNnXAczqpzh0p95GDMq2kU1dxEu6O5JwdLD1jeZmXRKhO0yfpJIGVHKjoltysMc8G5eSVygGC69Nl/uUiMG5v6XX4r5D/R4ngfybsEHN1lKXHlG4+o93zWu/G3Xh8bZjCEJRpUvKOpkwaKAnneyU2Xl2FifummRuNy4/06jsmcHLAkZRFfdCiHHxUM+NVIDkWDkfJbGEZoGj1wBuVTk4BatqrYUE1yJAxlq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n2WsZrvdiLM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:BY1PR0701MB1721; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1721; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1721; 4:47DwdrREFstWsFYQse2OGiMnxEkto88qOu96N/iOmeKyb3lanc1LD4eIAlvuqbC0Nl/ua3fXhsOMvJBb7PrjK9Tj39lPCAr13j9/Ug55IQZwOzt9+k+OFYlLRCH4kvGUZMihJZqFQEZz2cUWeg5VXQs4xgyF35giwp4ziOnDUFQhkRtaxRPBqhgXdSAEM0+CPES05MSmKc3D2ZYT1AYsWkUH5hZdhwiWBEifcRnZVjMib2iunWT7+5PZFe9hLhEjVxug+6ithQlFPwan8SEIDRTD0J+eDBqZ1RRM+WZW9xkIfhqtG0NqLjC2fFJE2anpJdsuX5dOC1MM0VO/BdyGpN5iFE26AFFbcpjZZfrUxnWh/0M4/kvEykm7e2zcxTBk X-Forefront-PRVS: 0993689CD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(24454002)(81166006)(54356999)(76176999)(2950100001)(105586002)(97756001)(9686002)(586003)(50986999)(46406003)(61506002)(8676002)(5009440100003)(81156014)(92566002)(106356001)(93886004)(33656002)(83506001)(77096005)(4001350100001)(110136002)(42186005)(189998001)(50466002)(1076002)(101416001)(47776003)(66066001)(68736007)(97736004)(2906002)(7846002)(305945005)(7736002)(6116002)(4326007)(3846002)(23726003)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1721; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-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SDvLtG6F24DsTBoO11xH40t5VCXTlpVQowC+fxs8nQe7GDluSju4faRrK+3Xh8xmOfBztbEwajdLBUNe4hDyVYeBTcriqWvWN9GE/3Y9pOcq+L8Ks+6Juf5gLOwk/lyawmpPOYuJpiajckT55dBVMo8mNTCFwn3Q1WpDPsKasuXo03FLAjaQHPeieV0+taq5rat3Eq2EoJ93Jiqoj8BMJ6B6yUTt633sk SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2016 08:38:33.8769 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 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 08:38:38 -0000 On Mon, Jul 04, 2016 at 03:42:47PM +0800, Yuanhan Liu wrote: > 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. OK. Will fix it in next revision. > > > +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)) { OK. Will fix it in next revision. > > --yliu