From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B06D4A10DA for ; Fri, 2 Aug 2019 11:35:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A9DDE1C22A; Fri, 2 Aug 2019 11:35:28 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 9AE971C22A for ; Fri, 2 Aug 2019 11:35:27 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id k189so16741961pgk.13 for ; Fri, 02 Aug 2019 02:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=zGBRSZuiD5tGrKfw5LaL+8zuN5zh2q8AdAS8BN0MQ0g=; b=OAQv1Bzm2ulZO1AiLrS22PuYC4wJIwh3F55Re1PKLvyVkZVAb1NIqDAjJRicXFE3m5 JSlJrElW0zP8m7mCyb1zR62wX4+jTiNvTsoNDLverHAlSR50WyrGkWOcAXspcO/g7yoO hA4yJUSL1ei5wHwC9wV9Ob9yrn7FBz1y6DNxw226f6tlKThmB6LJvJpMhHrCxvnZ/1rQ Dr4XoFlmyvutvbz48JF91LO5EKr9T3XvNut7Cy4NmWVaLOTumnJw5U4ERSV1sGh+AOtF HQfxt0FXFdg6HeLjmsG4xsPA5DY1Aab2AhKAzIZ+aIoWYpCs/2gTlYeeHUyQgX3jrTqh VtIg== 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; bh=zGBRSZuiD5tGrKfw5LaL+8zuN5zh2q8AdAS8BN0MQ0g=; b=F9fsMfl+mnIDzXFmknk/0gVkMLvQ4BkSsWWGnB2daPcGR17UJuMspuyB/bHsRwmku0 CqLzM0MLss/QbHU1jtBsIJrywqrOOZssmdWfSPJBJZYO3Y9W9Pe6mdXvHvAqX67QHBjZ XP268kQWUCgG/j3xTbwr1B8s+3UnxUOYZCSWNH6rdcWhoKk4js+SqWafHrf2RIYCIEXz HD2lpo0lqECP7yzmqVtVg1F3Lmb0aG5v5MoWmLMU417thRupr+C5SRp/1jqzcrMUjuxC 2vNt0RuYrbRM2G5OUg3r55mWWzTWb/JAtKPbcNiNNdQ4FH0QXfGZgGT+iRk3EiGosn+S lWCw== X-Gm-Message-State: APjAAAVQV/SG3rvVC/jiSIBrdHishdUram2M9aWMBPIA2mP+6+9jnpms Pt1ryZfoZKv2UbksnHz2JeVcsjfo X-Google-Smtp-Source: APXvYqxBwoZ7Pe3Jty8aIg5O03G3el4waWW3PVViJZRxCZ1hEuXynKEPH3/O3Id+vUyxoZBttmMLPQ== X-Received: by 2002:a63:fe52:: with SMTP id x18mr123598506pgj.344.1564738526437; Fri, 02 Aug 2019 02:35:26 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c8c2:de00:9c1a:eba9:3129:63d2]) by smtp.gmail.com with ESMTPSA id c70sm33154298pfb.36.2019.08.02.02.35.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 02:35:26 -0700 (PDT) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Fri, 2 Aug 2019 18:35:22 +0900 Message-Id: <20190802093522.13877-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] spp_vf: revise terms in names of vars and funcs 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" * Rename long struct name `spp_iterate_classifier_table_params` to `classifier_table_params`. * Rename `element_proc`, a member in `classifier_table_params` for adding each of params to a status message, to `tbl_proc`. Signed-off-by: Yasufumi Ogawa --- src/vf/classifier.c | 28 ++++++++++++++-------------- src/vf/classifier.h | 16 ++++++++-------- src/vf/vf_cmd_runner.c | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/vf/classifier.c b/src/vf/classifier.c index b85dd79..e7991c6 100644 --- a/src/vf/classifier.c +++ b/src/vf/classifier.c @@ -804,7 +804,7 @@ classify_packets(int comp_id) /* classifier iterate component information */ int get_classifier_status(unsigned int lcore_id, int id, - struct spp_iterate_core_params *params) + struct spp_iterate_core_params *lcore_params) { int ret = SPPWK_RET_NG; int i; @@ -843,8 +843,8 @@ get_classifier_status(unsigned int lcore_id, int id, /* Set the information with the function specified by the command. */ /* TODO(yasufum) rename `element_proc` */ - ret = (*params->element_proc)( - params, lcore_id, cmp_info->name, SPPWK_TYPE_CLS_STR, + ret = (*lcore_params->element_proc)( + lcore_params, lcore_id, cmp_info->name, SPPWK_TYPE_CLS_STR, nof_rx, rx_ports, nof_tx, tx_ports); if (unlikely(ret != SPPWK_RET_OK)) return SPPWK_RET_NG; @@ -858,7 +858,7 @@ get_classifier_status(unsigned int lcore_id, int id, */ static void iterate_adding_mac_entry( - struct spp_iterate_classifier_table_params *params, + struct classifier_table_params *params, uint16_t vid, struct mac_classifier *mac_cls, __rte_unused struct cls_comp_info *cmp_info, @@ -886,10 +886,10 @@ iterate_adding_mac_entry( LOG_ENT((long)mac_cls->default_cls_idx, vid, SPPWK_TERM_DEFAULT, cmp_info, port_info); /** - * Append "default" entry. `element_proc` is a funciton - * pointer to append_classifier_element_value(). + * Append "default" entry. `tbl_proc` is funciton pointer to + * append_classifier_element_value(). */ - (*params->element_proc)(params, cls_type, vid, + (*params->tbl_proc)(params, cls_type, vid, SPPWK_TERM_DEFAULT, &port); } @@ -909,10 +909,10 @@ iterate_adding_mac_entry( LOG_ENT((long)data, vid, mac_addr_str, cmp_info, port_info); /** - * Append each entry of MAC address. `element_proc` is a - * funciton pointer to append_classifier_element_value(). + * Append each entry of MAC address. `tbl_proc` is function + * pointer to append_classifier_element_value(). */ - (*params->element_proc)(params, cls_type, vid, + (*params->tbl_proc)(params, cls_type, vid, mac_addr_str, &port); } } @@ -923,7 +923,7 @@ iterate_adding_mac_entry( */ int add_classifier_table_val( - struct spp_iterate_classifier_table_params *params) + struct classifier_table_params *params) { int i, vlan_id; struct cls_mng_info *mng_info; @@ -957,7 +957,7 @@ add_classifier_table_val( /* Iterate classifier_table to create response to status command */ static int _add_classifier_table( - struct spp_iterate_classifier_table_params *params) + struct classifier_table_params *params) { int ret; @@ -984,7 +984,7 @@ add_classifier_table(const char *name, char **output, void *tmp __attribute__ ((unused))) { int ret = SPPWK_RET_NG; - struct spp_iterate_classifier_table_params itr_params; + struct classifier_table_params itr_params; char *tmp_buff = spp_strbuf_allocate(CMD_RES_BUF_INIT_SIZE); if (unlikely(tmp_buff == NULL)) { RTE_LOG(ERR, SPP_CLASSIFIER_MAC, @@ -995,7 +995,7 @@ add_classifier_table(const char *name, char **output, } itr_params.output = tmp_buff; - itr_params.element_proc = append_classifier_element_value; + itr_params.tbl_proc = append_classifier_element_value; ret = _add_classifier_table(&itr_params); if (unlikely(ret != SPPWK_RET_OK)) { diff --git a/src/vf/classifier.h b/src/vf/classifier.h index 7b937ff..4f7786f 100644 --- a/src/vf/classifier.h +++ b/src/vf/classifier.h @@ -17,13 +17,13 @@ * and determines which port to be transferred to incoming packets. */ -struct spp_iterate_classifier_table_params; +struct classifier_table_params; /** * Define func to iterate classifier for showing status or so, as a member - * member of struct `spp_iterate_classifier_table_params`. + * member of struct `classifier_table_params`. */ -typedef int (*spp_iterate_classifier_element_proc)( - struct spp_iterate_classifier_table_params *params, +typedef int (*classifier_table_proc)( + struct classifier_table_params *params, enum sppwk_cls_type cls_type, int vid, const char *mac, const struct sppwk_port_idx *port); @@ -32,14 +32,14 @@ typedef int (*spp_iterate_classifier_element_proc)( * iterate classifier table parameters which is used when listing classifier * table content for status command or so. */ -struct spp_iterate_classifier_table_params { +struct classifier_table_params { void *output; /* Buffer used for output */ /* The function for creating classifier table information */ - spp_iterate_classifier_element_proc element_proc; + classifier_table_proc tbl_proc; }; int append_classifier_element_value( - struct spp_iterate_classifier_table_params *params, + struct classifier_table_params *params, enum sppwk_cls_type cls_type, int vid, const char *mac, const struct sppwk_port_idx *port); @@ -51,7 +51,7 @@ int append_classifier_element_value( * @params[in] params Object which has pointer of operator func and attrs. */ int add_classifier_table_val( - struct spp_iterate_classifier_table_params *params); + struct classifier_table_params *params); int add_classifier_table(const char *name, char **output, void *tmp __attribute__ ((unused))); diff --git a/src/vf/vf_cmd_runner.c b/src/vf/vf_cmd_runner.c index 8aaed67..0151f6e 100644 --- a/src/vf/vf_cmd_runner.c +++ b/src/vf/vf_cmd_runner.c @@ -556,7 +556,7 @@ update_comp_info(struct sppwk_comp_info *p_comp_info, int *p_change_comp) */ int append_classifier_element_value( - struct spp_iterate_classifier_table_params *params, + struct classifier_table_params *params, enum sppwk_cls_type cls_type, int vid, const char *mac, const struct sppwk_port_idx *port) -- 2.17.1