Uploaded image for project: 'VOLTHA'
  2. VOL-3957

openolt adapter cannot recover flow add retries for a flow that failed due to arriving out of sequence




      -> assume onu1 has alloc/gem 1024/1024 and initially has only one flow id 1 (default eap upstream). Flow reference to gem is 1
      -> after subscriber provision downstream hsi arrives and alloc/gem exists already and also meter is for different direction so flow is added . Flow reference to gem is now increased to 2.
      -> upstream hsi arrives but is rejected due to meter mismatch (eap is still not deleted.)
      -> eap is now removed and flow reference to gem decreased to 1, but scheduler/queues are not removed because there is still reference to gem. Unless we    clear scheduler/queues we do not clear meter info from kv store. The upstream hsi is being retried, but keeps failing due to this reason.There are two ways to solve this problem * I think we are using tp id 64 for hsi. We should use a different tp id, say 65. That way different set of gemports and tconts are created and old references and resources would have been cleared as soon as eap was deleted. We should have ideally never have used tp id 64 for ATT as 64 is default TP meant for EAP only

      • We should clear meter-id for a given direction as soon as all flows for a given direction are freed up.

      The second approach sounds like a reasonable approach to solve the issue while while the first one is more of a hack.