From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9EBC15A65 for ; Wed, 11 May 2016 14:23:06 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 11 May 2016 05:23:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,608,1455004800"; d="scan'208";a="950908592" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga001.jf.intel.com with ESMTP; 11 May 2016 05:23:03 -0700 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 11 May 2016 13:23:02 +0100 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.120]) by irsmsx112.ger.corp.intel.com ([169.254.1.10]) with mapi id 14.03.0248.002; Wed, 11 May 2016 13:23:02 +0100 From: "Pattan, Reshma" To: Jerin Jacob , "dev@dpdk.org" CC: "thomas.monjalon@6wind.com" , "Richardson, Bruce" , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Thread-Topic: [dpdk-dev] [PATCH 02/20] thunderx/nicvf: add pmd skeleton Thread-Index: AQHRqHPCQ+2/mWMJtUWDfy95Dk/6ip+yYb/Q Date: Wed, 11 May 2016 12:23:01 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F0102550B@IRSMSX109.ger.corp.intel.com> References: <1462634198-2289-1-git-send-email-jerin.jacob@caviumnetworks.com> <1462634198-2289-3-git-send-email-jerin.jacob@caviumnetworks.com> In-Reply-To: <1462634198-2289-3-git-send-email-jerin.jacob@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2E5YzZjY2EtY2JiZC00NGU0LWJjMzQtM2I1ZDM3ZGJkOTBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im5tTWJ4aHdEUExxc1g0WFdENHp1VVNlMDZhXC9IXC82dVhtSk5EVFFKRmlMdz0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 02/20] thunderx/nicvf: add pmd skeleton 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: Wed, 11 May 2016 12:23:07 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob > Sent: Saturday, May 7, 2016 4:16 PM > To: dev@dpdk.org > Cc: thomas.monjalon@6wind.com; Richardson, Bruce > ; Jerin Jacob > ; Maciej Czekaj > ; Kamil Rytarowski > ; Zyta Szpak > ; Slawomir Rosek ; > Radoslaw Biernacki > Subject: [dpdk-dev] [PATCH 02/20] thunderx/nicvf: add pmd skeleton >=20 > Introduce driver initialization and enable build infrastructure for nicvf= pmd > driver. >=20 > By default, It is enabled only for defconfig_arm64-thunderx-* config as i= t is an > inbuilt NIC device. >=20 > --- > diff --git a/drivers/net/thunderx/nicvf_ethdev.c > b/drivers/net/thunderx/nicvf_ethdev.c > new file mode 100644 > index 0000000..3c545b4 > +static int > +nicvf_periodic_alarm_stop(struct nicvf *nic) { > + int ret; > + > + ret =3D rte_intr_callback_unregister(&nic->intr_handle, > + nicvf_interrupt, nic); > + ret |=3D close(nic->intr_handle.fd); > + return ret; > +} > + > + You can remove extra blank line > +/* Initialise and register driver with DPDK Application */ static const Typo Initialise. > + > + nic->device_id =3D pci_dev->id.device_id; > + nic->vendor_id =3D pci_dev->id.vendor_id; > + nic->subsystem_device_id =3D pci_dev->id.subsystem_device_id; > + nic->subsystem_vendor_id =3D pci_dev->id.subsystem_vendor_id; > + nic->eth_dev =3D eth_dev; > + > + PMD_INIT_LOG(DEBUG, "nicvf: device (%x:%x) %u:%u:%u:%u", > + pci_dev->id.vendor_id, pci_dev->id.device_id, > + pci_dev->addr.domain, pci_dev->addr.bus, > + pci_dev->addr.devid, pci_dev->addr.function); I see some indentation issue mix of tabs + spaces here in LOG. =20 > + > + if (nic->sqs_mode) { > + PMD_INIT_LOG(INFO, "Unsupported SQS VF detected, > Detaching..."); > + /* Detach port by returning postive error number */ typo, should be Positive. > diff --git a/drivers/net/thunderx/nicvf_ethdev.h > b/drivers/net/thunderx/nicvf_ethdev.h > new file mode 100644 > index 0000000..6431329 > --- /dev/null > +++ b/drivers/net/thunderx/nicvf_ethdev.h > @@ -0,0 +1,49 @@ > + > +#ifndef __THUNDERX_NICVF_ETHDEV_H__ > +#define __THUNDERX_NICVF_ETHDEV_H__ > + > +#include > + > +#define THUNDERX_NICVF_PMD_VERSION "1.0" > + > +#define NICVF_INTR_POLL_INTERVAL_MS 50 > + > +static inline struct nicvf* Should follow (foo *) not foo* > +nicvf_pmd_priv(struct rte_eth_dev *eth_dev) { > + return (struct nicvf *)eth_dev->data->dev_private; } > + > + > +#endif /* __THUNDERX_NICVF_ETHDEV_H__ */ multiple blank lines before #endif > +++ b/drivers/net/thunderx/nicvf_struct.h > + > +#ifndef _THUNDERX_NICVF_STRUCT_H > +#define _THUNDERX_NICVF_STRUCT_H > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include Should leave blank line between standard library headers and rte headers. Thanks, Reshma