Soft Patch Panel
 help / color / mirror / Atom feed
From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 07/11] shared/sec: rename func free_mac_classification
Date: Mon, 24 Jun 2019 11:25:00 +0900	[thread overview]
Message-ID: <20190624022504.18752-8-yasufum.o@gmail.com> (raw)
In-Reply-To: <20190624022504.18752-1-yasufum.o@gmail.com>

From: Yasufumi Ogawa <yasufum.o@gmail.com>

Rename free_mac_classification() to free_mac_classifier() for releasing
resources of classifier.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 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


  parent reply	other threads:[~2019-06-24  2:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  2:24 [spp] [PATCH 00/11] Refactor libs for classifier in spp_vf yasufum.o
2019-06-24  2:24 ` [spp] [PATCH 01/11] shared/sec: refactor defines of VLAN " yasufum.o
2019-06-24  2:24 ` [spp] [PATCH 02/11] shared/sec: rename struct mac_classification yasufum.o
2019-06-24  2:24 ` [spp] [PATCH 03/11] shared/sec: refactor comments in vf_deps.h yasufum.o
2019-06-24  2:24 ` [spp] [PATCH 04/11] shared/sec: rename struct classified_data yasufum.o
2019-06-24  2:24 ` [spp] [PATCH 05/11] shared/sec: revise usage of term component_info yasufum.o
2019-06-24  2:24 ` [spp] [PATCH 06/11] shared/sec: revise members of struct cls_port_info yasufum.o
2019-06-24  2:25 ` yasufum.o [this message]
2019-06-24  2:25 ` [spp] [PATCH 08/11] shared/sec: refactor updating classifier info yasufum.o
2019-06-24  2:25 ` [spp] [PATCH 09/11] shared/sec: refactor updating forwarder yasufum.o
2019-06-24  2:25 ` [spp] [PATCH 10/11] shared/sec: refactor getting classifier status yasufum.o
2019-06-24  2:25 ` [spp] [PATCH 11/11] shared/sec: refactor setup cls table stat in JSON yasufum.o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190624022504.18752-8-yasufum.o@gmail.com \
    --to=yasufum.o@gmail.com \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).