diff options
author | Christian Hopps <chopps@labn.net> | 2023-12-30 15:58:52 +0100 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-12-30 17:03:45 +0100 |
commit | 39e0f331d26732882ec62d038d38e61baa59d801 (patch) | |
tree | 634e3888d5b37c007762819913de5e05e852fea6 | |
parent | lib: fix coverity CID 1574981 (diff) | |
download | frr-39e0f331d26732882ec62d038d38e61baa59d801.tar.xz frr-39e0f331d26732882ec62d038d38e61baa59d801.zip |
lib: mgmtd: increase soft-max msg size to 64K
- remove unused mgmt client/server constants
Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r-- | lib/mgmt_be_client.c | 2 | ||||
-rw-r--r-- | lib/mgmt_be_client.h | 29 | ||||
-rw-r--r-- | lib/mgmt_fe_client.c | 2 | ||||
-rw-r--r-- | lib/mgmt_fe_client.h | 15 | ||||
-rw-r--r-- | mgmtd/mgmt_be_adapter.c | 2 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_adapter.c | 2 |
6 files changed, 14 insertions, 38 deletions
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c index 2ffcd8f9f..c3fb34a7a 100644 --- a/lib/mgmt_be_client.c +++ b/lib/mgmt_be_client.c @@ -1060,7 +1060,7 @@ struct mgmt_be_client *mgmt_be_client_create(const char *client_name, mgmt_be_client_notify_conenct, mgmt_be_client_notify_disconenct, mgmt_be_client_process_msg, MGMTD_BE_MAX_NUM_MSG_PROC, - MGMTD_BE_MAX_NUM_MSG_WRITE, MGMTD_BE_MSG_MAX_LEN, false, + MGMTD_BE_MAX_NUM_MSG_WRITE, MGMTD_BE_MAX_MSG_LEN, false, "BE-client", MGMTD_DBG_BE_CLIENT_CHECK()); MGMTD_BE_CLIENT_DBG("Initialized client '%s'", client_name); diff --git a/lib/mgmt_be_client.h b/lib/mgmt_be_client.h index 3af87a73c..8ad482cac 100644 --- a/lib/mgmt_be_client.h +++ b/lib/mgmt_be_client.h @@ -20,25 +20,12 @@ extern "C" { * Constants ***************************************************************/ -#define MGMTD_BE_CLIENT_ERROR_STRING_MAX_LEN 32 - -#define MGMTD_BE_DEFAULT_CONN_RETRY_INTVL_SEC 5 - -#define MGMTD_BE_MSG_PROC_DELAY_USEC 10 -#define MGMTD_BE_MAX_NUM_MSG_PROC 500 - -#define MGMTD_BE_MSG_WRITE_DELAY_MSEC 1 +#define MGMTD_BE_MAX_NUM_MSG_PROC 500 #define MGMTD_BE_MAX_NUM_MSG_WRITE 1000 +#define MGMTD_BE_MAX_MSG_LEN (64 * 1024) -#define GMGD_BE_MAX_NUM_REQ_ITEMS 64 - -#define MGMTD_BE_MSG_MAX_LEN 16384 - -#define MGMTD_SOCKET_BE_SEND_BUF_SIZE 65535 -#define MGMTD_SOCKET_BE_RECV_BUF_SIZE MGMTD_SOCKET_BE_SEND_BUF_SIZE - -#define MGMTD_MAX_CFG_CHANGES_IN_BATCH \ - ((10 * MGMTD_BE_MSG_MAX_LEN) / \ +#define MGMTD_MAX_CFG_CHANGES_IN_BATCH \ + ((10 * MGMTD_BE_MAX_MSG_LEN) / \ (MGMTD_MAX_XPATH_LEN + MGMTD_MAX_YANG_VALUE_LEN)) /* @@ -47,11 +34,11 @@ extern "C" { * that gets added to sent message */ #define MGMTD_BE_CFGDATA_PACKING_EFFICIENCY 0.8 -#define MGMTD_BE_CFGDATA_MAX_MSG_LEN \ - (MGMTD_BE_MSG_MAX_LEN * MGMTD_BE_CFGDATA_PACKING_EFFICIENCY) +#define MGMTD_BE_CFGDATA_MAX_MSG_LEN \ + (MGMTD_BE_MAX_MSG_LEN * MGMTD_BE_CFGDATA_PACKING_EFFICIENCY) -#define MGMTD_BE_MAX_BATCH_IDS_IN_REQ \ - (MGMTD_BE_MSG_MAX_LEN - 128) / sizeof(uint64_t) +#define MGMTD_BE_MAX_BATCH_IDS_IN_REQ \ + (MGMTD_BE_MAX_MSG_LEN - 128) / sizeof(uint64_t) #define MGMTD_BE_CONTAINER_NODE_VAL "<<container>>" diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c index c30a0339e..0bea66300 100644 --- a/lib/mgmt_fe_client.c +++ b/lib/mgmt_fe_client.c @@ -729,7 +729,7 @@ struct mgmt_fe_client *mgmt_fe_client_create(const char *client_name, mgmt_fe_client_notify_connect, mgmt_fe_client_notify_disconnect, mgmt_fe_client_process_msg, MGMTD_FE_MAX_NUM_MSG_PROC, - MGMTD_FE_MAX_NUM_MSG_WRITE, MGMTD_FE_MSG_MAX_LEN, true, + MGMTD_FE_MAX_NUM_MSG_WRITE, MGMTD_FE_MAX_MSG_LEN, true, "FE-client", MGMTD_DBG_FE_CLIENT_CHECK()); MGMTD_FE_CLIENT_DBG("Initialized client '%s'", client_name); diff --git a/lib/mgmt_fe_client.h b/lib/mgmt_fe_client.h index 3a1a1e570..f3292d18f 100644 --- a/lib/mgmt_fe_client.h +++ b/lib/mgmt_fe_client.h @@ -25,22 +25,11 @@ extern "C" { * connections. */ -#define MGMTD_FE_CLIENT_ERROR_STRING_MAX_LEN 32 - -#define MGMTD_FE_DEFAULT_CONN_RETRY_INTVL_SEC 5 - #define MGMTD_FE_MSG_PROC_DELAY_USEC 10 -#define MGMTD_FE_MAX_NUM_MSG_PROC 500 -#define MGMTD_FE_MSG_WRITE_DELAY_MSEC 1 +#define MGMTD_FE_MAX_NUM_MSG_PROC 500 #define MGMTD_FE_MAX_NUM_MSG_WRITE 100 - -#define GMGD_FE_MAX_NUM_REQ_ITEMS 64 - -#define MGMTD_FE_MSG_MAX_LEN 9000 - -#define MGMTD_SOCKET_FE_SEND_BUF_SIZE 65535 -#define MGMTD_SOCKET_FE_RECV_BUF_SIZE MGMTD_SOCKET_FE_SEND_BUF_SIZE +#define MGMTD_FE_MAX_MSG_LEN (64 * 1024) /*************************************************************** * Data-structures diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c index 0d678452f..eb6e79f2a 100644 --- a/mgmtd/mgmt_be_adapter.c +++ b/mgmtd/mgmt_be_adapter.c @@ -735,7 +735,7 @@ struct msg_conn *mgmt_be_create_adapter(int conn_fd, union sockunion *from) mgmt_be_adapter_process_msg, MGMTD_BE_MAX_NUM_MSG_PROC, MGMTD_BE_MAX_NUM_MSG_WRITE, - MGMTD_BE_MSG_MAX_LEN, adapter, + MGMTD_BE_MAX_MSG_LEN, adapter, "BE-adapter"); adapter->conn->debug = DEBUG_MODE_CHECK(&mgmt_debug_be, DEBUG_MODE_ALL); diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c index 87c67491b..d98444703 100644 --- a/mgmtd/mgmt_fe_adapter.c +++ b/mgmtd/mgmt_fe_adapter.c @@ -1344,7 +1344,7 @@ struct msg_conn *mgmt_fe_create_adapter(int conn_fd, union sockunion *from) adapter->conn = msg_server_conn_create( mgmt_loop, conn_fd, mgmt_fe_adapter_notify_disconnect, mgmt_fe_adapter_process_msg, MGMTD_FE_MAX_NUM_MSG_PROC, - MGMTD_FE_MAX_NUM_MSG_WRITE, MGMTD_FE_MSG_MAX_LEN, + MGMTD_FE_MAX_NUM_MSG_WRITE, MGMTD_FE_MAX_MSG_LEN, adapter, "FE-adapter"); adapter->conn->debug = DEBUG_MODE_CHECK(&mgmt_debug_fe, |