From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v8 08/11] ethdev: add rx intr enable, disable and ctl functions Date: Thu, 21 May 2015 11:22:25 -0700 Message-ID: <20150521112225.5d61aa52@urahara> References: <1430804386-28949-1-git-send-email-cunming.liang@intel.com> <1432198563-16334-1-git-send-email-cunming.liang@intel.com> <1432198563-16334-9-git-send-email-cunming.liang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, liang-min.wang@intel.com To: Cunming Liang Return-path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by dpdk.org (Postfix) with ESMTP id 162335947 for ; Thu, 21 May 2015 20:22:23 +0200 (CEST) Received: by pabru16 with SMTP id ru16so113482630pab.1 for ; Thu, 21 May 2015 11:22:22 -0700 (PDT) In-Reply-To: <1432198563-16334-9-git-send-email-cunming.liang@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 21 May 2015 16:56:00 +0800 Cunming Liang wrote: > + if (!rte_eth_dev_is_valid_port(port_id)) { > + PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); > + return -ENODEV; > + } > + > + dev = &rte_eth_devices[port_id]; > + if (dev == NULL) { > + PMD_DEBUG_TRACE("Invalid port device\n"); > + return -ENODEV; > + } This check is not needed, rte_eth_dev_is_valid_port already checked that.