From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0144.outbound.protection.outlook.com [207.46.100.144]) by dpdk.org (Postfix) with ESMTP id EEA292C6E for ; Wed, 27 Apr 2016 02:49:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qlgc.onmicrosoft.com; s=selector1-qlogic-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=X/EVTDnXd78HBo6HRFPJ23Iyt1IzJSXpGqZaYCvhcs0=; b=cEnHPMhme4pRT6TF1FnYt7lTvsqV8qhsAXAfROwpP1+rYOuZzgXb8yCPvDBPT6RVeAvCFeIt8+KayPyExgO7J4nF8vvlVrOT25krUvSEjbSVqaB7bblCIncLV82FEC0SwTzCedvQVY4/G7HyaKrbdw3H0PNKeIKsZcYgSAW/xp0= Received: from BY1PR11MB0151.namprd11.prod.outlook.com (10.160.202.149) by SN1PR11MB0895.namprd11.prod.outlook.com (10.164.25.25) with Microsoft SMTP Server (TLS) id 15.1.477.8; Wed, 27 Apr 2016 00:49:33 +0000 Received: from BY1PR11MB0151.namprd11.prod.outlook.com ([10.160.202.149]) by BY1PR11MB0151.namprd11.prod.outlook.com ([10.160.202.149]) with mapi id 15.01.0466.025; Wed, 27 Apr 2016 00:49:32 +0000 From: Rasesh Mody To: Bruce Richardson CC: "thomas.monjalon@6wind.com" , "dev@dpdk.org" , Ameen Rahman , Harish Patil , Sony Chacko Thread-Topic: [PATCH v6 2/8] qede: Add base driver Thread-Index: AQHRn3phrH1nWL9C8kWxekymnhu2h5+cOJcAgADFjgA= Date: Wed, 27 Apr 2016 00:49:32 +0000 Message-ID: References: <1461647586-22234-1-git-send-email-rasesh.mody@qlogic.com> <1461647586-22234-2-git-send-email-rasesh.mody@qlogic.com> <20160426130140.GA6992@bricha3-MOBL3> In-Reply-To: <20160426130140.GA6992@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=qlogic.com; x-originating-ip: [173.186.134.106] x-ms-office365-filtering-correlation-id: 8afe175d-0e5b-4479-3835-08d36e35cc50 x-microsoft-exchange-diagnostics: 1; SN1PR11MB0895; 5:KsnYdkUVzSNDWP2xynMictoIVfNCTWMeanqTufFANxtoc3QiKh11BdZK0jVJo9ZmDPFUc2Tp4F7qQDOIxYe+zFltOJlBeTpRCrPnJvfroEh2Y6qbTo1rUebbgbfFSN6LeqNpzDDh4SqJPZ02D138/Q==; 24:p/V0QOA2i6vmNN1WvK4SVU0Q9ovZk/hbpHhejUTHkGWO2tWvMqrTR3VpNQvMNEGeLTkk6GPF9tN2jl+Q9xJjdKS8ECmpIncxWgijJh76hsk=; 7:ddcvO+JsC56OFr0CIP0FOHLHXq6OTWLM7DanALZicgqRNONbeDyr9g6j1hhfKICbuzoj5nrZzJF9lk2el5ccuIQnsicnf5XJLE/mrczvYjaFSwg1SK2ZZfjl3mdESz2MYIwylZUcZah3olqRrochkxVbt+7lPaPOzAtBny5z5W5ynEuSDRga8MSb40D+RFo0; 20:wy+bcSxwJgx6DgLlzcvETeCHrhw77VeBDHLJQUr5oeTKc+KbLYb0/r2GUB/8A1Rp1k9QR/y1yr77fBLE/nMYzSUk6W0evlBreEngAwDHyqqxMP17JoJhVPryGMMEIp3cBKNqF1RlmRxCvrzwfT4RhCn86pU6swMaAuNftWtQRow= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR11MB0895; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:SN1PR11MB0895; BCL:0; PCL:0; RULEID:; SRVR:SN1PR11MB0895; x-forefront-prvs: 0925081676 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(24454002)(377454003)(19580405001)(4001430100002)(19580395003)(66066001)(99286002)(10400500002)(2950100001)(5004730100002)(76576001)(106116001)(5008740100001)(77096005)(3660700001)(2900100001)(81166005)(3280700002)(2906002)(74316001)(5003600100002)(5002640100001)(31430400001)(76176999)(50986999)(9686002)(54356999)(4326007)(107886002)(102836003)(110136002)(189998001)(33656002)(122556002)(92566002)(3846002)(586003)(1220700001)(6116002)(87936001)(1096002); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR11MB0895; H:BY1PR11MB0151.namprd11.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: qlogic.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2016 00:49:32.7315 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR11MB0895 Subject: Re: [dpdk-dev] [PATCH v6 2/8] qede: Add base driver 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, 27 Apr 2016 00:49:36 -0000 > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > Sent: Tuesday, April 26, 2016 6:02 AM >=20 > On Mon, Apr 25, 2016 at 10:13:00PM -0700, Rasesh Mody wrote: > > The base driver is the backend module for the QLogic FastLinQ QL4xxxx > > 25G/40G CNA family of adapters as well as their virtual functions (VF) > > in SR-IOV context. > > > > The purpose of the base module is to: > > - provide all the common code that will be shared between the various > > drivers that would be used with said line of products. Flows such as > > chip initialization and de-initialization fall under this category. > > - abstract the protocol-specific HW & FW components, allowing the > > protocol drivers to have clean APIs, which are detached in its > > slowpath configuration from the actual Hardware Software > Interface(HSI). > > > > This patch adds a base module without any protocol-specific bits. > > I.e., this adds a basic implementation that almost entirely falls > > under the first category. > > > > Signed-off-by: Harish Patil > > Signed-off-by: Rasesh Mody > > Signed-off-by: Sony Chacko > > --- >=20 > >=20 > > +# > > +# CLANG VERSION > > +# > > +IS_CLANG_GT_362 :=3D $(shell \ > > + CLANG_MAJOR=3D`echo | clang -dM -E - 2>/dev/null | > grep clang_major | cut -d" " -f3`; \ > > + CLANG_MINOR=3D`echo | clang -dM -E - 2>/dev/null | > grep clang_minor | cut -d" " -f3`; \ > > + CLANG_PATCH=3D`echo | clang -dM -E - 2>/dev/null | > grep clang_patch | cut -d" " -f3`; \ > > + if [ "0$$CLANG_MAJOR" -gt "03" ]; then \ > > + echo 1; \ > > + elif [ "0$$CLANG_MAJOR" -eq "03" -a > "0$$CLANG_MINOR" -gt "06" ]; then \ > > + echo 1; \ > > + elif [ "0$$CLANG_MAJOR" -eq "03" -a > "0$$CLANG_MINOR" -eq "06" -a "0$$CLANG_PATCH" -gt "02" ]; then \ > > + echo 1; \ > > + fi) > > + >=20 > While the clang version seems something that might be generally useful, t= his > seems a long way of doing things just to see what compiler warning flag y= ou > need to set. How about just testing with clang to see if you get an error= with > the new flag or not. Will address this, thanks. >=20 > For example, on Fedora 23 (clang 3.7): >=20 > bruce@Fedora:dpdk-next-net$ clang -Wno-shift-negative-value -Werror -E > - < /dev/null > /dev/null 2>&1 > bruce@Fedora:dpdk-next-net$ echo $? > 0 >=20 > While the same commands on FreeBSD 10.3 (clang 3.4): >=20 > bruce@bsd10:~$ clang -Wno-shift-negative-value -Werror -E - < /dev/null= > > /dev/null 2>&1 > bruce@bsd10:~$ echo $? > 1 >=20 > > +# > > +# CFLAGS > > +# > > +CFLAGS_BASE_DRIVER =3D -Wno-unused-parameter CFLAGS_BASE_DRIVER > +=3D > > +-Wno-unused-value CFLAGS_BASE_DRIVER +=3D -Wno-sign-compare > > +CFLAGS_BASE_DRIVER +=3D -Wno-missing-prototypes > CFLAGS_BASE_DRIVER +=3D > > +-Wno-cast-qual CFLAGS_BASE_DRIVER +=3D -Wno-unused-function > > +CFLAGS_BASE_DRIVER +=3D -Wno-unused-variable CFLAGS_BASE_DRIVER > +=3D > > +-Wno-strict-aliasing CFLAGS_BASE_DRIVER +=3D -Wno-missing-prototypes > > +CFLAGS_BASE_DRIVER +=3D -Wno-format-nonliteral ifeq > ($(OS_TYPE),Linux) > > +ifeq ($(IS_CLANG_GT_362),1) CFLAGS_BASE_DRIVER +=3D > > +-Wno-shift-negative-value # Support added after clang 3.6 else > > +CFLAGS_BASE_DRIVER +=3D -Wno-shift-sign-overflow endif endif > > + >=20 >