From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com
 [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 85C82C480
 for <dev@dpdk.org>; Sun, 26 Jul 2015 15:48:41 +0200 (CEST)
Received: by wibud3 with SMTP id ud3so84251123wib.0
 for <dev@dpdk.org>; Sun, 26 Jul 2015 06:48:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=HzZ8mkIZ1m2iZmH3pMDg4qLBCHvseVzYz2Hxx9Gufm0=;
 b=dY69qkeSscZi8cZ0d+qrumXTDsOy+GHKRha6bXqyAKhoVvde3lV/Wq022tnryrPNZp
 eBB/4CeBN62eYPljR5JxOvbMABAC55NgaavZ4PoJ0wAM77y5t4LuSvlViBTnJmw3d9XW
 YzGagiA34Si1wZRnKsdboG3rj/vq8DXU1GCt8gKlcYVpaOrOZXf0AwVCS/eU7ztIqNe3
 zhfY9fjJwX9fSZYLhS6PDhykqMJxgaJSP52s3F2X4/F2axwNXwQXeiA/9CAqF3CoCUB1
 NHXVk/jjQPotgbaQPyN6yXcI37l9ngPp8DcsW28RwAoO03hjmHlJ5JSDI8iscdizypyp
 IY4A==
X-Gm-Message-State: ALoCoQl0hghY/jxcjIuoiJk5XO6HHAmSIF43NC04J/00YcdxBSwUlyx0VLE80QvrSosrkoeojXYW
X-Received: by 10.180.86.100 with SMTP id o4mr15247887wiz.46.1437918521371;
 Sun, 26 Jul 2015 06:48:41 -0700 (PDT)
Received: from xps13.localnet (117.114.118.80.rev.sfr.net. [80.118.114.117])
 by smtp.gmail.com with ESMTPSA id r6sm8356486wiy.13.2015.07.26.06.48.39
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 26 Jul 2015 06:48:40 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 26 Jul 2015 15:47:25 +0200
Message-ID: <5715009.9JOkuqddi2@xps13>
Organization: 6WIND
User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; )
In-Reply-To: <1437757584-15502-2-git-send-email-stephen@networkplumber.org>
References: <1437757584-15502-1-git-send-email-stephen@networkplumber.org>
 <1437757584-15502-2-git-send-email-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 01/11] eth: move queue check for
	rx_queue_count
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Jul 2015 13:48:41 -0000

2015-07-24 10:06, Stephen Hemminger:
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -122,6 +122,7 @@
>  	}							\
>  } while (0)
>  
> +

checkpatch would warn about this whitespace change

>  static const char *MZ_RTE_ETH_DEV_DATA = "rte_eth_dev_data";
>  struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS];
>  static struct rte_eth_dev_data *rte_eth_dev_data;
> @@ -2910,6 +2911,11 @@ rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
>  
>  	VALID_PORTID_OR_ERR_RET(port_id, 0);
>  
> +	if (queue_id >= dev->data->nb_rx_queues) {
> +		PMD_RX_LOG(ERR, "Invalid RX queue id=%d", queue_id);
> +		return 0;
> +	}

PMD_RX_LOG is not defined in ethdev.