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 6ECADA00E6 for ; Tue, 6 Aug 2019 09:28:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 619911B954; Tue, 6 Aug 2019 09:28:25 +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 EA0711B954 for ; Tue, 6 Aug 2019 09:28:23 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id x15so30758095pgg.8 for ; Tue, 06 Aug 2019 00:28:23 -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=OrEmZ796Y7S6Axqvj0+AliobM20z4gIJgheBW+CrZN8=; b=KgWoSN6BnVW5jGBAKLyZEvhab9L/YrQn//JMfxcLgHvsrEM2Nklvnro+gNQlw4MPpX 0Ct5M6FcsdDeVITVxmXCEmnrBF9aXinLtLpChT2jFuBvxKeRnhLufHkf1ZzATm22L9jm PVTvXA5QY3qMMHETMn04TYu1fmuUOx15f1uAaNA6/8Pe1AL7htLSDw172pHSjB/zaNPy Dou7Qg/CmB2FXTXbGYKxwj4ymnUqmGORmb49LDRAsPtC9rwhFuxsI2FtAwxxt58Rxy1y 2jE+mb3SwkO0HHNcAqSKGuig+JwYKBYGFaG85IQKyrFQLwvsD+njpDnXH66SqpLsR2yd 2B+A== 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=OrEmZ796Y7S6Axqvj0+AliobM20z4gIJgheBW+CrZN8=; b=BSbE+19CNq6MV5xLrUzubdZu3EURFn+IPMwwPheDst4NqV6AR8Ot6yxSjuVeKVwqTX /U9OysbQhF+BlC28Spk4Wgc3Clh0hAgy55hb/9dEWFzTU4VkrP6nFiXrrnM9ZkNtEpmG o8QV9aNzzg9r+QNka4+EAZtq3YYSnwvIUFYqQoM4bgHv97LmmKSPAKhTFn59Coog00tg zWrZ5/A1xISgTTx0qdZ0UJU7tsNYXXpfvsK7iZl8i5REOqI0laze/lwZWuhRYhuoOrWF Yrq3WAqC+JlntzKWWtkunpzmaONAd4rUisLPPRyUGPZUc4b13oFJaNxh1YNowJt/MY6M /fUA== X-Gm-Message-State: APjAAAX2Ih0EnVbfmJ7tKAdKtcLTaIqYczZdnYXLTIYpgt/p03XrjDs2 5MYwnmuFCa87/QTRdr2TBzFlhejA X-Google-Smtp-Source: APXvYqyH3kAjadpU/kXy8PH3IwIsRot8EKq6zJ+IYjs1uX18pxEOv1hpNCrR7oR8JDp8I4Qy9/dL+Q== X-Received: by 2002:a17:90a:2228:: with SMTP id c37mr1781063pje.9.1565076502858; Tue, 06 Aug 2019 00:28:22 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id 81sm134751201pfx.111.2019.08.06.00.28.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 00:28:22 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Tue, 6 Aug 2019 16:28:15 +0900 Message-Id: <20190806072815.11460-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] shared/sec: add TODOs for vf specific features 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 There are several functions and variables for spp_vf defined in shared dir, and should be moved to spp_vf. This update is to add TODOs for the changes. Signed-off-by: Yasufumi Ogawa --- .../secondary/spp_worker_th/cmd_parser.c | 27 ++++++++++++------- .../spp_worker_th/cmd_res_formatter.h | 2 +- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.c b/src/shared/secondary/spp_worker_th/cmd_parser.c index 1acda07..a136b84 100644 --- a/src/shared/secondary/spp_worker_th/cmd_parser.c +++ b/src/shared/secondary/spp_worker_th/cmd_parser.c @@ -57,6 +57,7 @@ sppwk_action_str(enum sppwk_action wk_action) } /* Get string of cmd type. It is mainly used for logging. */ +/* TODO(yasufum) spp_vf specific vars must be localized to vf. */ const char* sppwk_cmd_type_str(enum sppwk_cmd_type ctype) { @@ -81,9 +82,9 @@ sppwk_cmd_type_str(enum sppwk_cmd_type ctype) /** * List of classifier type. The order of items should be same as the order of - * enum `spp_classifier_type` defined in spp_proc.h. + * enum `sppwk_cls_type` defined in cmd_utils.h. */ -/* TODO(yasufum) fix similar vars in command_proc.c */ +/* TODO(yasufum) spp_vf specific vars must be localized to vf. */ const char *CLS_TYPE_LIST[] = { "none", "mac", @@ -93,7 +94,7 @@ const char *CLS_TYPE_LIST[] = { /** * List of port direction. The order of items should be same as the order of - * enum `spp_port_rxtx` in spp_vf.h. + * enum `sppwk_port_dir` in data_types.h. */ const char *PORT_DIR_LIST[] = { "none", @@ -104,8 +105,10 @@ const char *PORT_DIR_LIST[] = { /** * List of port abilities. The order of items should be same as the order of - * enum `spp_port_ability_type` in spp_vf.h. + * enum `sppwk_port_ops` in data_types.h. */ +/* TODO(yasufum) spp_vf specific vars must be localized to vf. */ +/* TODO(yasufum) rename ABILITY to CAPABILITY */ const char *PORT_ABILITY_LIST[] = { "none", "add_vlantag", @@ -534,6 +537,7 @@ parse_comp_name_portcmd(void *output, const char *arg_val, /* Parse vlan operation for port command. */ /* TODO(yasufum) add desc for how to be used. */ /* TODO(yasufum) add desc for what is port ability. */ +/* TODO(yasufum) spp_vf specific function must be localized to vf. */ static int parse_port_vlan_ops(void *output, const char *arg_val, int allow_override __attribute__ ((unused))) @@ -759,18 +763,20 @@ parse_cls_port(void *cls_cmd_attr, const char *arg_val, return SPPWK_RET_OK; } -/* Attributes operator functions of command for parsing. */ +/* Attributes operation functions of command for parsing. */ struct sppwk_cmd_ops { const char *name; size_t offset; /* Offset of struct spp_command */ - /* Pointer to operator function */ + /* Pointer to operation function */ int (*func)(void *output, const char *arg_val, int allow_override); }; /* Used for command which takes no params, such as `status`. */ #define SPPWK_CMD_NO_PARAMS { NULL, 0, NULL } -/* A set of operator functions for parsing command. */ +/* A set of operation functions for parsing command. */ +/* TODO(yasufum) spp_vf specific function must be localized to vf. */ +/* TODO(yasufum) It must be separated into each of commands. */ static struct sppwk_cmd_ops cmd_ops_list[][SPPWK_MAX_PARAMS] = { { /* classifier_table(mac) */ @@ -931,6 +937,7 @@ parse_cmd_comp(struct sppwk_cmd_req *request, int argc, char *argv[], } /* Validate given command for clssfier_table. */ +/* TODO(yasufum) spp_vf specific function must be localized to vf. */ static int parse_cmd_cls_table(struct sppwk_cmd_req *request, int argc, char *argv[], struct sppwk_parse_err_msg *wk_err_msg, int maxargc) @@ -939,6 +946,7 @@ parse_cmd_cls_table(struct sppwk_cmd_req *request, int argc, char *argv[], } /* Validate given command for clssfier_table of vlan. */ +/* TODO(yasufum) spp_vf specific function must be localized to vf. */ static int parse_cmd_cls_table_vlan(struct sppwk_cmd_req *request, int argc, char *argv[], struct sppwk_parse_err_msg *wk_err_msg, @@ -997,7 +1005,7 @@ parse_cmd_port(struct sppwk_cmd_req *request, int argc, char *argv[], /** * A set of attributes of commands for parsing. The last member of function - * pointer is the operator function for the command. + * pointer is the operation function for the command. */ struct cmd_parse_attrs { const char *cmd_name; @@ -1010,8 +1018,9 @@ struct cmd_parse_attrs { /** * List of command attributes defines the name of command, number of params - * and operator functions. + * and operation functions. */ +/* TODO(yasufum) spp_vf specific function must be localized to vf. */ static struct cmd_parse_attrs cmd_attr_list[] = { { "classifier_table", 5, 5, parse_cmd_cls_table }, { "classifier_table", 6, 6, parse_cmd_cls_table_vlan }, 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 393b607..23abe27 100644 --- a/src/shared/secondary/spp_worker_th/cmd_res_formatter.h +++ b/src/shared/secondary/spp_worker_th/cmd_res_formatter.h @@ -22,7 +22,7 @@ struct cmd_result { }; /** - * Contains command response and operator func for. It is used as an array of + * Contains command response and operation func for. It is used as an array of * this struct. */ struct cmd_res_formatter_ops { -- 2.17.1