From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0055.outbound.protection.outlook.com [104.47.33.55]) by dpdk.org (Postfix) with ESMTP id 51B952A5D for ; Mon, 4 Jul 2016 11:08:15 +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=qKByYmMT9Mw1mGrxw3Af0VKHevRSVD0cvXGzX63BBa8=; b=SMSTDuF7K20ksu/LbcdQ0AZRkx1+uCqCczhiOnB/9JlmADQb7Hra8gIepjao3o9GzE87efs8xREu4jpBsuaCoAt8SySL0Asziyck9IcNt6j0B3Sx4NGd4x2IaS7H2gXzSJ9YubkHQ5yLiWfPf2ktla1q2OQ6YJ5E22TVM/8eh0U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (TLS) id 15.1.534.14; Mon, 4 Jul 2016 09:08:11 +0000 Date: Mon, 4 Jul 2016 14:37:55 +0530 From: Jerin Jacob To: Yuanhan Liu CC: , , , , Message-ID: <20160704090754.GD12596@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-2-git-send-email-jerin.jacob@caviumnetworks.com> <20160704073648.GV2831@yliu-dev.sh.intel.com> <20160704083626.GA12596@localhost.localdomain> <20160704084232.GY2831@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160704084232.GY2831@yliu-dev.sh.intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0015.INDPRD01.PROD.OUTLOOK.COM (10.164.137.22) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: e310c41c-20a7-4621-4d6d-08d3a3eabaf1 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 2:RaLhahSXvuy2SMn9cvv0gIHTXUiLk27ECCyYk0cigsQSVQurnWsXO5kPBzrpygpenqnefCJeMPQEMpBJFb+ypYvk0Ub2KYXF/1FtVB9Jb/3nFMpJJ/tM5TMA+JUKoZ7GmHAt+1XkvkOIS4xsTgsUiTFW+YoG3CFX+XPgwhZYEiIM9dpSbGYQR9/zbxceMI4t; 3:vCZKhnYZmtftIz5OBfwOuG4iXrookvRvY5drA0+MNFZJi6fAQauHoS/Nw1WWTkvqiBnnhAnS4QH3/wR98yuw6Bf9ys1bJcHPWKKnyfUD8w3ECgAy1FO/v2eUl4MIkbB5; 25:UIXROBe/0d/5bxdW6NdS6NgGrlFecmPLBUxuMH0VumLzaQtsPa1L86K6wWv8u0u1CthOqAJqDzI53Ohp2hZj+CI6MQpVSa/A3zJcVl04tfoXI9bCLExjvgR/eRkcebUqn4MQgryrvxDsVDF8bomgoqum2sAKxpay54t/zeAs1n1mrJcok8aFxFGZOuuP25XZJTTb+oM/MloL96/uQarXHG+SnZjYRiNOQQrFZBjUQgYfeNIpHseCce3Yy/gWKwKMDfPv/nN5Ovvd1tmP/BxRMdmWYRqRRcqt6FQlEAhmmLB5k7y2fu5ySZAFXblKL+yckP76aPVUE3ZtKq4ju3Cd70JpN79zDNPOG6ShtnUidF5ASgjTvv76jBA9QTGLtS6rdSX3kJFnLBbQZImYaf9n10wjlcjJObogxa+foCDYvEA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:8Lj2c3I7r+nokWcPcXqVvfS6H4DeY+UatZjtIi1Rq7b87wz96PAQBlL6XJjjmJWRoCG12/D3ds4PwxvCfqkkTBa//ZG1sGglFmQkVob6VEroQoGKk+q2hxQHjLEkjJN7JPS0/92SRq5oDOGa/vkQY0aC0+Bi6NHBqKkBSdB6SfKAafKtOTg+nIz5B0vg8lvf2H5/KVKl3MfrQV6dzyDSpw==; 20:LBv16Vd7tz8XhnK+BF4qekpQkFC0raSBQPZO+Jq9gaTuiNCnPixlhxNFSQaLH70D49Z/QarBJHkZCcJ0uhxORMG5zNC3lqE/moIxWz50pQ75pJr9J+rozVHLYrhavm8bute21qT+LHVGLLbDplxh5L3lyvl4juiAd0u1zNdmLYwK+PbWujoW+41u+CqyRBcBCmFAi/10QflRswZGjsZBnB+FGo7bfGjDN0vPH2tOvnrgLRg/+i1WRKILwXeHF4063Lg2GPCy2XHmy5H27E4E7eKSYYGwZZXxXKv/TwJBvahVg0lkHFKegYVFprI68r3kCh+TJq1sWJcqCysN8vIcIeEHyrPKYqivsAEbPlWyIiGkFy1M1KVyn2C2xBZSSXvJMUuC0vCKXmIHVDYvkQLkAv/QU3nKKplcBM6KFEu6B8Fbc1Vp5wbWcp8M/DKAWysj4USDzQTIgAS9YbKMPNSebQinq8JgORfVfFyNnjKjv22A22KiyUY9vSo3xHVEb4feToaGFdHsIqFPd+KgL98d4wUSIFeJ0P9wpbJFFlKWgNo/WDUbUcL3qJ6Xgabt/X+dsRn0S+DWHvOfesFNyB5SW46eddf6mOQqk/Rv1nX4s4s= 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:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:C/YxTGfcQTnA5mh8I2x+y6Us8Vg1X2SN63YhUfTMwPIZQKbdyfq31g61odmoUuTQeU3nio4pcukiWmKxMH4tRX3m0f1xLaAZSJgNY+VUBJLg7sn1W3F9Lpd0sS9ZW7v4mBdSsVyCIVmqRQ3KmmeHXSXrfGKfxK0PofdcV4Ao1dFxNC9+DZ6UrivA37osdeiZOieTcKsPjuvT6+GMfD4gsOdKrvpTUxrRJ5xkq17Z2u+icW0exd+NRmdQokk76ERFOuyZGFiJFOQCkXNEA9XAEKbDXohMvOlkAwNajbcDO8NtcJ6ukxrvDMT+TrrcToLcaCmoY/RQUoOeRYLt6mgfWzgTu3d1ybTiybOgZiDGYoIsmgrY50nm3hVX24y+laBU X-Forefront-PRVS: 0993689CD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(24454002)(189002)(199003)(6116002)(68736007)(3846002)(1076002)(586003)(23726003)(66066001)(81156014)(8676002)(81166006)(5009440100003)(105586002)(106356001)(46406003)(110136002)(83506001)(189998001)(4326007)(4001350100001)(97736004)(2906002)(2950100001)(101416001)(61506002)(77096005)(9686002)(7846002)(47776003)(97756001)(93886004)(42186005)(92566002)(76176999)(33656002)(305945005)(7736002)(50466002)(50986999)(54356999)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:nuvLIRfrj9Xb+hPJtOUxWRbx2pbM/k8JSM1KBLP?= =?us-ascii?Q?qyzXsgNVnGGu/6Tx0TqpoKNelRmSk0zXtmgX39ReduOtGn8DqKBbr/TqoBe7?= =?us-ascii?Q?ye7bwGQtMlmzrWuCx4hQVx7fSteVO93hdby+KYPOZKpF5MNGArmo4VL5b5Tj?= =?us-ascii?Q?DHe6I72DEwXChYCRXPd3VnerrxfGuaZaJoXH/lcaj/pN/pUmDxHmvnAivI2i?= =?us-ascii?Q?4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yBS4EF/5?= =?us-ascii?Q?4mZ1/szQRIk8o99PDX+0BPBjHIRhPw4m6pwbbsUEOm4YhSKewk48uSqs3OWY?= =?us-ascii?Q?n8imK3/QlvUcC4Ug=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 6:pHqvONaGjjNzgYIcKGddBYp8U4fTG4eN2kDF5ue0KXulqSPPvWIsIexbLeM5I3w0gCfWOcSBE9CbobnHG3/CdZ8qkPwZvYbl4kKUFxePyhcGYEfLTod2XvbbJh8sjwmEmPH/iKgnhmO46DZZKNqDeuH+jErwrGs5qb11Rj/06u/bk/SaGbMeVa/kq0zHMtTehiBZfMFaTB2lXjs0EFvFzCVxC7KtOlBj2avOs7pomXwegfy1pcdRWXrahwBpbOxKzlTSFFvu5iqzWxgNPDbnuYDPb8w2mRMMpQKBWeRug60=; 5:0nH/qDuZzJSDNr93K73DLoQ21YL1KIbpSRGUY6Xp12JNkbecRjmaUvP1EEVkPJkkmSog8G8Pxd/AbWiPNUHthxO/xpWWe84F+QssH9rrx3UfWLCYd6UkZ0Jf94018KkrdKebyUdub2orKwvKy/YgIg==; 24:Dzo74r/VW09mZxI2AsZ868447yJsTbGKI6F/hJjIaMW6J2wS2EeGd2/JNZ/EQ1/Yh0veJsBGmsSi/Kzrr5xk+AT9MNeD5px1nNeW2W10Nu0=; 7:lg7rkhUVG466rNnwCxWAzA37LFblj20ldNOduhBS0s+qIiLEhl0MlevWT5VELCPL0JjxwMDnC+aRJoKPlb5TsigntQjRf+hsMKfNkfhkZya7AG8QjLoxwVKEf9v6Pl94HiGp2OnJM1qk/n95wo2/TDyndZbkn64pmWN7DG/bfelG5Dv4GX3blYq+2gNGIEkykLuySg3UbrIZXbHCEoiG87Mp1YONnGjdfR4Rj+zIBQYhSwBSoLx9EIOkQZOEV/fw SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2016 09:08:11.8049 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH v2 1/3] virtio: conditional compilation cleanup 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 09:08:15 -0000 On Mon, Jul 04, 2016 at 04:42:32PM +0800, Yuanhan Liu wrote: > On Mon, Jul 04, 2016 at 02:06:27PM +0530, Jerin Jacob wrote: > > On Mon, Jul 04, 2016 at 03:36:48PM +0800, Yuanhan Liu wrote: > > > On Fri, Jul 01, 2016 at 04:46:36PM +0530, Jerin Jacob wrote: > > > > @@ -494,9 +486,6 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, > > > > { > > > > uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX; > > > > > > > > -#ifdef RTE_MACHINE_CPUFLAG_SSSE3 > > > > - struct virtio_hw *hw = dev->data->dev_private; > > > > -#endif > > > > struct virtnet_tx *txvq; > > > > struct virtqueue *vq; > > > > uint16_t tx_free_thresh; > > > > @@ -511,13 +500,14 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, > > > > } > > > > > > > > #ifdef RTE_MACHINE_CPUFLAG_SSSE3 > > > > + struct virtio_hw *hw = dev->data->dev_private; > > > > > > I'd suggest to move above declaration to ... > > > > > > > /* Use simple rx/tx func if single segment and no offloads */ > > > > if ((tx_conf->txq_flags & VIRTIO_SIMPLE_FLAGS) == VIRTIO_SIMPLE_FLAGS && > > > > !vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) { > > > > > > here: we should try to avoid declaring vars in the middle of a code block. > > > > Next patch in this series, moving all rxtx handler selection code to > > separate function(virtio_update_rxtx_handler()) where declaration comes > > as first line in the function.i.e the comment is taken care of in the > > series. > > Yes, I saw that. But in principle, each patch is atomic: it's not a > good idea/practice to introduce issues in path A and then fix it in > path B. In my view it was not an issue as I was removing all possible conditional compilation flag. If I were to move the declaration to top then another conditional compilation RTE_MACHINE_CPUFLAG_SSSE3 flag I need to add around declaring the variable. Hope this justifies the reason. If you are not convinced then let me know, if will add the change in next revision. Jerin > > --yliu