Re: Kernel panic: kernel diagnostic assertion "/usr/ "sc-ysc_tx_avail > used" failed: file src/sys/dev/pv/if_xnf.c", line 642

Sebastien Marie <[email protected]> Mon, 04 May 2026 11:33:30 +0200
Newsgroups gmane.os.openbsd.bugs
Message-ID <[email protected]>
Jonathan Matthew <[email protected]> writes:

> On Sun, May 03, 2026 at 02:46:55PM +0200, Stefan Sperling wrote:
>> On Wed, Dec 17, 2025 at 03:44:22PM +0100, Stefan Sperling wrote:
>> > On Wed, Dec 17, 2025 at 03:37:56PM +0100, Stefan Sperling wrote:
>> > > +	if (frags > sc->sc_tx_frags || frags > sc->sc_tx_avail) {
>> > 
>> > Perhaps this must check frags >= sc->sc_tx_avail to prevent the assertion
>> > failure in all cases.
>>  
>> I still have not heard from anyone about this fix. I do not use xnf myself
>> and I lack a test setup for it. I will drop this diff from my pending
>> queue soon if I don't hear anything.
>> 
>> And I would need an OK from another developer to commit it.
>
> I started reworking xnf to manage ring space like other drivers,
> but I haven't got it working yet.  This looks like a good fix for
> the current code, and it survives some basic testing.
> ok jmatthew@

Basic testing is fine here too.

ok semarie@
-- 
Sebastien Marie