> On 21 Nov 2021, at 04:14, Alexander Bluhm <[email protected]> wrote:
>
> On Sun, Nov 21, 2021 at 02:56:58AM +0300, Vitaliy Makkoveev wrote:
>> Also I found the `ipsec_notdb' counter description in header doesn't
>> math to netstat(1) description. We never count `ipsec_notdb' and the
>> netstat(1) description looks more appropriate so I used it to avoid
>> confusion with the new counter added.
>
> The counters and their description matches the structure of the
> code 20 years ago. As we are in the middle of refactoring, global
> counter cleanup does not make sense now.
>
> Adding new counters with proper names makes perfect sense. When
> the code has settled we can clean up the old stuff easily.
>
>> ok?
>
> OK bluhm@
>
> One nit:
>
>> pfkeyv2_expire(tdb, SADB_EXT_LIFETIME_HARD);
>> tdb_delete(tdb);
>> + ipsecstat_inc(ipsec_exctdb);
>
>> + if (!(tdb->tdb_flags & TDBF_INVALID)) {
>> pfkeyv2_expire(tdb, SADB_EXT_LIFETIME_HARD);
>> + ipsecstat_inc(ipsec_exctdb);
>> + }
>> tdb_delete(tdb);
>
> The order is inconsistent. Can we have pfkeyv2_expire();
> ipsecstat_inc(); tdb_delete(); everywhere?
The order ipsecstat_inc(); pfkeyv2_expire(); tdb_delete(); looks
more consistent to me. ok?