From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 21AEEADB9 for ; Mon, 23 Feb 2015 18:17:07 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 23 Feb 2015 09:11:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,631,1418112000"; d="scan'208";a="531549054" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga003.jf.intel.com with ESMTP; 23 Feb 2015 09:08:06 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 24 Feb 2015 01:17:04 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.209]) with mapi id 14.03.0195.001; Tue, 24 Feb 2015 01:17:03 +0800 From: "Zhou, Danny" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt enable/disable functions Thread-Index: AQHQT4oUYni/Ey1yY0im/wEt+KT/a5z+eGXA Date: Mon, 23 Feb 2015 17:17:02 +0000 Message-ID: References: <1424710542-14637-1-git-send-email-danny.zhou@intel.com> <1424710542-14637-2-git-send-email-danny.zhou@intel.com> <20150223085918.0b9853a9@urahara> In-Reply-To: <20150223085918.0b9853a9@urahara> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt enable/disable functions 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, 23 Feb 2015 17:17:08 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Tuesday, February 24, 2015 12:59 AM > To: Zhou, Danny > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt enable/di= sable functions >=20 > On Tue, 24 Feb 2015 00:55:37 +0800 > Zhou Danny wrote: >=20 > > +int > > +rte_eth_dev_rx_queue_intr_enable(uint8_t port_id, > > + uint16_t queue_id) > > +{ > > + struct rte_eth_dev *dev; > > + > > + if (port_id >=3D nb_ports) { > > + PMD_DEBUG_TRACE("Invalid port_id=3D%d\n", port_id); > > + return (-ENODEV); >=20 > Please don't use the BSD style of extra useless paren's around > returns. This code snippet doing sanity check is copied from other functions defined= in the same file=20 lib/librte_ether/rte_ethdev.c, and there are plenty of legacy code in this = file doing the similar BSD style thing. I'd suggest somebody to clean all those kinds of BSD style= code from DPDK code,=20 in a separated patchset.=20