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 A89B1A0C3F; Fri, 16 Apr 2021 14:02:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63C40141D62; Fri, 16 Apr 2021 14:02:34 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 804DD141D5B for ; Fri, 16 Apr 2021 14:02:32 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 006FA5C003B; Fri, 16 Apr 2021 08:02:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 16 Apr 2021 08:02:32 -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= igguQOEbCumLG+MgtmqxYsEluMWPDXbkHTO+IXKAwq4=; b=FPVJrjhFqI9WoS1K gz+4Qd3fk5XPWJcAQrPS4Lj7cyS5R/rCXF5Kf6rHGtYQeWJRO5D3JoDj/QcWbQP7 0L0RmcZJbI2LdTWBfMND2EDA+ipAIEge3Im7/Xdumttaa4KFfiidmv1mzycvbuZM jZj0YktQ53ObaODE9p1BPcqKIDUy3PMMXwrwUMkhAEKg1OSZoBOgMjIsWF3mjFRi XDmgYnkvldfucaAc0QJxf1cSAPWC8jtszWFAe1U6bGvecJiHq0Nl7IVx7MfZEr8+ W9YBnLCFJbU2vBTiFqSCRbklHG/0pM39qUPK6NpJVLRj0Y9Ruz+uZ9Q9NojGp/B+ hDZVNQ== 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=igguQOEbCumLG+MgtmqxYsEluMWPDXbkHTO+IXKAw q4=; b=qWP9eYTjcDq5JwbXrBYpq7evk3+P/i7RBPfRhtxUs8e6ZhnIInw6Mr2jD Gqf6c19jCKcazWPk0DsDkwO52HMTxIV6ggsUDf1DwiLrVsBe1dWgKPD6kiNtJ49M cRCnYxlt77uPSnpDI4YwhQ++ww5v8tYgGFMGD80w7lN8kTV/SeoDXDuZJG6dpCbY HRhKppG93CWDRiK8dTrC9e/STrY8ZeRN9/xdF4dazKvAxVBpAkr9iqwZUjFS+mmZ HUpZgeo8GUySZLrBhwbHzPTsS2hDoEYhSEYQg+FBli9YsKiDdG2opZuhcJgX+pkm rcVATSsRvjT0HQe3EwAafCixECjKw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudelhedggeekucetufdoteggodetrfdotf 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 07FCD108005B; Fri, 16 Apr 2021 08:02:29 -0400 (EDT) From: Thomas Monjalon To: "Min Hu (Connor)" , ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru Cc: dev@dpdk.org, ktraynor@redhat.com Date: Fri, 16 Apr 2021 14:02:27 +0200 Message-ID: <2407731.DT0DZfuyaB@thomas> In-Reply-To: <1618570839-3761-1-git-send-email-humin29@huawei.com> References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618570839-3761-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 v7] 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" 16/04/2021 13:00, Min Hu (Connor): > + if (iter == NULL) { > + RTE_ETHDEV_LOG(ERR, "Cannot init iterator for NULL iterator\n"); Don't you think it would be better as "Cannot init NULL iterator"? > rte_eth_iterator_cleanup(struct rte_dev_iterator *iter) > { > + if (iter == NULL) { > + RTE_ETHDEV_LOG(ERR, "Cannot iterator clear up for NULL iter\n"); Cannot clean up NULL iterator. > rte_eth_dev_owner_new(uint64_t *owner_id) > { > + if (owner_id == NULL) { > + RTE_ETHDEV_LOG(ERR, "Cannot get owner id for NULL param\n"); Cannot return owner id. > @@ -825,6 +864,11 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id) > + if (port_id == NULL) { > + RTE_ETHDEV_LOG(ERR, "Cannot get port id for NULL param\n"); Cannot return port ID etc for all other messages Do you agree with the idea?