From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EF551A046B for ; Mon, 24 Jun 2019 04:25:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7CC81BF6E; Mon, 24 Jun 2019 04:25:35 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 0C0D11BF71 for ; Mon, 24 Jun 2019 04:25:35 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id f25so6241887pgv.10 for ; Sun, 23 Jun 2019 19:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=aXlKJpo65Y8u4I4qZysfxWpuwxkvufWmEDK9IZjvR1A=; b=ZUWdH2NMJbMHkpnA1j/72ioMVJPaSs8LsuiOwyUOz5TzcEczM+YJ6psXHH8NktCjBX brwy3pYe+sFDIIUak3Sl41E4AlFOqXLEBqhfkecTqi1GTSrcksQXpugTs3aKHYVPHuCz Uo5Ejwi9rpTRQSrVe8PYar5zLslkUCBMvnBf+W8ZrlFVBc+ByDHk40EKt5IQBH+JoQwm nEgarlDCZmrdJ0dZ2sWFAlAMSWpaUNF+uHpu1G8QEPU8yyWRYhVRDLEe8+b3ULiyn+IH uuzU7kH7Awee+At67hpb9Lj0Pd/ZN61N3LztvUNw7lwc9PT1lFAnO/9qTS7pwvaQCIek HkGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=aXlKJpo65Y8u4I4qZysfxWpuwxkvufWmEDK9IZjvR1A=; b=Pc7nj/mj1AeR4OqMgnbcdVb1wSHg7aYk2tC1wLLygYOc5tKnAjDKk31lhPqEpiZ46g mR/IBg4hiWD+TkojpjKB4yJtwymHCOXFZPWyZiy8+i3+WVhnNN2LAB9NksfMekMcxX6F U3XnRhmHZo6V826s+9GsTnlYLgF6T7y+UG7+NJytNr1RnAKkfo4+UtZylAQSaOeZluZK S/TSNz4TaQ0pjRoBcTlIhnRg8qZySiwwmR6iqCmcT7KLh7XduKjY3o0a0eCFdRuDUPRC MyRD1G7EM2co3cFUwwLIHqVQzROvVBoxeC/FtEoy4P5L9SwMYie+WCP+yBNKZbyLNz6M ou4Q== X-Gm-Message-State: APjAAAX3nH5AUAXlsamrptjYO1Eu7CxtsLWiGuJbvWNw4e+Vr82Sesb3 3ZE3SyMkGbeXBBWj2QGkEdVQe5r5 X-Google-Smtp-Source: APXvYqzJ56sXRm6Pjnp5Ho15CI2OQwSqAiz8BR0kLegHQI6zDRf8BsQfuBmt0mL/n7Jc7k4cCrf53Q== X-Received: by 2002:a17:90a:b903:: with SMTP id p3mr21552742pjr.79.1561343134151; Sun, 23 Jun 2019 19:25:34 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id a3sm9927461pje.3.2019.06.23.19.25.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jun 2019 19:25:33 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Mon, 24 Jun 2019 11:25:00 +0900 Message-Id: <20190624022504.18752-8-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190624022504.18752-1-yasufum.o@gmail.com> References: <20190624022504.18752-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 07/11] shared/sec: rename func free_mac_classification X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa Rename free_mac_classification() to free_mac_classifier() for releasing resources of classifier. Signed-off-by: Yasufumi Ogawa --- src/shared/secondary/spp_worker_th/vf_deps.h | 14 ++++++-------- src/vf/classifier_mac.c | 8 +++----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/vf_deps.h b/src/shared/secondary/spp_worker_th/vf_deps.h index 79e2abb..9b59b3d 100644 --- a/src/shared/secondary/spp_worker_th/vf_deps.h +++ b/src/shared/secondary/spp_worker_th/vf_deps.h @@ -42,17 +42,15 @@ struct cls_comp_info { struct cls_port_info tx_ports_i[RTE_MAX_ETHPORTS]; /* TX info. */ }; -/* free mac classification instance. */ +/* Release instance of mac classifier. */ static inline void -free_mac_classification(struct mac_classifier *mac_cls) +free_mac_classifier(struct mac_classifier *mac_clf) { - if (mac_cls == NULL) + if (mac_clf == NULL) return; - - if (mac_cls->cls_tbl != NULL) - rte_hash_free(mac_cls->cls_tbl); - - rte_free(mac_cls); + if (mac_clf->cls_tbl != NULL) + rte_hash_free(mac_clf->cls_tbl); + rte_free(mac_clf); } /** diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c index 4213372..232ed19 100644 --- a/src/vf/classifier_mac.c +++ b/src/vf/classifier_mac.c @@ -437,14 +437,12 @@ init_component_info(struct cls_comp_info *cmp_info, /* uninitialize classifier information. */ void -uninit_component_info(struct cls_comp_info *cmp_info) +uninit_component_info(struct cls_comp_info *comp_info) { int i; - for (i = 0; i < NOF_VLAN; ++i) - free_mac_classification(cmp_info->mac_clfs[i]); - - memset(cmp_info, 0, sizeof(struct cls_comp_info)); + free_mac_classifier(comp_info->mac_clfs[i]); + memset(comp_info, 0, sizeof(struct cls_comp_info)); } /* transmit packet to one destination. */ -- 2.17.1