Re: [PATCH] can: c_can: Handle lost bus-off interrupt while IRQs are disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Felix,

Next question comes up.
See inline.

On vr, 12 jun 2020 09:10:44 +0200, Kurt Van Dijck wrote:
> Thanks for verifying,
> 
> I'll take a look how that can happen.
> 
> I think packet loss is better (less packets lost) than before.
> 
> Kurt
> 
> On wo, 10 jun 2020 08:08:28 +0000, Felix Riemann wrote:
> > Hi Kurt,
> > 
> > > -----Original Message-----
> > >
> > > I have the impression that the recv path is covered, at least the null ptr would
> > > have caused issued earlier already.
> > > Would the problem arise in c_can_do_tx fetching a NULL echo_skb?
> > 
> > It really looks like it.
> > 
> > Adding a BUG_ON to the loop in c_can_do_tx triggers with a NULL skb returned by __can_get_echo_skb().
> > 
> > For testing I replaced the BUG_ON with a check that skips the skb if that happens (not sure if that would be a valid fix in that place):
> > 
> > while ((obj = c_can_ffs64(pend))) {
> > pend &= ~((u64)1 << (obj - 1));
> > c_can_inval_tx_object(dev, IF_RX, obj);
> > idx = obj - priv->obj.send_frst;
> > skb = __can_get_echo_skb(dev, idx, &len);
> > if(!skb)

It would be interesting to know idx and priv->tx_active here.

> > continue;
> > can_rx_offload_irq_receive_skb(&priv->offload, skb);
> > bytes += len;
> > pkts++;
> > }
> > 
> > So far it got through the night without crashing or deadlocking, but I can't really tell if we are missing pakets though.
> > 
> > Regards,
> > 
> > Felix
> > ___________________________________________________
> > 
> > SMA Solar Technology AG
> > Aufsichtsrat: Uwe Kleinkauf (Vorsitzender)
> > Vorstand: Ulrich Hadding, Dr.-Ing. Juergen Reinert
> > Handelsregister: Amtsgericht Kassel HRB 3972
> > Sitz der Gesellschaft: 34266 Niestetal
> > USt-ID-Nr. DE 113 08 59 54
> > WEEE-Reg.-Nr. DE 95881150
> > ___________________________________________________



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux