Subject: Re: Netlink NLM_F_DUMP_INTR flag lost

From: Jakub Kicinski <[email-masked]>
Date: Wed, 22 Jun 2022 16:55:47 -0700

On Wed, 22 Jun 2022 13:12:18 +0200 Ismael Luceno wrote:
> So, just for clarification:
> 
> Scenario 1:
> - 64 KB packet is filled.
> - protocol table shrinks
> - Next iteration finds it's done
> - next protocol clears the seq, so nothing is flaged
> - ...
> - NLMSG_DONE (not flagged)
> 
> Scenario 2:
> - 64 KB packet is filled.
> - protocol table shrinks
> - Next iteration finds it's done
> - NLMSG_DONE (flagged with NLM_F_DUMP_INTR)
> 
> So, in order to break as little as possible, I was thinking about
> introducing a new packet iff it happens we have to signal INTR between
> protocols.
> 
> Does that sound good?

Right, the question is what message can we introduce here which would
not break old user space?

The alternative of not wiping the _DUMP_INTR flag as we move thru
protocols seems more and more appealing, even tho I was initially
dismissive.

We should make sure we do one last consistency check before we return 0
from the handlers. Or even at the end of the loop in rtnl_dump_all().