diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-08-10 22:15:29 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-08-11 19:30:32 +0200 |
commit | 812e6c78c10970d0c5e7e5f3d1ed54dc95736244 (patch) | |
tree | 5c3941df9bca4e8f35c8ae8337bf114f7ba7e812 /ospfd/ospf_packet.c | |
parent | Merge pull request #11778 from AbhishekNR/ttable_mroute (diff) | |
download | frr-812e6c78c10970d0c5e7e5f3d1ed54dc95736244.tar.xz frr-812e6c78c10970d0c5e7e5f3d1ed54dc95736244.zip |
ospfd: Increase packets sent at one time in ospf_write
ospf_write pulls an interface off the ospf->oi_write_q
then writes one packet and places it back on the queue,
keeping track of the first one sent. Then it will
stop sending packets even if we get back to the first
interface written too but before we have sent the full
pkt_count. I do not believe this makes a whole bunch
of sense and is very restrictive of how much data can
be sent especially if you have a limited number of peers
but large amounts of data. Why be so restrictive?
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 4b3f30a3f..907cb15ed 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -623,7 +623,6 @@ static void ospf_write(struct thread *thread) { struct ospf *ospf = THREAD_ARG(thread); struct ospf_interface *oi; - struct ospf_interface *last_serviced_oi = NULL; struct ospf_packet *op; struct sockaddr_in sa_dst; struct ip iph; @@ -664,13 +663,7 @@ static void ospf_write(struct thread *thread) ipid = (time(NULL) & 0xffff); #endif /* WANT_OSPF_WRITE_FRAGMENT */ - while ((pkt_count < ospf->write_oi_count) && oi - && (last_serviced_oi != oi)) { - /* If there is only packet in the queue, the oi is removed from - write-q, so fix up the last interface that was serviced */ - if (last_serviced_oi == NULL) { - last_serviced_oi = oi; - } + while ((pkt_count < ospf->write_oi_count) && oi) { pkt_count++; #ifdef WANT_OSPF_WRITE_FRAGMENT /* convenience - max OSPF data per packet */ @@ -853,11 +846,9 @@ static void ospf_write(struct thread *thread) list_delete_node(ospf->oi_write_q, node); if (ospf_fifo_head(oi->obuf) == NULL) { oi->on_write_q = 0; - last_serviced_oi = NULL; oi = NULL; - } else { + } else listnode_add(ospf->oi_write_q, oi); - } /* Setup to service from the head of the queue again */ if (!list_isempty(ospf->oi_write_q)) { |