From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6A07DAD95 for ; Wed, 4 Feb 2015 03:18:25 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 03 Feb 2015 18:11:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,516,1418112000"; d="scan'208";a="661160869" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by fmsmga001.fm.intel.com with ESMTP; 03 Feb 2015 18:18:22 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 4 Feb 2015 10:18:21 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0195.001; Wed, 4 Feb 2015 10:18:21 +0800 From: "Zhou, Danny" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v2 1/5] ethdev: add rx interrupt enable/disable functions Thread-Index: AQHQQAscS5wj0QtgAEaut7KulGREZZzfwEMg Date: Wed, 4 Feb 2015 02:18:19 +0000 Message-ID: References: <1422951511-28143-1-git-send-email-danny.zhou@intel.com> <1422951511-28143-2-git-send-email-danny.zhou@intel.com> <20150203154236.4af58a57@urahara> In-Reply-To: <20150203154236.4af58a57@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 v2 1/5] 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: Wed, 04 Feb 2015 02:18:25 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, February 04, 2015 7:43 AM > To: Zhou, Danny > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 1/5] ethdev: add rx interrupt enable/di= sable functions >=20 > On Tue, 3 Feb 2015 16:18:27 +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); > > + } > > + > > + dev =3D &rte_eth_devices[port_id]; > > + if (dev =3D=3D NULL) { > > + PMD_DEBUG_TRACE("Invalid port device\n"); > > + return (-ENODEV); > > + } > > + > > + FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, -ENOTSUP); > > + (*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id); > > + return 0; >=20 > The interrupt setup might fail for device specific reasons. > You should give the device specific function a chance to > return error as well. Well, for ixgbe and igb, PMD just sets the specific bit on the interrupt ma= sk register without checking if it fails or not. But I agree it should allow r= eturn=20 errors. Will provide a fix for both enable and disable functions in v3 patc= h set.