)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"a03439831d4dcf89d010598dce4c0a1b20ef58df","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1e26a852_5dc7d37e","updated":"2025-10-18 17:01:34.000000000","message":"I think this needs more discussion on which counters on what event and in what mode (client side / CM_P2P vs. server side) to put where","commit_id":"8f119b9658818aa98f337e9d48a5b0c1c9b5d95c"}],"src/openvpn/dco_freebsd.c":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"a03439831d4dcf89d010598dce4c0a1b20ef58df","unresolved":true,"context_lines":[{"line_number":622,"context_line":"                const nvlist_t *bytes \u003d nvlist_get_nvlist(nvl, \"bytes\");"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"                dco-\u003ec-\u003ec2.dco_read_bytes \u003d nvlist_get_number(bytes, \"in\");"},{"line_number":625,"context_line":"                dco-\u003ec-\u003ec2.dco_write_bytes \u003d nvlist_get_number(bytes, \"out\");"},{"line_number":626,"context_line":"            }"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            dco-\u003edco_message_type \u003d OVPN_CMD_DEL_PEER;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"4f9c725c_42b0c79e","line":625,"updated":"2025-10-18 17:01:34.000000000","message":"I don\u0027t think this is the correct place to store these.\n\nThe overall context here is \"OVPN_NOTIF_DEL_PEER\", so we\u0027re told by the kernel that `dco-\u003edco_message_peer_id` went away, and, btw, here are the latest counters for this peer.\n\nStoring it in `dco-\u003ec-\u003ec2-\u003e` smells like \"the server\u0027s global structure\" while Linux would put per-client into `dco-\u003ec-\u003emulti-\u003einstances[peer_id]-\u003econtext.c2-\u003e` - OTOH, Linux\u0027 `CMD_PEER_DEL_NTF` seems to carry no counters, so the code is not the same anyway.\n\nAm I misreading this?","commit_id":"8f119b9658818aa98f337e9d48a5b0c1c9b5d95c"},{"author":{"_account_id":1000007,"name":"ordex","display_name":"Antonio Quartulli","email":"antonio@mandelbit.com","username":"ordex"},"change_message_id":"511bee86dcc353c89fcd495cc482c52e713a95e7","unresolved":true,"context_lines":[{"line_number":622,"context_line":"                const nvlist_t *bytes \u003d nvlist_get_nvlist(nvl, \"bytes\");"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"                dco-\u003ec-\u003ec2.dco_read_bytes \u003d nvlist_get_number(bytes, \"in\");"},{"line_number":625,"context_line":"                dco-\u003ec-\u003ec2.dco_write_bytes \u003d nvlist_get_number(bytes, \"out\");"},{"line_number":626,"context_line":"            }"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            dco-\u003edco_message_type \u003d OVPN_CMD_DEL_PEER;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"eaa99283_eaf32505","line":625,"in_reply_to":"4f9c725c_42b0c79e","updated":"2025-10-18 21:29:34.000000000","message":"actually if you check `dco_update_peer_stat()` it already does the right thing, similarly to what Gert is alluding to. Maybe this function can be re-used while parsing `OVPN_NOTIF_DEL_PEER`?","commit_id":"8f119b9658818aa98f337e9d48a5b0c1c9b5d95c"},{"author":{"_account_id":1000041,"name":"ralf_lici","display_name":"Ralf Lici","email":"ralf@mandelbit.com","username":"ralf_lici"},"change_message_id":"22a140a305a6061adc54779931cd87b6a453dda4","unresolved":false,"context_lines":[{"line_number":622,"context_line":"                const nvlist_t *bytes \u003d nvlist_get_nvlist(nvl, \"bytes\");"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"                dco-\u003ec-\u003ec2.dco_read_bytes \u003d nvlist_get_number(bytes, \"in\");"},{"line_number":625,"context_line":"                dco-\u003ec-\u003ec2.dco_write_bytes \u003d nvlist_get_number(bytes, \"out\");"},{"line_number":626,"context_line":"            }"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"            dco-\u003edco_message_type \u003d OVPN_CMD_DEL_PEER;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"75cffd49_b9737742","line":625,"in_reply_to":"eaa99283_eaf32505","updated":"2025-10-19 08:37:49.000000000","message":"Yeah, you\u0027re right, the peer stats we\u0027re parsing here should go into the correct `multi_instance` context rather than the general server context. I went with Antonio\u0027s suggestion and reused `dco_update_peer_stat()`, which already handles this properly.","commit_id":"8f119b9658818aa98f337e9d48a5b0c1c9b5d95c"}]}
