mirror of
https://opendev.org/x/pyghmi
synced 2025-05-30 17:46:41 +00:00
Avoid abandoning retry when SOL packet is not ACK
The design was to abandon retry when data comes in, ACK or not. This became a problem when console.py retried under frantic conditions, confusing some BMC implementations, and so that was removed. With that removed, BMC traffic was still cancelling the retry, but nothing was reinstated in retry anymore. Fix by having session.py understand a few bits of SOL payload enough to identify at least if it is *an* ACK at all. If it's one of the 'weird' ACK scenarios, sol handler still must handle, but simple no-ACK scenario now contained in session.py. Change-Id: I609ff783cd6cc2bf431271280bb55da4126f2cfc
This commit is contained in:
parent
1b5ae5d8e0
commit
fbd95bc3b3
@ -1190,11 +1190,13 @@ class Session(object):
|
||||
if ptype == 0:
|
||||
self._parse_ipmi_payload(payload)
|
||||
elif ptype == 1: # There should be no other option
|
||||
# note that we assume the SOL payload is good enough to avoid
|
||||
# retry SOL logic is sufficiently different, we just
|
||||
# defer that call to the sol handler, it can re submit if it
|
||||
# is unhappy
|
||||
if self.last_payload_type == 1: # but only if SOL was last tx
|
||||
if (payload[1] & 0b1111) and self.last_payload_type == 1:
|
||||
# for ptype 1, the 4 least significant bits of 2nd byte
|
||||
# is the ACK number.
|
||||
# if it isn't an ACK at all, we'll keep retrying, however
|
||||
# if it's a subtle SOL situation (partial ACK, wrong ACK)
|
||||
# then sol_handler will have to resubmit and we will
|
||||
# stop the generic retry behavior here
|
||||
self.lastpayload = None
|
||||
self.last_payload_type = None
|
||||
Session.waiting_sessions.pop(self, None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user