From patchwork Thu Nov 23 13:48:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 840787 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="LNH6kJX7"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yjLLK4GVvz9s72 for ; Fri, 24 Nov 2017 00:50:17 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 10ED0BAD; Thu, 23 Nov 2017 13:48:48 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 0793CBAC for ; Thu, 23 Nov 2017 13:48:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8B1BA4DE for ; Thu, 23 Nov 2017 13:48:46 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20171123134844euoutp02d6315046556a00b6b4b9dfd26779253b~5uyaVTTJp1041710417euoutp02e; Thu, 23 Nov 2017 13:48:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20171123134844euoutp02d6315046556a00b6b4b9dfd26779253b~5uyaVTTJp1041710417euoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1511444924; bh=AZsoa1zhF5qOb6EU3G8cjZGGmzde5IpT8pgURQQTKLg=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=LNH6kJX7h9Ccb4Xp/GrRFQYN+PKL+GraRL+pfeI6w/GTORoKW2Zm2A5EcM3BzcLkP h1MhsDKGg7OQIIxxvhy3fGtbGcFuXZm1zSlTfy3KYDcdneecCH/sL7gpsbOfquzACa EhSA+Y0qcdDlpn+Q9+lR5zaiyH7Np+BuRJb8G4Hs= Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171123134843eucas1p236df781e63a5179e05aab477af8959dc~5uyZkTgdx0548805488eucas1p2u; Thu, 23 Nov 2017 13:48:43 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id A9.4A.12576.BB1D61A5; Thu, 23 Nov 2017 13:48:43 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20171123134842eucas1p1e1a9bf2dddbac5afdc9eb8f075c90409~5uyYhL7wZ3191431914eucas1p1r; Thu, 23 Nov 2017 13:48:42 +0000 (GMT) X-AuditID: cbfec7ef-f79ee6d000003120-bb-5a16d1bbe8f8 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5D.A9.18832.AB1D61A5; Thu, 23 Nov 2017 13:48:42 +0000 (GMT) Received: from imaximets.rnd.samsung.ru ([106.109.129.180]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OZV001ABICSNH10@eusync2.samsung.com>; Thu, 23 Nov 2017 13:48:42 +0000 (GMT) From: Ilya Maximets To: ovs-dev@openvswitch.org, Ian Stokes Date: Thu, 23 Nov 2017 16:48:26 +0300 Message-id: <1511444906-26438-3-git-send-email-i.maximets@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1511444906-26438-1-git-send-email-i.maximets@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsWy7djP87q7L4pFGcxbJGAx7fNtdosr7T/Z LTY+PMtqMffTc0YHFo/Fe14yeTy7+Z/Ro2/LKsYA5igum5TUnMyy1CJ9uwSujO9XVzAXXOaq eHF0MksD4yKOLkZODgkBE4mdS7axQ9hiEhfurWcDsYUEljFKvP2t2cXIBWR/ZpR4+mkFO0zD rQkHmSESQEUnWz6yQHQ0M0lsPOEBYrMJ6EicWn2EEcQWEbCTmLaqiQnEZhYIltix/hjYBmGB UInp6x4zg9gsAqoS647dB7N5BdwkOpftZoVYJidx81wnWJxTwF1iw5d1rCCLJQReskp86lsN VeQicWz/M2YIW1ji1fEtUJfKSHR2HGSCaGhmlGhYdYkRwpnAKPGleTkTRJW9xKmbV6HO45OY tG060CQOoDivREebEITpITFjqQZEtaPE7QX97BDfz2KUaJp+jG0Co/QCRoZVjCKppcW56anF hnrFibnFpXnpesn5uZsYgZF3+t/x9zsYnzaHHGIU4GBU4uFlmC8aJcSaWFZcmXuIUYKDWUmE V7xdLEqINyWxsiq1KD++qDQntfgQozQHi5I4r21UW6SQQHpiSWp2ampBahFMlomDU6qBUcWt /qmr9fXNZWxFxuq6xnLlt+Vbzkoxvlxyo/BX+q2+38/Fv/udbnt3P/2Mxu2DL/59apyz41bY rvJfzx6HvukROqWivuu9/87zWXuCPgvsje3977/8mEv7EWmNWUHlCo2MAYJXpsc5LHJtK9LK e8zXHxr5sTXCTinykATP7ms1qjJLPj9cosRSnJFoqMVcVJwIAO3h5TC4AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFJMWRmVeSWpSXmKPExsVy+t/xK7q7LopFGVzdIW4x7fNtdosr7T/Z LTY+PMtqMffTc0YHFo/Fe14yeTy7+Z/Ro2/LKsYA5igum5TUnMyy1CJ9uwSujO9XVzAXXOaq eHF0MksD4yKOLkZODgkBE4lbEw4yQ9hiEhfurWfrYuTiEBJYwigxvfsQE4TTyiRxp2MiE0gV m4COxKnVRxhBbBEBO4lpq5rA4swCwRIHj/0CiwsLhEpMX/cYbCqLgKrEumP3wWxeATeJzmW7 WSG2yUncPNcJFucUcJfY8GUdUJwDaJmbxN2d3hMYeRcwMqxiFEktLc5Nzy021CtOzC0uzUvX S87P3cQIDJFtx35u3sF4aWPwIUYBDkYlHl6G+aJRQqyJZcWVuYcYJTiYlUR4xdvFooR4UxIr q1KL8uOLSnNSiw8xSnOwKInz9u5ZHSkkkJ5YkpqdmlqQWgSTZeLglGpg1AjcKcwctkzP9p/I HN/dS3axRhxknFOxZvmfKYXrhELaWPKd6vsOPTjnXVJ8uqZnqqOQ8aP/R5fMrlmicEpze2i+ HucZ0T77x1J5UVXbtJ79nbDG8+vMe6uU2HM2f/51iKfGM05gXUDqHZdl+skl5dt+5t1h1nn1 pJN/pU329/8/o945rlukrsRSnJFoqMVcVJwIAD0RGccNAgAA X-CMS-MailID: 20171123134842eucas1p1e1a9bf2dddbac5afdc9eb8f075c90409 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20171123134842eucas1p1e1a9bf2dddbac5afdc9eb8f075c90409 X-RootMTR: 20171123134842eucas1p1e1a9bf2dddbac5afdc9eb8f075c90409 References: <1511444906-26438-1-git-send-email-i.maximets@samsung.com> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ilya Maximets , Heetae Ahn Subject: [ovs-dev] [PATCH v2 2/2] netdev-dpdk: Add comment about variables naming convention. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org It'll be nice to document current naming convention for variables of the following types used in netdev-dpdk: * netdev * netdev_dpdk * netdev_rxq * netdev_rxq_dpdk to be sure that we will not return to chaos which was before commit d46285a2206f ("netdev-dpdk: Consistent variable naming."). Signed-off-by: Ilya Maximets --- lib/netdev-dpdk.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 647a9b2..4b42c08 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -330,6 +330,23 @@ enum dpdk_hw_ol_features { NETDEV_RX_CHECKSUM_OFFLOAD = 1 << 0, }; +/* + * In order to avoid confusion in variables names, following naming convention + * should be used, if possible: + * + * 'struct netdev' : 'netdev' + * 'struct netdev_dpdk' : 'dev' + * 'struct netdev_rxq' : 'rxq' + * 'struct netdev_rxq_dpdk' : 'rx' + * + * Example: + * struct netdev *netdev = netdev_from_name(name); + * struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); + * + * Also, 'netdev' should be used instead of 'dev->up', where 'netdev' was + * already defined. + */ + struct netdev_dpdk { PADDED_MEMBERS_CACHELINE_MARKER(CACHE_LINE_SIZE, cacheline0, dpdk_port_t port_id;