mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
pimd: Add knob to control # of packets read in at one time
Add 'ip pim packets <1-100>' command. Allows you to control the number of packets read in before giving control back to another part of the process. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
7176984f74
commit
8e4c9ef376
@ -3434,6 +3434,29 @@ DEFUN (no_ip_pim_keep_alive,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN (ip_pim_packets,
|
||||||
|
ip_pim_packets_cmd,
|
||||||
|
"ip pim packets <1-100>",
|
||||||
|
IP_STR
|
||||||
|
"pim multicast routing\n"
|
||||||
|
"Number of packets to process at one time per fd\n")
|
||||||
|
{
|
||||||
|
qpim_packet_process = atoi (argv[3]->arg);
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFUN (no_ip_pim_packets,
|
||||||
|
no_ip_pim_packets_cmd,
|
||||||
|
"no ip pim packets <1-100>",
|
||||||
|
NO_STR
|
||||||
|
IP_STR
|
||||||
|
"pim multicast routing\n"
|
||||||
|
"Number of packets to process at one time per fd\n")
|
||||||
|
{
|
||||||
|
qpim_packet_process = PIM_DEFAULT_PACKET_PROCESS;
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN (ip_pim_rp,
|
DEFUN (ip_pim_rp,
|
||||||
ip_pim_rp_cmd,
|
ip_pim_rp_cmd,
|
||||||
"ip pim rp A.B.C.D [A.B.C.D/M]",
|
"ip pim rp A.B.C.D [A.B.C.D/M]",
|
||||||
@ -5964,6 +5987,8 @@ void pim_cmd_init()
|
|||||||
install_element (CONFIG_NODE, &no_ip_pim_register_suppress_cmd);
|
install_element (CONFIG_NODE, &no_ip_pim_register_suppress_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_pim_keep_alive_cmd);
|
install_element (CONFIG_NODE, &ip_pim_keep_alive_cmd);
|
||||||
install_element (CONFIG_NODE, &no_ip_pim_keep_alive_cmd);
|
install_element (CONFIG_NODE, &no_ip_pim_keep_alive_cmd);
|
||||||
|
install_element (CONFIG_NODE, &ip_pim_packets_cmd);
|
||||||
|
install_element (CONFIG_NODE, &no_ip_pim_packets_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_ssmpingd_cmd);
|
install_element (CONFIG_NODE, &ip_ssmpingd_cmd);
|
||||||
install_element (CONFIG_NODE, &no_ip_ssmpingd_cmd);
|
install_element (CONFIG_NODE, &no_ip_ssmpingd_cmd);
|
||||||
install_element (CONFIG_NODE, &ip_msdp_peer_cmd);
|
install_element (CONFIG_NODE, &ip_msdp_peer_cmd);
|
||||||
|
@ -578,7 +578,7 @@ static int mroute_read(struct thread *t)
|
|||||||
result = pim_mroute_msg(fd, buf, rd);
|
result = pim_mroute_msg(fd, buf, rd);
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
if (count % 3 == 0)
|
if (count % qpim_packet_process == 0)
|
||||||
cont = 0;
|
cont = 0;
|
||||||
}
|
}
|
||||||
/* Keep reading */
|
/* Keep reading */
|
||||||
|
@ -353,7 +353,7 @@ static int pim_sock_read(struct thread *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
if (count % 3 == 0)
|
if (count % qpim_packet_process == 0)
|
||||||
cont = 0;
|
cont = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,6 +168,12 @@ int pim_global_config_write(struct vty *vty)
|
|||||||
qpim_keep_alive_time, VTY_NEWLINE);
|
qpim_keep_alive_time, VTY_NEWLINE);
|
||||||
++writes;
|
++writes;
|
||||||
}
|
}
|
||||||
|
if (qpim_packet_process != PIM_DEFAULT_PACKET_PROCESS)
|
||||||
|
{
|
||||||
|
vty_out (vty, "ip pim packets %d%s",
|
||||||
|
qpim_packet_process, VTY_NEWLINE);
|
||||||
|
++writes;
|
||||||
|
}
|
||||||
|
|
||||||
if (qpim_ssmpingd_list) {
|
if (qpim_ssmpingd_list) {
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
|
@ -72,6 +72,7 @@ struct list *qpim_static_route_list = NULL;
|
|||||||
unsigned int qpim_keep_alive_time = PIM_KEEPALIVE_PERIOD;
|
unsigned int qpim_keep_alive_time = PIM_KEEPALIVE_PERIOD;
|
||||||
signed int qpim_rp_keep_alive_time = 0;
|
signed int qpim_rp_keep_alive_time = 0;
|
||||||
int64_t qpim_nexthop_lookups = 0;
|
int64_t qpim_nexthop_lookups = 0;
|
||||||
|
int qpim_packet_process = PIM_DEFAULT_PACKET_PROCESS;
|
||||||
|
|
||||||
int32_t qpim_register_suppress_time = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
|
int32_t qpim_register_suppress_time = PIM_REGISTER_SUPPRESSION_TIME_DEFAULT;
|
||||||
int32_t qpim_register_probe_time = PIM_REGISTER_PROBE_TIME_DEFAULT;
|
int32_t qpim_register_probe_time = PIM_REGISTER_PROBE_TIME_DEFAULT;
|
||||||
|
@ -119,6 +119,8 @@ int64_t qpim_nexthop_lookups;
|
|||||||
struct list *qpim_static_route_list; /* list of routes added statically */
|
struct list *qpim_static_route_list; /* list of routes added statically */
|
||||||
extern unsigned int qpim_keep_alive_time;
|
extern unsigned int qpim_keep_alive_time;
|
||||||
extern signed int qpim_rp_keep_alive_time;
|
extern signed int qpim_rp_keep_alive_time;
|
||||||
|
extern int qpim_packet_process;
|
||||||
|
#define PIM_DEFAULT_PACKET_PROCESS 3
|
||||||
|
|
||||||
#define PIM_JP_HOLDTIME (qpim_t_periodic * 7 / 2)
|
#define PIM_JP_HOLDTIME (qpim_t_periodic * 7 / 2)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user