From owner-freebsd-current@freebsd.org Sat Aug 22 18:26:01 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7DD89BFB5F for ; Sat, 22 Aug 2015 18:26:01 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 903FC13F for ; Sat, 22 Aug 2015 18:26:01 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 8D65A9BFB5E; Sat, 22 Aug 2015 18:26:01 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D0689BFB5D for ; Sat, 22 Aug 2015 18:26:01 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E8913C for ; Sat, 22 Aug 2015 18:26:01 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.200.200] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id A41E219291B; Sat, 22 Aug 2015 18:25:59 +0000 (UTC) Subject: Re: Kernel panic with fresh current, probably nfs related To: Rick Macklem References: <20150822115519.GA79434@ymer.vnode.se> <914810061.28949434.1440248260373.JavaMail.zimbra@uoguelph.ca> Cc: current@freebsd.org From: Sean Bruno Message-ID: <55D8BEB6.7090202@freebsd.org> Date: Sat, 22 Aug 2015 11:25:58 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <914810061.28949434.1440248260373.JavaMail.zimbra@uoguelph.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2015 18:26:01 -0000 > I'm going to guess that you're using an "em" net driver, since that is the > only one that sets if_hw_tsomax > IP_MAXPACKET (65535) from what I can see. > > Sean, EM_TSO_SIZE is defined as (65535 + sizeof(struct ether_vlan_header)), > which makes it > IP_MAXPACKET. The value of if_hw_tsomax must be <= IP_MAXPACKET > and I'm guessing this is what caused the above panic. (Someday it would be > nice if TSO segments > IP_MAXPACKET could be handled, but that will take changes > in the ip layer and router software so that a bogus ip_len field doesn't cause > problems.) > > if_hw_tsomax needs to be the maximum segment size that the driver can accept > from IP. Since the driver adds any MAC header after accepting the TSO segment > from the IP layer, it shouldn't include MAC header(s) in the value for if_hw_tsomax. > (If its limit includes MAC header(s), it needs to subtract those out when setting > if_hw_tsomax, not add them.) > > Since I am working up a patch for the value of if_hw_tsomaxsegcount, I think I'll > add a check for > IP_MAXPACKET for if_hw_tsomax as well. > > rick Huh, ok. You want to try something like this then? sean Index: if_em.h =================================================================== --- if_em.h (revision 286991) +++ if_em.h (working copy) @@ -268,7 +268,7 @@ #define EM_MAX_SCATTER 64 #define EM_VFTA_SIZE 128 -#define EM_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) +#define EM_TSO_SIZE (65535 - sizeof(struct ether_vlan_header)) #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ #define EM_MSIX_MASK 0x01F00000 /* For 82574 use */ #define EM_MSIX_LINK 0x01000000 /* For 82574 use */ Index: if_lem.h =================================================================== --- if_lem.h (revision 286991) +++ if_lem.h (working copy) @@ -238,7 +238,7 @@ #define EM_MAX_SCATTER 64 #define EM_VFTA_SIZE 128 -#define EM_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) +#define EM_TSO_SIZE (65535 - sizeof(struct ether_vlan_header)) #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ #define EM_MSIX_MASK 0x01F00000 /* For 82574 use */ #define ETH_ZLEN 60