You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stats aren't getting updated with call to refresh #55
watching strace(), it does seem that we fire off the RTM_GETLINK message and even get IFLA_STATS64 in response. i bet the issue is that we drop messages for known ifaces, which would have all kinds of problems (won't pick up new MTU, etc.)
it looks like iface_create() just whips up a new iface for every NEW message it sees...seriously? indeed, the iface_count stat goes up by a constant amount each iteration. oy vey!
it looks like in iface_cb() we replace the existing entry in the nametrie, but we never remove the item from the iface_hash. we always insert the new iface at the head of the hash chain, so all lookups find the new one. we're of course holding a local reference to the netstack_iface. so i think what we need do is check for an existing item when we go to add into the name trie, and update that item rather than replacing it? and then free the new item.
we can't just replace the old with the new, because someone might have a handle on it. though how do we handle locking in that case?
Activity
dankamongmen commentedon May 12, 2023
watching strace(), it does seem that we fire off the
RTM_GETLINKmessage and even getIFLA_STATS64in response. i bet the issue is that we drop messages for known ifaces, which would have all kinds of problems (won't pick up new MTU, etc.)dankamongmen commentedon May 12, 2023
it looks like
iface_create()just whips up a new iface for everyNEWmessage it sees...seriously? indeed, theiface_countstat goes up by a constant amount each iteration. oy vey!dankamongmen commentedon May 12, 2023
it looks like in
iface_cb()we replace the existing entry in the nametrie, but we never remove the item from theiface_hash. we always insert the new iface at the head of the hash chain, so all lookups find the new one. we're of course holding a local reference to thenetstack_iface. so i think what we need do is check for an existing item when we go to add into the name trie, and update that item rather than replacing it? and then free the new item.we can't just replace the old with the new, because someone might have a handle on it. though how do we handle locking in that case?