From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4F8FA0524; Tue, 20 Apr 2021 12:05:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEFEF416D2; Tue, 20 Apr 2021 12:04:57 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 9A2E3412B0 for ; Tue, 20 Apr 2021 12:04:55 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 37CB22BDA; Tue, 20 Apr 2021 06:04:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 20 Apr 2021 06:04:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= e49c6R13qhkNdhltMKwtRZk62Jq+hc7li0ACMNJhGSI=; b=M/a1OY2FyPYAOBDc TcKOJxQs7P6Qp/QBoed/vFKsbcgWkvlF7cK+lM8NIcFF80SDsn56GWQiVdQL3C9E 4NU9dm9B21xbmR/R/FWIzTcHNzy4RyEeIe3Xqx7R/rEVqk8bNE8ciadxiR0yeB5Z SqPoAaaZF53JTjcmP/iStxygxS+DUms9uxdFMzy2fb67JZhEg8MfmEoJqXbTEmjq H0UYEaZBw4h/xON7akqWRJziOJM25S0ybXDgLu9XmiY9T9W2/HGOYMU2gTE5QIwQ t269yQSFXT+D7J/PmCGlIBTVrQqQx4U0mCNkoi2h9ISQDSKPqfvukbvRPdn+Wzw+ Cw3kBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=e49c6R13qhkNdhltMKwtRZk62Jq+hc7li0ACMNJhG SI=; b=ICRsgvWgRcr1F0RQXqNnTLrZrJ1eYIzP5zg2KaI1VzRm+15M1eJdYQ/8I N3TfVAL+1/gF5N7InAUM/vK5rOzXU/taJ3DGSZupL5Zur9wBq842cYJqyAXphM0e J8jTLhlUUsMazpaSwKyvptfDKDFDZzN3N+m/nmAKU4rzRegOj4l9udGvB/9WCKJy 8e3bRVwFZ8DJ6JfUESdwAGTmonE4gk8ATbfPstcC/AQ0f6veaQhhNIKX4Sl2IjN0 ScA8iNNYHng8fikSwaEit6ynZg8fkysBFfvV7uNqzH8vUzOmfLKXgH3moei414Qx KA1s/k6RMHlWugCJ9hEx/ef8YUmzQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtiedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B0BB424005B; Tue, 20 Apr 2021 06:04:51 -0400 (EDT) From: Thomas Monjalon To: "Min Hu (Connor)" Cc: dev@dpdk.org, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, ktraynor@redhat.com, stephen@networkplumber.org Date: Tue, 20 Apr 2021 12:04:50 +0200 Message-ID: <4438095.zrIcpuxssK@thomas> In-Reply-To: <1618645179-11582-1-git-send-email-humin29@huawei.com> References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618645179-11582-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8] ethdev: add sanity checks in control APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thanks for the work. Few last comments below. 17/04/2021 09:39, Min Hu (Connor): > @@ -293,6 +303,11 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) > uint16_t > rte_eth_iterator_next(struct rte_dev_iterator *iter) > { > + if (iter == NULL) { > + RTE_ETHDEV_LOG(ERR, "Cannot iterate next NULL iter\n"); I would remove "next". Cannot iterate NULL iter > @@ -2629,6 +2707,13 @@ rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link) > RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); > dev = &rte_eth_devices[port_id]; > > + if (eth_link == NULL) { > + RTE_ETHDEV_LOG(ERR, > + "Cannot get nowait ethdev port %u for NULL link\n", > + port_id); "nowait ethdev" is not correct. I think you can just remove "nowait". > + if (fw_version == NULL) { > + RTE_ETHDEV_LOG(ERR, > + "Cannot get ethdev port %u fw version for NULL param\n", [...] > + if (fw_size == 0) { > + RTE_ETHDEV_LOG(ERR, > + "Cannot get ethdev port %u fw version with zero size\n", > + port_id); s/fw/FW/ > + RTE_ETHDEV_LOG(ERR, > + "Cannot update ethdev port %u rss reta to NULL\n", > + RTE_ETHDEV_LOG(ERR, > + "Cannot update ethdev port %u rss reta with zero size\n", s/rss reta/RSS RETA/ > + RTE_ETHDEV_LOG(ERR, > + "Cannot update ethdev port %u rss hash to NULL\n", s/rss/RSS/