On Thu, 21 Dec 2023 17:15:46 +1100 David Gibson <david(a)gibson.dropbear.id.au> wrote:In general, the passt code is a bit haphazard about what's a true global variable and what's in the quasi-global 'context structure'. The flow_count field is one such example: it's in the context structure, although it's really part of the same data structure as flowtab[], which is a genuine global.Well, the reason is that flow_tab[FLOW_MAX] might be problematically too big to live on the stack, unlike flow_count. But anyway, as far as thoughts of multithreading are concerned, both should probably be global. And sure, it's more consistent this way.Move flow_count to be a regular global to match. For now it needs to be public, rather than static, but we expect to be able to change that in future.If it's not static, it should be initialised, and that's not done here. This becomes 'flow_first_free' in 13/13, but it's not initialised either, and that should also start off as zero. -- Stefano