> On Apr 7, 2023, at 2:34 AM, Gleb Smirnoff <gleb...@freebsd.org> wrote:
> 
>  Hi,
> 
> recently we had several drivers marked with IFF_KNOWSEPOCH
> which reminded me that this flag was supposed to be temporary.
> 
> Here is the change that introduced it e87c4940156. It was
> caused by several drivers sending packets from non-interrupt
> context and thus triggering NET_EPOCH_ASSERT(). It was about
> 10 - 20 drivers having this problem initially and reduced down
> to a few after 4426b2e64bd. We had a pretty heated dicussion
> back then and I apologize for that.
> 
> May I suggest before entering FreeBSD 14.0-RELEASE cycle we
> will get back to what was there before e87c4940156?

It sounds good if only a few drivers need IFF_NEEDSEPOCH.

> 
> To avoid the driver fallout that we used to have back in
> early 2020, here is the plan. In ether_input() where we
> now conditionally on the IFF_KNOWSEPOCH flag enter/exit the
> epoch with INVARIANTS we will also conditionally enter/exit
> in case we are supposed to be in the epoch wrt the flag, but
> we are not. We will also print a warning once, like "interface
> foo0 called if_input without epoch". This handling will be
> converted to normal assertion after a couple months.

Should also apply to infiniband_input().

BTW, is `in_epoch()` too heavy to replace flag IFF_NEEDSEPOCH
or IFF_KNOWSEPOCH ?

> 
> If everybody is fine with this suggestion I will post
> a review. Otherwise please express your concerns.

Good to make it moving forward ;)

Best regards,
Zhenlei

> 
> -- 
> Gleb Smirnoff



Reply via email to