RE: PROBLEM: [x86] Running ptpd2 using an Intel 82572EI (e1000e) leads to a kernel oops (3.12.26)

From: Koehrer Mathias (ETAS/ESW5)
Date: Wed Aug 06 2014 - 09:25:42 EST


> -----Original Message-----
> From: Nick Krause [mailto:xerofoify@xxxxxxxxx]
> Sent: Wednesday, August 06, 2014 2:37 PM
> To: Koehrer Mathias (ETAS/ESW5)
> Cc: linux-kernel@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx
> Subject: Re: PROBLEM: [x86] Running ptpd2 using an Intel 82572EI (e1000e) leads
> to a kernel oops (3.12.26)
>
> On Wed, Aug 6, 2014 at 8:17 AM, Koehrer Mathias (ETAS/ESW5)
> <mathias.koehrer@xxxxxxxx> wrote:
> >> Mathias ,
> >> After tracing this it seems to be either one of two things based on
> >> the warn on messages in
> >> __queue_work. Normally it would be because of this line.
> >> WARN_ON_ONCE(!irqs_disabled());.
> >> However it would also be the second warn on, If you want I can send a
> >> simple patch with
> >> a printk statement to see which one it is.
> >> Regards Nick
> > That would be helpful. I can try to see what's happening.
> >
> > Regards
> >
> > Mathias
> Sorry for the late reply but couldn't figure out how to print the flags.
> Cheers Nick
Hi Nick,
thanks for the patch.
I applied it, however there was no change at all in the output.

My impression is, that it has to do with the network driver as everything works fine if I am using a different NIC.

When I apply the patch

Index: linux-3.12.26/drivers/net/ethernet/intel/e1000e/netdev.c
===================================================================
--- linux-3.12.26.orig/drivers/net/ethernet/intel/e1000e/netdev.c 2014-08-04 10:56:56.000000000 +0200
+++ linux-3.12.26/drivers/net/ethernet/intel/e1000e/netdev.c 2014-08-06 15:15:42.000000000 +0200
@@ -5549,7 +5549,8 @@
count = e1000_tx_map(tx_ring, skb, first, adapter->tx_fifo_limit,
nr_frags);
if (count) {
- if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
+ if ((adapter->flags & FLAG_HAS_HW_TIMESTAMP) &&
+ unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
!adapter->tx_hwtstamp_skb)) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
tx_flags |= E1000_TX_FLAGS_HWTSTAMP;

to the e1000e driver it seems to work...
This makes sense as the work queue is only created if "adapter->flags & FLAG_HAS_HW_TIMESTAMP" is set.
With this NIC this is *not* the case.


Regards

Mathias

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/