revert: "feat: add new message type for getting node statistics"

This reverts commit 717a4eed0c.
This commit is contained in:
eeff
2022-10-17 16:18:22 +08:00
parent 30e1ad8d5a
commit 6000f417d3
3 changed files with 0 additions and 33 deletions
-13
View File
@@ -121,8 +121,6 @@ typedef enum neu_reqresp_type {
NEU_REQ_GET_NODES_STATE,
NEU_RESP_GET_NODES_STATE,
NEU_REQ_NODE_CTL,
NEU_REQ_GET_NODE_STAT,
NEU_RESP_GET_NODE_STAT,
NEU_REQ_ADD_GROUP,
NEU_REQ_DEL_GROUP,
@@ -185,8 +183,6 @@ static const char *neu_reqresp_type_string_t[] = {
[NEU_REQ_GET_NODES_STATE] = "NEU_REQ_GET_NODES_STATE",
[NEU_RESP_GET_NODES_STATE] = "NEU_RESP_GET_NODES_STATE",
[NEU_REQ_NODE_CTL] = "NEU_REQ_NODE_CTL",
[NEU_REQ_GET_NODE_STAT] = "NEU_REQ_GET_NODE_STAT",
[NEU_RESP_GET_NODE_STAT] = "NEU_RESP_GET_NODE_STAT",
[NEU_REQ_ADD_GROUP] = "NEU_REQ_ADD_GROUP",
[NEU_REQ_DEL_GROUP] = "NEU_REQ_DEL_GROUP",
@@ -437,15 +433,6 @@ typedef struct {
UT_array *states; // array of neu_nodes_state_t
} neu_resp_get_nodes_state_t, neu_reqresp_nodes_state_t;
typedef struct neu_req_get_node_stat {
char node[NEU_NODE_NAME_LEN];
} neu_req_get_node_stat_t;
typedef struct neu_resp_get_node_stat {
neu_node_type_e type;
uint64_t data[NEU_NODE_STAT_MAX];
} neu_resp_get_node_stat_t;
typedef struct neu_req_update_license {
} neu_req_update_license_t;
-18
View File
@@ -243,7 +243,6 @@ static int adapter_command(neu_adapter_t *adapter, neu_reqresp_head_t header,
break;
}
case NEU_REQ_NODE_CTL:
case NEU_REQ_GET_NODE_STAT:
case NEU_REQ_GET_NODE_STATE:
case NEU_REQ_GET_NODE_SETTING:
case NEU_REQ_NODE_SETTING: {
@@ -324,7 +323,6 @@ static int adapter_loop(enum neu_event_io_type type, int fd, void *usr_data)
case NEU_REQRESP_METRICS:
case NEU_RESP_GET_SUB_DRIVER_TAGS:
case NEU_REQ_UPDATE_LICENSE:
case NEU_RESP_GET_NODE_STAT:
case NEU_RESP_GET_NODE_STATE:
case NEU_RESP_GET_NODES_STATE:
case NEU_RESP_GET_NODE_SETTING:
@@ -406,16 +404,6 @@ static int adapter_loop(enum neu_event_io_type type, int fd, void *usr_data)
break;
}
case NEU_REQ_GET_NODE_STAT: {
neu_resp_get_node_stat_t resp = { 0 };
resp.type = neu_adapter_get_type(adapter);
memcpy(resp.data, adapter->stat.data, sizeof(resp.data));
header->type = NEU_RESP_GET_NODE_STAT;
neu_msg_exchange(header);
reply(adapter, header, &resp);
break;
}
case NEU_REQ_GET_NODE_STATE: {
neu_resp_get_node_state_t resp = { 0 };
@@ -992,15 +980,9 @@ void *neu_msg_gen(neu_reqresp_head_t *header, void *data)
case NEU_REQ_NODE_CTL:
data_size = sizeof(neu_req_node_ctl_t);
break;
case NEU_REQ_GET_NODE_STAT:
data_size = sizeof(neu_req_get_node_stat_t);
break;
case NEU_REQ_GET_NODE_STATE:
data_size = sizeof(neu_req_get_node_state_t);
break;
case NEU_RESP_GET_NODE_STAT:
data_size = sizeof(neu_resp_get_node_stat_t);
break;
case NEU_RESP_GET_NODE_STATE:
data_size = sizeof(neu_resp_get_node_state_t);
break;
-2
View File
@@ -486,7 +486,6 @@ static int manager_loop(enum neu_event_io_type type, int fd, void *usr_data)
case NEU_REQ_GET_NODE_SETTING:
case NEU_REQ_READ_GROUP:
case NEU_REQ_WRITE_TAG:
case NEU_REQ_GET_NODE_STAT:
case NEU_REQ_GET_NODE_STATE:
case NEU_REQ_GET_TAG:
case NEU_REQ_NODE_CTL:
@@ -583,7 +582,6 @@ static int manager_loop(enum neu_event_io_type type, int fd, void *usr_data)
case NEU_RESP_GET_TAG:
case NEU_RESP_GET_GROUP:
case NEU_RESP_GET_NODE_SETTING:
case NEU_RESP_GET_NODE_STAT:
case NEU_RESP_GET_NODE_STATE:
case NEU_RESP_ERROR:
case NEU_RESP_READ_GROUP: