Re: Panic during kernel booting on HP Proliant DL180G6 and latest STABLE

2011-09-22 Thread David G Lawrence
> I have a lot of supermicro motherboards and the newest ones have igb
> chipsets; they've been quite a headache with respect to FreeBSD 8. I'm
> running 8.2-RELEASE but have upgraded parts of my kernel to 8-RELENG (as
> of a few months ago). Some of them work ok while others panic on bootup.
> Upgrading to newer versions of the intel igb code fixes some but breaks
> others. It's been frustrating.
> 
> While working on this today, I saw two different kernel panics:
> 
> Could not setup receive structures
> m_getzone: m_getjcl: invalid cluster type

   I fixed this awhile back in my local sources. A 12 core Supermicro
MB system I'm building here was hitting the bug 100% of the time during
startup. Patch attached.

-DG

Dr. David G. Lawrence
President
Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
Pave the road of life with opportunities.

Index: if_igb.c
===
RCS file: /home/ncvs/src/sys/dev/e1000/if_igb.c,v
retrieving revision 1.21.2.20
diff -c -r1.21.2.20 if_igb.c
*** if_igb.c29 Jun 2011 16:16:59 -  1.21.2.20
--- if_igb.c22 Sep 2011 10:04:31 -
***
*** 1278,1286 
/* Don't lose promiscuous settings */
igb_set_promisc(adapter);
  
-   ifp->if_drv_flags |= IFF_DRV_RUNNING;
-   ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
- 
callout_reset(&adapter->timer, hz, igb_local_timer, adapter);
e1000_clear_hw_cntrs_base_generic(&adapter->hw);
  
--- 1278,1283 
***
*** 1308,1313 
--- 1305,1313 
  
/* Don't reset the phy next time init gets called */
adapter->hw.phy.reset_disable = TRUE;
+ 
+   ifp->if_drv_flags |= IFF_DRV_RUNNING;
+   ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
  }
  
  static void
***
*** 1490,1501 
E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims);
++que->irqs;
  
IGB_TX_LOCK(txr);
more_tx = igb_txeof(txr);
IGB_TX_UNLOCK(txr);
  
