Subject: Rare project developers
List archive
- From: Alexander Gall <>
- To: " Frédéric LOUI" <>
- Cc: <>
- Subject: [rare-dev] SNMP sub-interface counter logic in bf_forwarder
- Date: Wed, 23 Feb 2022 16:34:53 +0100
Hello Frederic
I'm trying to understand the logic of this code:
self.subif_counters.update(
{
counter_id: [
stats_in["$COUNTER_SPEC_PKTS"]
- stats_pkt_out["$COUNTER_SPEC_PKTS"],
stats_in["$COUNTER_SPEC_BYTES"]
- stats_pkt_out["$COUNTER_SPEC_BYTES"],
stats_out["$COUNTER_SPEC_PKTS"]
+ stats_pkt_out["$COUNTER_SPEC_PKTS"],
stats_out["$COUNTER_SPEC_BYTES"]
+ stats_pkt_out["$COUNTER_SPEC_BYTES"],
]
}
)
stats_{in,out} are the counters from ig_ctl_vlan_in and
eg_ctl_vlan_out and stats_pkt_out is the counter for packets coming in
from the CPU port. Those packets are sent directly to their egress
port without passing through eg_ctl_vlan_out, i.e. they will not be
accounted for in stats_out. This is corrected for by adding
stats_pkt_out to stats_out, so I understand that part.
However, I don't understand why we should subtract those packets from
stats_in since they were never counted there in the first place.
I'm asking you because I believe that the sub-interface code was
written by you and maybe you had a reason for it that I'm not seeing
:)
I guess there is similar logic for the counters reported to
freerouter. How is this case handled there?
--
Alex
- [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Alexander Gall, 02/23/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Frédéric LOUI, 02/23/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Alexander Gall, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, mc36, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Frédéric LOUI, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Alexander Gall, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Frédéric LOUI, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Alexander Gall, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Frédéric LOUI, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Alexander Gall, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Alexander Gall, 02/24/2022
- Re: [rare-dev] SNMP sub-interface counter logic in bf_forwarder, Frédéric LOUI, 02/23/2022
Archive powered by MHonArc 2.6.19.