Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
Re: igc(4): fix recv. jumbo frames
To:
David Gwynne <david@gwynne.id.au>
Cc:
Jan Klemkow <jan@openbsd.org>, tech@openbsd.org, Theo de Raadt <deraadt@openbsd.org>
Date:
Fri, 9 Aug 2024 11:52:00 +0200

Download raw body.

Thread
  • Alexander Bluhm:

    igc(4): fix recv. jumbo frames

  • On Fri, Aug 09, 2024 at 11:55:35AM +1000, David Gwynne wrote:
    > On Thu, Aug 08, 2024 at 12:51:18PM +0200, Jan Klemkow wrote:
    > > Index: dev/pci/if_igc.c
    > > ===================================================================
    > > RCS file: /data/mirror/openbsd/cvs/src/sys/dev/pci/if_igc.c,v
    > > diff -u -p -r1.25 if_igc.c
    > > --- dev/pci/if_igc.c	24 May 2024 06:02:53 -0000	1.25
    > > +++ dev/pci/if_igc.c	6 Aug 2024 08:36:31 -0000
    > > @@ -881,7 +881,7 @@ igc_init(void *arg)
    > >  	}
    > >  	igc_initialize_transmit_unit(sc);
    > >  
    > > -	sc->rx_mbuf_sz = MCLBYTES + ETHER_ALIGN;
    > > +	sc->rx_mbuf_sz = MCLBYTES;
    > 
    > i think this is a mistake.
    
    You are right, it immediately crashes on sparc64.  Sorry for not
    testing before.
    
    bluhm
    
    login: panic: trap type 0x34 (mem address not aligned): pc=16dc8c0 npc=16dc8c4 pstate=820006<PRIV,IE>
    Stopped at      db_enter+0x8:   nop
        TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
    *276857  66236      0     0x14000      0x200    2  softnet1
    trap(403be16f6c0, 34, 16dc8c0, 820006, 0, 6) at trap+0x334
    Lslowtrap_reenter(4004e3e5100, 0, 20, 0, 403be2cdcc4, 403be2cde00) at Lslowtrap_reenter+0xf8
    mtx_enter_try(4004aa9b048, 4004e3e5100, 1837b40, 1c7d290, 12deb00, 0) at mtx_enter_try+0x8c
    ip_input_if(403be16fa78, 403be16fa84, 4, 0, 4004aa9b048, 12) at ip_input_if+0x78
    ipv4_input(4004aa9b048, 19b4148, 4004aa9b050, 1, 62, 0) at ipv4_input+0x3c
    ether_input(4004aa9b048, 4004e3e5100, 17c3578, 0, 0, 17c3578) at ether_input+0x274
    if_input_process(4004aa9b048, 403be16fcf0, 20, 17c3578, 0, 6) at if_input_process+0x44
    ifiq_process(4004aa97c00, 403be16fdd8, 1c86830, 1c7d290, 6, 6) at ifiq_process+0x74
    taskq_thread(4004a97a080, 4004a9187e0, 403be16ba78, 3, 0, 6) at taskq_thread+0x7c
    proc_trampoline(0, 0, 0, 0, 0, 0) at proc_trampoline+0x10
    https://www.openbsd.org/ddb.html describes the minimum info required in bug
    reports.  Insufficient info makes it difficult to find and fix bugs.
    ddb{2}>
    
    
    
  • Alexander Bluhm:

    igc(4): fix recv. jumbo frames