Commit:
a0b937de428e14e869b8541f0b7810113d619c2e
Introduced the idea of a input Q packet limit. Say you read in
635000 bytes of data and the input Q is already at it's limit
(currently 1000) then when bgp_process_reads runs it will
assert because there is less then a BGP_MAX_PACKET_SIZE in ibuf_work.
Don't assert as that it's irrelevant. Even if we can't read a full packet
in let's let the whole system keep working as that as the input Q length
comes down we will start pulling down the ibuf_work and it will be ok.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit
102bad0a9b65279358db787e2972a1711606d224)
bool fatal = false; /* whether fatal error occurred */
bool added_pkt = false; /* whether we pushed onto ->ibuf */
int code = 0; /* FSM code if error occurred */
- bool ibuf_full = false; /* Is peer fifo IN Buffer full */
static bool ibuf_full_logged; /* Have we logged full already */
int ret = 1;
/* clang-format on */
fatal = true;
break;
case -ENOMEM:
- ibuf_full = true;
if (!ibuf_full_logged) {
if (bgp_debug_neighbor_events(peer))
zlog_debug(
return;
}
- /* ringbuf should be fully drained unless ibuf is full */
- if (!ibuf_full)
- assert(ringbuf_space(peer->ibuf_work) >= peer->max_packet_size);
-
event_add_read(fpt->master, bgp_process_reads, peer, peer->fd,
&peer->t_read);
if (added_pkt)