diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-25 17:03:41 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-25 17:03:41 +0200 |
commit | a37ef435e9514a455931ddbac090e9bea0943bb5 (patch) | |
tree | 2b8961d346e6e9dbda16c41ae301bfce4a4c2b82 /zebra | |
parent | zebra: Allow user to specify work-queue processing hold time (diff) | |
download | frr-a37ef435e9514a455931ddbac090e9bea0943bb5.tar.xz frr-a37ef435e9514a455931ddbac090e9bea0943bb5.zip |
zebra: Store packets to process in `struct zebra_t`
Store the number of packets we should process at
one time in `struct zebra_t`. A future commit
will allow the user to control this via
a hidden cli.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/main.c | 1 | ||||
-rw-r--r-- | zebra/zserv.c | 2 | ||||
-rw-r--r-- | zebra/zserv.h | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/zebra/main.c b/zebra/main.c index 5a2979c86..cf677a775 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -53,6 +53,7 @@ /* Zebra instance */ struct zebra_t zebrad = { .rtm_table_default = 0, + .packets_to_process = ZEBRA_ZAPI_PACKETS_TO_PROCESS, }; /* process id. */ diff --git a/zebra/zserv.c b/zebra/zserv.c index fe8213702..cbd532339 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -2387,7 +2387,7 @@ static int zebra_client_read(struct thread *thread) uint8_t marker, version; vrf_id_t vrf_id; struct zebra_vrf *zvrf; - int packets = 10; + int packets = zebrad.packets_to_process; /* Get thread data. Reset reading thread because I'm running. */ sock = THREAD_FD(thread); diff --git a/zebra/zserv.h b/zebra/zserv.h index d847526f2..279b56ec3 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -138,6 +138,9 @@ struct zebra_t { /* LSP work queue */ struct work_queue *lsp_process_q; + + #define ZEBRA_ZAPI_PACKETS_TO_PROCESS 10 + u_int32_t packets_to_process; }; extern struct zebra_t zebrad; extern unsigned int multipath_num; |