User Details
- User Since
- Jun 22 2015, 5:21 PM (594 w, 6 d)
Yesterday
Sat, Nov 14
Fri, Nov 13
Thu, Nov 12
mjg's idea to use the current CPU works nearly as well as perfect round-robin and makes for a much smaller patch
Wed, Nov 11
My llm, when reviewing this, complains that the patch increases the number of divides per packet from 3 to 4, and suggests this math instead:
Tue, Nov 10
Mon, Nov 9
- update baudrate usage as suggested by kbowling
Sun, Nov 8
Sat, Nov 7
Fri, Nov 6
This seems reasonable. But bnxt_ktls_pre_xmit() seems to use the same pattern that you're fixing here. Does it also need the same fix?
If I'm reading this right, a lone packet waits for two timer callbacks. bnxt_isc_txd_flush() saves the producer index and increments tx_db_seq without ringing. The next bnxt_if_timer() seees a changed sequence and only records it; the following callback rings if the sequence stayed unchanged. The default iflib period is hz / 2 (sys/net/iflib.c:6293), so this adds approximately 500 ms–1 second per affected transmit on an idle queue.
Thu, Nov 5
Wed, Nov 4
Tue, Nov 3
Looks mostly OK to me.
Mon, Nov 2
I think the tx task could be running after iflib_stop(), thus leaving us not quite quiesced. Is there any reason why iflib_stop() does not do a gtaskqueue_drain() for tx tasks?
Aside from that "locked" local, this looks fine to me.
update patch to be more conservative and use ifmedia_baudrate() whenever it is non-zero,
due to known bugs in drivers properly reporting if_baudrate
as suggested by @kbowling
Sat, Oct 31
Fri, Oct 30
Thu, Oct 29
In general, I'm not sure I like this change. The old code seems less complex once the difference between M_HASHTYPE_OPAQUE and M_HASHTYPE_OPAQUE_HASH is taken into account.
Wed, Oct 21
Updated based on feedback from @kgalazka
Tue, Oct 20
Sun, Oct 18
Nice catch.
Oct 16 2026
Move assignment of queued=1 below new async bypass as suggested by @markj
Updated patch to use @glebius suggestion of THREAD_CAN_SLEEP() rather than
a sleepable flap.
Did you try measure doing the call to iflib_txdb_batch() in iflib_simple_encap(), rather than adding an argument all the way down? I hate the perceived complexity adding an arg adds.. Pushing it down adds 2 loads from hot cache lines per packet in the case where we have contention and the deferral ring is used, at the human savings of some complexity, and possibly 8 bytes of stack space. I think it won't matter at all for your workload, since I'm guessing your workload is mostly uncontended, so the deferral ring is probably not used.
Oct 15 2026
@kib The more errors like this that I see, the more firmly convinced I am that ifcap2 was a mistake, and that we should just have just extended if_capabilities / if_capenable to 64-bits.
Oct 13 2026
Any comments or review on this? Its been 2 weeks and I'd really like to merge this.
