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 9E359A10DA for ; Fri, 2 Aug 2019 11:34:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 933AC1C234; Fri, 2 Aug 2019 11:34:58 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 4DA731C234 for ; Fri, 2 Aug 2019 11:34:57 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id f5so26969303pgu.5 for ; Fri, 02 Aug 2019 02:34:57 -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=z2xnWOt//uilypid5UHxAFbO6h7FP5CWHT11Ya7+Ebc=; b=pg9i5Qra4XmNTiLz6i1/d6HDpEwNPIlnkrQkjxCAYNDEZVCT8f2VDmu3MJFpKSLQco 9gBXU8mDjqhhWff6BknxURNdS1TgzsK28uGgwS971+s17p3vJAWEVYDmqUvBw6edR/Cf ohlsZrz3i0Kfuk45D6U8tGAmk9HYWzr5o7erdn/tWqX32kFKkOJBFpl+v3Jhi9OA4SOh nf+hoQgeKwY42hhhkheSG+m9CPyJUMVBHcE52m0IrYjEQdRtn3Xkjva/9dMRwzLjZS65 HTRANccobCOWS57eQtEl9u74qTZNgCJDI/gVnA2iaj5Rpp6GgLVUUOQvAurWCL1ENa+k RIAQ== 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=z2xnWOt//uilypid5UHxAFbO6h7FP5CWHT11Ya7+Ebc=; b=MgP+XBvHz8oPnAV/DYXYbchzynWunrohh2RkLsH+HsTrXBV014Ib2Yk7asomEpaY5v mYcJsy0Ah4dQcr7hBVEWaVX7tUw2AKlwryD+x1SQ55+1JNZRZImsNbUzzTAouRawRaSW /NqlTP/w/4PO0jfEXYYsh7RKawZYXp9fpp4pbRA8lKT9Ai7PpWAzwQDd2KH6n2JevMrj 3B4jxqookDmdy/0b3rlWBTZ5SWlnewUKou5OU389ezw/jVab7N1H9CV449JYiHzKfJC4 Zip/tuT+ueD/qwiJS8YfkjcarkxY+mCyvqszmAox0JJN9qVnfa1N01UxPVKd7vE/Uf9W 8s7Q== X-Gm-Message-State: APjAAAUXjI4+2lWcP2MCdecSBTKVLLJ6DUsFQArk+QJqrp+3wpUqzWc0 QCwtPmxg7qUJX1HKpljUsKV9Yebm X-Google-Smtp-Source: APXvYqwrMxhIj7RhQ+6HmB5y9svKcJTwMi9E/CTVw3edluZ/osnvIvGdoQ33Qx0j8SQ5Pp+BzkpNtA== X-Received: by 2002:a65:4844:: with SMTP id i4mr12860940pgs.113.1564738496261; Fri, 02 Aug 2019 02:34:56 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c8c2:de00:9c1a:eba9:3129:63d2]) by smtp.gmail.com with ESMTPSA id a3sm74211649pfc.70.2019.08.02.02.34.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 02:34:55 -0700 (PDT) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Fri, 2 Aug 2019 18:34:52 +0900 Message-Id: <20190802093452.13814-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] shared/sec: move funcs for cls table to spp_vf 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" Functions only used from classifier, such as add_classifier_table(), add_classifier_table_val() or so, are still remained in shared lib and should be in spp_vf. Signed-off-by: Yasufumi Ogawa --- .../spp_worker_th/cmd_res_formatter.h | 3 -- .../secondary/spp_worker_th/cmd_utils.h | 21 -------- src/shared/secondary/spp_worker_th/vf_deps.h | 18 ------- src/vf/classifier.h | 50 ++++++++++++++----- 4 files changed, 37 insertions(+), 55 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_res_formatter.h b/src/shared/secondary/spp_worker_th/cmd_res_formatter.h index 1e52c0e..ed6fe36 100644 --- a/src/shared/secondary/spp_worker_th/cmd_res_formatter.h +++ b/src/shared/secondary/spp_worker_th/cmd_res_formatter.h @@ -70,9 +70,6 @@ int append_info_value(const char *name, char **output); int add_client_id(const char *name, char **output, void *tmp __attribute__ ((unused))); -int add_classifier_table(const char *name, char **output, - void *tmp __attribute__ ((unused))); - int add_interface(const char *name, char **output, void *tmp __attribute__ ((unused))); diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.h b/src/shared/secondary/spp_worker_th/cmd_utils.h index f3bd87a..4ae6956 100644 --- a/src/shared/secondary/spp_worker_th/cmd_utils.h +++ b/src/shared/secondary/spp_worker_th/cmd_utils.h @@ -103,27 +103,6 @@ struct cancel_backup_info { struct iface_info interface; }; -struct spp_iterate_classifier_table_params; -/** - * Define func to iterate classifier for showing status or so, as a member - * member of struct `spp_iterate_classifier_table_params`. - */ -typedef int (*spp_iterate_classifier_element_proc)( - struct spp_iterate_classifier_table_params *params, - enum sppwk_cls_type cls_type, - int vid, const char *mac, - const struct sppwk_port_idx *port); - -/** - * iterate classifier table parameters which is used when listing classifier - * table content for status command or so. - */ -struct spp_iterate_classifier_table_params { - void *output; /* Buffer used for output */ - /* The function for creating classifier table information */ - spp_iterate_classifier_element_proc element_proc; -}; - /** * Hexdump `addr` for logging, used for core_info or component info. * diff --git a/src/shared/secondary/spp_worker_th/vf_deps.h b/src/shared/secondary/spp_worker_th/vf_deps.h index 35ac201..35fb356 100644 --- a/src/shared/secondary/spp_worker_th/vf_deps.h +++ b/src/shared/secondary/spp_worker_th/vf_deps.h @@ -87,15 +87,6 @@ void init_classifier_info(int component_id); void uninit_component_info(struct cls_comp_info *cmp_info); -/** - * Setup data of classifier table and call iterator function for getting - * each of entries. - * - * @params[in] params Object which has pointer of operator func and attrs. - */ -int add_classifier_table_val( - struct spp_iterate_classifier_table_params *params); - /** * Activate temporarily stored component info while flushing. * @@ -106,15 +97,6 @@ int add_classifier_table_val( */ int 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, - enum sppwk_cls_type cls_type, - int vid, const char *mac, - const struct sppwk_port_idx *port); - -int add_classifier_table(const char *name, char **output, - void *tmp __attribute__ ((unused))); - enum sppwk_worker_type get_comp_type_from_str(const char *type_str); int get_status_ops(struct cmd_res_formatter_ops *ops_list); diff --git a/src/vf/classifier.h b/src/vf/classifier.h index 0f28a51..7b937ff 100644 --- a/src/vf/classifier.h +++ b/src/vf/classifier.h @@ -18,6 +18,43 @@ */ struct spp_iterate_classifier_table_params; +/** + * Define func to iterate classifier for showing status or so, as a member + * member of struct `spp_iterate_classifier_table_params`. + */ +typedef int (*spp_iterate_classifier_element_proc)( + struct spp_iterate_classifier_table_params *params, + enum sppwk_cls_type cls_type, + int vid, const char *mac, + const struct sppwk_port_idx *port); + +/** + * iterate classifier table parameters which is used when listing classifier + * table content for status command or so. + */ +struct spp_iterate_classifier_table_params { + void *output; /* Buffer used for output */ + /* The function for creating classifier table information */ + spp_iterate_classifier_element_proc element_proc; +}; + +int append_classifier_element_value( + struct spp_iterate_classifier_table_params *params, + enum sppwk_cls_type cls_type, + int vid, const char *mac, + const struct sppwk_port_idx *port); + +/** + * Setup data of classifier table and call iterator function for getting + * each of entries. + * + * @params[in] params Object which has pointer of operator func and attrs. + */ +int add_classifier_table_val( + struct spp_iterate_classifier_table_params *params); + +int add_classifier_table(const char *name, char **output, + void *tmp __attribute__ ((unused))); /** * classifier(mac address) initialize globals. @@ -46,19 +83,6 @@ void init_classifier_info(int comp_id); */ int classify_packets(int comp_id); -/** - * classifier(mac address) iterate classifier table. - * - * @param params - * Point to struct spp_iterate_classifier_table_params.@n - * Detailed data of classifier table. - * - * @retval SPPWK_RET_OK succeeded. - * @retval SPPWK_RET_NG failed. - */ -int add_classifier_table_val( - struct spp_iterate_classifier_table_params *params); - /** * Get classifier status. * -- 2.17.1