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 0FA21A0548; Tue, 20 Apr 2021 15:59:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD94841749; Tue, 20 Apr 2021 15:59:29 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 7F72741735 for ; Tue, 20 Apr 2021 15:59:28 +0200 (CEST) IronPort-SDR: bYerE6KBUDVIpkA5oViEev9GZZSXflq09kYKpMXc/ZIsOIPD0rznaSgJOxAorzoqqleILqN9tD Lzm7SELm5z6Q== X-IronPort-AV: E=McAfee;i="6200,9189,9960"; a="182640946" X-IronPort-AV: E=Sophos;i="5.82,237,1613462400"; d="scan'208";a="182640946" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 06:59:27 -0700 IronPort-SDR: tTBDpe9F+59G5BRtkMDQDER8iuPB3ga9lvzNhZyPttzBx20jiqOhzoou1OJAvz/DW7urne3pAl E5r8XRhqvDMw== X-IronPort-AV: E=Sophos;i="5.82,237,1613462400"; d="scan'208";a="420418856" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.207.27]) ([10.213.207.27]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 06:59:25 -0700 To: Thomas Monjalon , "Min Hu (Connor)" Cc: dev@dpdk.org, andrew.rybchenko@oktetlabs.ru, ktraynor@redhat.com, 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: Ferruh Yigit X-User: ferruhy Message-ID: Date: Tue, 20 Apr 2021 14:59:21 +0100 MIME-Version: 1.0 In-Reply-To: <4438095.zrIcpuxssK@thomas> Content-Type: text/plain; charset=utf-8; format=flowed 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 4/20/2021 11:04 AM, 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". > >> + 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/ > > > Hi Thomas, Connor, The issues seems only syntax issues, I can fix them so that we can get the patch for -rc1, I will send a new version soon.