From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0078.outbound.protection.outlook.com [104.47.32.78]) by dpdk.org (Postfix) with ESMTP id 692BB3F9 for ; Mon, 4 Jul 2016 10:36:49 +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=j9SXYIWp2t+Hco2Rh04e8ApAta6LsXbTBJdTBd+eQZY=; b=aIJyd8tqDi3kxhH+a1m3yeLFNfMPMjgoYBN0p3y37yOeNJZNcJQ1tYWzFpVaunlgQir4X3FOwJkEnffcIHN4tmCuKV4Wr17JCGiXUIvqu+PIkrMNYhsoALwqnEuyjawFLOPWznVY5T7jREUQ4apNW5xItc3SIK1rKg52lWfkCuM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by CY1PR0701MB1728.namprd07.prod.outlook.com (10.163.21.142) with Microsoft SMTP Server (TLS) id 15.1.528.16; Mon, 4 Jul 2016 08:36:45 +0000 Date: Mon, 4 Jul 2016 14:06:27 +0530 From: Jerin Jacob To: Yuanhan Liu CC: , , , , Message-ID: <20160704083626.GA12596@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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160704073648.GV2831@yliu-dev.sh.intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0062.INDPRD01.PROD.OUTLOOK.COM (10.164.136.162) To CY1PR0701MB1728.namprd07.prod.outlook.com (10.163.21.142) X-MS-Office365-Filtering-Correlation-Id: cb958345-d600-4596-a8cb-08d3a3e65672 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1728; 2:FeA3Lqn/+kzV/QlM1DKac6WShyVEziXOxTalwZtM1sHVjO3EQ5t9f+JaJVqSkJSJ8OO01N09NAQ1tNnwwwbQgDIQ2m3EblXPf++tmQ7F4sEENlZ+WQQI72qLRRvVT0OHu51Q0EO4VIXoE64Z1TlZiGVEh1KDRJy0Qe6DogAfuxsPUnjFYvTnOvBwGNIodgYM; 3:gVkTKIR3K4PyyhTGJ8In0LyxQR+9tEOHGrJS5AfbJZMxc1x+8xIV9gdhY+ZFB2yJOG6ESrWjKvxImQ5Drcxm3NAMhalrTkWemnbhKjSgCX5j41kpRu2GMoXacpXoQEpZ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1728; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1728; 25:KXLWf47x23Vepn7RCLRM5NugzZa/BeqpPcXMP1BM0Kv2RXYICWUTQ94pEapp4esEE8VjamrRBVXhlucTamDTnveCpRLgRUzgt4Ie9XT+hmzWqjDKCb1VTVTL5J/BfJgYZ63t7qKG6IpNT2RGpqY+SA+hZK9jgX5sBizpsIN1wlrZ2Aeu6sX4m0znH07gfKrVq3xMrVTrW4D6PEqN2GB4h7cccdpcUvfss41rV1p+dCaO2yVvmJw2k/Lt3caMu/wnN7LYwpuc7Md/1PffSPBioE1ayn58IU5DDzkqzJHid54imsRvypvpaJ6LGRcoyjZsnnnCHK7Q7YE0cdTaSako4KeGQE7ao+5wOHDye/XnDR8SZyGgWHuExcOK5P6ey9wpVUKEEu/rWv36cH+DwPGLdqC6EI4kIG7yBXOsZ3I8otKWNwnCpMsBIshlISZSi8nwJHYx8HytVTQCqxP3jt/z/pbCIqW9HE97fhukmW/Sqoy1jODd+OAbd5J2GOYUNMhqUU02fCv9QSUDbPUtQ+Wb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kpEwBSM311FgTrKNbULHe+K0= 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:CY1PR0701MB1728; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1728; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1728; 4:xC0059Og+66jQPQT+j+xI0M0uAGs/zuCtqU2kn9IDOHpZbjEMAVvaQc9PXbrXfHigiMOKRAIc0vIJWFHbYh0B8oPjMTDS148agUas3CCZ3/hasl8aCk1nxlHVnRW34extIv5lFFKxlrmisIDHaSePVHLS9kk6cC5H7d32wK2WQs7KFiF13rB1z+QI0/U+CBhphVwhbScQcvj+JrqRzyyOvpv9jOM7VuEi2CE7zIIk7ovHHHnMjiCg3txAAL5/poWJz0EV3+aFUGniZo3QWMnHunbCIQ7vdC2B8CjHQqJ9dsvN1tfSOIlgN7tDf8L/dWPmMT9vHzZLNltPNR4sPKZkbykVylAAShdeRZrPr1S48HEHID2vgT+stXG5EsRagAs X-Forefront-PRVS: 0993689CD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(24454002)(54356999)(81166006)(81156014)(42186005)(76176999)(4001350100001)(50466002)(4326007)(7846002)(189998001)(97736004)(101416001)(7736002)(77096005)(305945005)(110136002)(83506001)(8676002)(33656002)(66066001)(586003)(105586002)(2906002)(92566002)(9686002)(47776003)(2950100001)(68736007)(61506002)(93886004)(106356001)(97756001)(46406003)(6116002)(5009440100003)(50986999)(3846002)(23726003)(1076002)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1728; 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: =?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rHLiHJYTTRnXzQyqfaOuHn1B?= =?us-ascii?Q?wtolilx9KAuZZidmwUiJ0mRnoeM/gZmDGPwjP7WNAdeI0MnGDJUR6nvPnDXU?= =?us-ascii?Q?DX7GEIANCc0SBk64vDdTf7OYTgxv+K+Zb822cp6TuTg1hThaUOEozhb6xAXi?= =?us-ascii?Q?2o0STfLd+B26+XGbnpTvvstNaK8EpjvD+LLLBHG9Km2kKlgp1egRCozgMsYy?= =?us-ascii?Q?mWX8KlgZfLkA78Wu9UI/KO2lZCI7qbFM3HZYIlhG1DYpSZuUmkuaGNtRRy9x?= =?us-ascii?Q?Kv9WLAmsk8pL1Tfm454SzdOuiLc9UT4xYpPF4h9gUa0R41gEI7im55r5RmPu?= =?us-ascii?Q?A2328OesZHZCajmg=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1728; 6:72U0ebSS9C7izWhFD26V064R34DZdVu+N9ga8sOyOebnnggSZugeiKKW/ukvF6qgko0hhLEOgqeEWOFxmymcpklfJjQwDMAiLJ3ym/1kUmJtxjsJJ574fxd1rK7CMTIcuOluIfzT0PNubV+qfaRhd6s2my9LsNXIW20tH3EUltaTJWsNQNBOX90JV9WHa9f373WG6p/0KLnjDEBaP/tVZLuhH/KF/RcLqZSoffo2WKzNEsoroEJsQuVdy/IXnxNVJBCHocPJnPV0BXDh3ywIs+3WHv0cD8k8mAIgP8p9ASA=; 5:ma9frBVny3Be2ry0iQP0GMk4E6nFhFoeaseDH8WwQftEtCkqSzGTs7rgrQJwqGjgiOfDzUBOW5UPAHbAKDr762wTga5I4e9p3h8oDa95RD7BBDoQAi0dIzrjd1T0FF+YAlFPYl9LPI9fJLfEPmvnqQ==; 24:RxiujzrsvyqCBFY854AgKwq4BHkfd0E5co5JNYA5o6amX4o4B9l6HhEyu8c1Z+oYeeEVyCohXLRrrOCQS0cXu0TnfOa5chr4SnOIz4xC4eg=; 7:X4laKboshCkMSLFB/hehip9jHkoTxNystWnfImtplBy/OOkRroMPycndxXU52q+F3cw3IMgdOLGbc2WbhsUC6RAZ0kGnaP1/7212tXILQxi1i4jFkFmNRMchVgGIFlmnei7XyBiZ30WSpbHOIavfy2RjLN2r21y5rI70QytzN4rjOuHKQP+N1Qe7ouLKA6DInUUjjk93tqXuBgyAYX7i8FzDY6yDe4RobJv5JyRbnRiPAbbzi5AVQrbWkQ1xmfkH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2016 08:36:45.5144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1728 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 08:36:49 -0000 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. > > --yliu