-   more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL);
- 
if (igb_enable_aim == FALSE)
goto no_calc;
/*
--- 1490,1505 
E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims);
++que->irqs;
  
+   if (!(adapter->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
+   return;
+   }
+ 
+   more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL);
+ 
IGB_TX_LOCK(txr);
more_tx = igb_txeof(txr);
IGB_TX_UNLOCK(txr);
  
if (igb_enable_aim == FALSE)
goto no_calc;
/*
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Panic during kernel booting on HP Proliant DL180G6 and latest STABLE

2011-09-22 Thread Jeremy Chadwick
On Thu, Sep 22, 2011 at 03:11:56AM -0700, David G Lawrence wrote:
> > I have a lot of supermicro motherboards and the newest ones have igb
> > chipsets; they've been quite a headache with respect to FreeBSD 8. I'm
> > running 8.2-RELEASE but have upgraded parts of my kernel to 8-RELENG (as
> > of a few months ago). Some of them work ok while others panic on bootup.
> > Upgrading to newer versions of the intel igb code fixes some but breaks
> > others. It's been frustrating.
> > 
> > While working on this today, I saw two different kernel panics:
> > 
> > Could not setup receive structures
> > m_getzone: m_getjcl: invalid cluster type
> 
>I fixed this awhile back in my local sources. A 12 core Supermicro
> MB system I'm building here was hitting the bug 100% of the time during
> startup. Patch attached.
> 
> -DG
> 
> Dr. David G. Lawrence
> President
> Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
> Pave the road of life with opportunities.
> 
> Index: if_igb.c
> ===
> RCS file: /home/ncvs/src/sys/dev/e1000/if_igb.c,v
> retrieving revision 1.21.2.20
> diff -c -r1.21.2.20 if_igb.c
> *** if_igb.c  29 Jun 2011 16:16:59 -  1.21.2.20
> --- if_igb.c  22 Sep 2011 10:04:31 -
> ***
> *** 1278,1286 
>   /* Don't lose promiscuous settings */
>   igb_set_promisc(adapter);
>   
> - ifp->if_drv_flags |= IFF_DRV_RUNNING;
> - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
> - 
>   callout_reset(&adapter->timer, hz, igb_local_timer, adapter);
>   e1000_clear_hw_cntrs_base_generic(&adapter->hw);
>   
> --- 1278,1283 
> ***
> *** 1308,1313 
> --- 1305,1313 
>   
>   /* Don't reset the phy next time init gets called */
>   adapter->hw.phy.reset_disable = TRUE;
> + 
> + ifp->if_drv_flags |= IFF_DRV_RUNNING;
> + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
>   }
>   
>   static void
> ***
> *** 1490,1501 
>   E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims);
>   ++que->irqs;
>   
>   IGB_TX_LOCK(txr);
>   more_tx = igb_txeof(txr);
>   IGB_TX_UNLOCK(txr);
>   
> - more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL);
> - 
>   if (igb_enable_aim == FALSE)
>   goto no_calc;
>   /*
> --- 1490,1505 
>   E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims);
>   ++que->irqs;
>   
> + if (!(adapter->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
> + return;
> + }
> + 
> + more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL);
> + 
>   IGB_TX_LOCK(txr);
>   more_tx = igb_txeof(txr);
>   IGB_TX_UNLOCK(txr);
>   
>   if (igb_enable_aim == FALSE)
>   goto no_calc;
>   /*

CC'ing Jack Vogel.

Jack, any insights with regards to this patch?  This also touches on
what Adrian was mentioning as well, at least to some degree.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator   Mountain View, CA, US |
| Making life hard for others since 1977.   PGP 4BD6C0CB |

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


cpio and directory owner preservation behaviour

2011-09-22 Thread Olivier Cochard-Labbé
Hi all,
I meet a problem with cpio and I would to know if it's a normal
behaviour or a bug.
I would to save some files and create directories if needed with owner
and permission kept.
here is an example with net/quagga: I would to save
/usr/local/etc/quagga/ripd.conf and creating needed directory in /tmp

[root@R3]/#ls -alh /usr/local/etc | grep quagga
drwxr-xr-x   2 quagga  quagga   512B Sep 22 15:28 quagga
[root@R3]/#ls -alh /usr/local/etc/quagga/ripd.conf
-rw---  1 quagga  quagga   134B Sep 22 15:28 quagga/ripd.conf

[root@R3]/#(cd /usr/local/etc; find . -name ripd.conf -type f | cpio
-dumpv /tmp/)

The file owner and permission for ripd.conf is keept:
[root@R3]/#ls -alh /tmp/quagga/ripd.conf
-rw---  1 quagga  quagga   134B Sep 22 15:28 /tmp/quagga/ripd.conf

But not the directory owner that is changed to root:wheel
[root@R3]/#ls -alh /tmp | grep quagga
drwxr-xr-x   2 root  wheel   512B Sep 22 16:41 quagga

Is a cpio bug ?

Thanks,

Olivier
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: cpio and directory owner preservation behaviour

2011-09-22 Thread David Magda
On Thu, September 22, 2011 10:54, Olivier Cochard-Labbé wrote:
[...]
> [root@R3]/#(cd /usr/local/etc; find . -name ripd.conf -type f | cpio
> -dumpv /tmp/)
>
> The file owner and permission for ripd.conf is keept:
> [root@R3]/#ls -alh /tmp/quagga/ripd.conf
> -rw---  1 quagga  quagga   134B Sep 22 15:28 /tmp/quagga/ripd.conf
>
> But not the directory owner that is changed to root:wheel
> [root@R3]/#ls -alh /tmp | grep quagga
> drwxr-xr-x   2 root  wheel   512B Sep 22 16:41 quagga
>
> Is a cpio bug ?

No it is not a bug, because the find(1) command will only print 
"quagga/ripd.conf" to its output, and not "quagga/" as well. Since cpio(1)
only receives "quagga/ripd.conf", it will only put the information for
that item in the archive stream.

Try the following command:

   # (cd /usr/local/etc; find quagga | cpio -dumpv /tmp/)

instead. This should grab quagga/ itself, in addition to its contents in
the archive stream.

If you want to know which items (files, directories, other) that cpio(1)
grab information on just run the find(1) without piping its output
anywhere. If you don't see the item of interest on a line of its own,
cpio(1) will not grab its metadata.


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


RE: Panic during kernel booting on HP Proliant DL180G6 and latest STABLE

2011-09-22 Thread Vogel, Jack
-Original Message-
From: Jeremy Chadwick [mailto:free...@jdc.parodius.com] 
Sent: Thursday, September 22, 2011 3:28 AM
To: David G Lawrence
Cc: Craig Leres; freebsd-stable@freebsd.org; John Baldwin; Vogel, Jack
Subject: Re: Panic during kernel booting on HP Proliant DL180G6 and latest 
STABLE

On Thu, Sep 22, 2011 at 03:11:56AM -0700, David G Lawrence wrote:
> > I have a lot of supermicro motherboards and the newest ones have igb
> > chipsets; they've been quite a headache with respect to FreeBSD 8. I'm
> > running 8.2-RELEASE but have upgraded parts of my kernel to 8-RELENG (as
> > of a few months ago). Some of them work ok while others panic on bootup.
> > Upgrading to newer versions of the intel igb code fixes some but breaks
> > others. It's been frustrating.
> > 
> > While working on this today, I saw two different kernel panics:
> > 
> > Could not setup receive structures
> > m_getzone: m_getjcl: invalid cluster type
> 
>I fixed this awhile back in my local sources. A 12 core Supermicro
> MB system I'm building here was hitting the bug 100% of the time during
> startup. Patch attached.
> 
> -DG
> 
> Dr. David G. Lawrence
> President
> Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
> Pave the road of life with opportunities.
> 
> Index: if_igb.c
> ===
> RCS file: /home/ncvs/src/sys/dev/e1000/if_igb.c,v
> retrieving revision 1.21.2.20
> diff -c -r1.21.2.20 if_igb.c
> *** if_igb.c  29 Jun 2011 16:16:59 -  1.21.2.20
> --- if_igb.c  22 Sep 2011 10:04:31 -
> ***
> *** 1278,1286 
>   /* Don't lose promiscuous settings */
>   igb_set_promisc(adapter);
>   
> - ifp->if_drv_flags |= IFF_DRV_RUNNING;
> - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
> - 
>   callout_reset(&adapter->timer, hz, igb_local_timer, adapter);
>   e1000_clear_hw_cntrs_base_generic(&adapter->hw);
>   
> --- 1278,1283 
> ***
> *** 1308,1313 
> --- 1305,1313 
>   
>   /* Don't reset the phy next time init gets called */
>   adapter->hw.phy.reset_disable = TRUE;
> + 
> + ifp->if_drv_flags |= IFF_DRV_RUNNING;
> + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
>   }
>   
>   static void
> ***
> *** 1490,1501 
>   E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims);
>   ++que->irqs;
>   
>   IGB_TX_LOCK(txr);
>   more_tx = igb_txeof(txr);
>   IGB_TX_UNLOCK(txr);
>   
> - more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL);
> - 
>   if (igb_enable_aim == FALSE)
>   goto no_calc;
>   /*
> --- 1490,1505 
>   E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims);
>   ++que->irqs;
>   
> + if (!(adapter->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
> + return;
> + }
> + 
> + more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL);
> + 
>   IGB_TX_LOCK(txr);
>   more_tx = igb_txeof(txr);
>   IGB_TX_UNLOCK(txr);
>   
>   if (igb_enable_aim == FALSE)
>   goto no_calc;
>   /*

CC'ing Jack Vogel.

Jack, any insights with regards to this patch?  This also touches on
what Adrian was mentioning as well, at least to some degree.



I have a slight modification to John's earlier changes, namely, it masks the 
full EIMC register when setup to use MSIX, I'm thinking this might be why the 
earlier patch failed?  The code in this latest email is something that I would 
not want to use if possible, it's just trying to avoid the problem.  Please 
test with this change instead.

Regards,

Jack



igb-irq.patch
Description: igb-irq.patch
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"