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 6AA6CA0548; Tue, 20 Apr 2021 16:20:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 465CC41749; Tue, 20 Apr 2021 16:20:10 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id F27C741735 for ; Tue, 20 Apr 2021 16:20:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618928408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NVzzkwPV0/Wk9TU8a9NOUQIkX5ZsBu/wWZ187EnthOo=; b=Kg7wOoRILFx3PmKdMN9KYCWFtWCyEKkd91CNG2ePbYZnAKbQmTAvKCn6X4hxXXSS4yVZa7 YkF35ISlFxzViXRpszb0cQTIdNV48NZbjgGnnqF1UbdnGcfyoOWtCnKS6k0DdDF2fv84PM YFQf5EAlWmFWWx7is2laebdPH1gB1/k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-AdqcITioNQmZEh8rPuUHEw-1; Tue, 20 Apr 2021 10:20:06 -0400 X-MC-Unique: AdqcITioNQmZEh8rPuUHEw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 56631C73A6; Tue, 20 Apr 2021 14:20:05 +0000 (UTC) Received: from [10.36.112.162] (ovpn-112-162.ams2.redhat.com [10.36.112.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CC591975F; Tue, 20 Apr 2021 14:20:03 +0000 (UTC) To: Thomas Monjalon , "Min Hu (Connor)" Cc: dev@dpdk.org, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, stephen@networkplumber.org References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618645179-11582-1-git-send-email-humin29@huawei.com> <4438095.zrIcpuxssK@thomas> From: Kevin Traynor Message-ID: Date: Tue, 20 Apr 2021 15:20:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <4438095.zrIcpuxssK@thomas> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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" On 20/04/2021 11:04, Thomas Monjalon wrote: > 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". > The 'nowait' was just to distinguish from the otherwise identical message in rte_eth_link_get(). Probably it can be some way better worded. >> + 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/ > > >