From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=MU1XqATtcR4eZd9Y/jFxZ/CKq3AQzmsIhhJZu1qwL+Q=; b=nBzf6HAD5iNGIJx/LCk8D2MNN7wqe0HQNfa5Zglo/dype3Uc1nxS/vnsJpkEkcC9/C jGxxnQDdWUbByI0L0nhjfGhlpeah/W0I3QPo7NrrfhUeGBsQ24hAEsFKWFXj19Z4YeIz 1OEeBUCQXFsfrIRmlwbDJJ0ZgNUyRs1gErp18mAExzIcceSW+Wn2fUcTF4o20BOXctmo VFrkxlcy1j/xmeGfyCG30eo5JixZmqcy+zjScZjVGB24lpRSD5BPkbq5kDbGTjAZ6+ng zJt4FASoPYfzPN9TS9aDkNMYhDLh4NT36nMoTGhBguYTMbp2nGNkrjKmqMHe3b4Dkkg2 U5Fw== X-Gm-Message-State: ALoCoQmHu8qdwWG1BtJ2a/tlFO9mQmv/xnVjmAUUmedP94ouvuSAw/76vaWdWe/QhZvXtg+30qSZ X-Received: by 10.70.47.9 with SMTP id z9mr8051028pdm.69.1432232542482; Thu, 21 May 2015 11:22:22 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id xq2sm19981428pac.8.2015.05.21.11.22.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 11:22:22 -0700 (PDT) Date: Thu, 21 May 2015 11:22:25 -0700 From: Stephen Hemminger To: Cunming Liang Message-ID: <20150521112225.5d61aa52@urahara> In-Reply-To: <1432198563-16334-9-git-send-email-cunming.liang@intel.com> 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 Subject: Re: [dpdk-dev] [PATCH v8 08/11] ethdev: add rx intr enable, disable and ctl 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: Thu, 21 May 2015 18:22:23 -0000 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.