stratum / fabric-tna

The SD-Fabric data plane
https://docs.sd-fabric.org/
31 stars 15 forks source link

Fix UPF counter idx 0 incremented when no sessions hit #488

Closed daniele-moro closed 2 years ago

daniele-moro commented 2 years ago

We noticed that the egress UPF counter at index 0 was incremented even if had no traffic for the flow using that UPF counter index. This happens because traffic can potentially match on the interfaces table but miss the sessions table without causing a drop of the packet which would skip the egress UPF counter. This can for example happen if a forwarding decision is taken by ACL. For this reason, we ensure to skip the egress UPF counter if we have a miss in the sessions table (sess_hit is false).

codecov[bot] commented 2 years ago

Codecov Report

Merging #488 (3c37414) into main (d962f6b) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 3c37414 differs from pull request most recent head a014fa0. Consider uploading reports for the commit a014fa0 to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #488   +/-   ##
=========================================
  Coverage     69.90%   69.90%           
  Complexity      722      722           
=========================================
  Files            63       63           
  Lines          4748     4748           
  Branches        523      523           
=========================================
  Hits           3319     3319           
  Misses         1157     1157           
  Partials        272      272           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d962f6b...a014fa0. Read the comment docs.