From patchwork Mon Mar 7 06:43:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 108564 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA380A034D; Mon, 7 Mar 2022 08:17:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66F7E4068F; Mon, 7 Mar 2022 08:17:41 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id EDE5840040 for ; Mon, 7 Mar 2022 08:17:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646637460; x=1678173460; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WPzapYvzDD6HVMHhSTLYTkYML2piYO+1wkpQzIHLsHc=; b=Oez7ZlAC5OfIJihGXqOcN1n8uOay7/f4vJKeZ/E0gJ0ovHWaxL04263y ojhFYEnDzR6kDdRVhpzofIbOuhnV4J/ojewTErQCrDHYcECsXxhovvIg/ 91DdMLDMG+Zc5DIhJgzt5Hzw4dg1SnGeIZQVCsBjXMTSy7JxiLmKvwSqX fH55ZjjvlAG1e0wJOzJhCGXM0U5iQXx5K0xsUtlhwqqlyrQpD7E4awSg8 WBeMR67/ZgUfjPiu3Yc7yzbWntM5W0rCs9WZXWA4fALVgc0awzPZIgL1F OFGFkVosu42tI0iXFLc9izvq3o8okdj1KiG2OBaHguGdrYQuiRo4X5olK Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="254258971" X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="254258971" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2022 23:17:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="512576368" Received: from npg-dpdk-haiyue-2.sh.intel.com ([10.67.118.240]) by orsmga006.jf.intel.com with ESMTP; 06 Mar 2022 23:17:36 -0800 From: Haiyue Wang To: dev@dpdk.org Cc: Haiyue Wang , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram Subject: [PATCH v1] graph: remove the useless duplicate name check Date: Mon, 7 Mar 2022 14:43:18 +0800 Message-Id: <20220307064318.1002855-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 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 The node clone API parameter 'name' is the new node's postfix name, not the final node name, so it makes no sense to check it. And the new name will be checked duplicate when calling API '__rte_node_register'. Signed-off-by: Haiyue Wang --- lib/graph/node.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/graph/node.c b/lib/graph/node.c index 79230035a2..ae6eadb260 100644 --- a/lib/graph/node.c +++ b/lib/graph/node.c @@ -150,10 +150,6 @@ node_clone(struct node *node, const char *name) goto fail; } - /* Check for duplicate name */ - if (node_has_duplicate_entry(name)) - goto fail; - reg = calloc(1, sizeof(*reg) + (sizeof(char *) * node->nb_edges)); if (reg == NULL) { rte_errno = ENOMEM;