Re: c_can/d_can driver question

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

 



On wo, 16 okt 2019 23:01:41 +0200, Marc Kleine-Budde wrote:
> On 10/16/19 9:06 PM, Elenita Hinds wrote:
> > I'm hoping someone can help me with this ...
> > 
> > The DCAN module I'm testing with supports 64 CAN messages and DMA. The
> > combined c_can/d_can driver seem to only support 16 RX message objects
> > and no DMA (as far as I can tell).
> 
> ACK
> 
> > I noticed that older Linux version
> > (3.1) implemented a separate d_can driver that supports both.  I'm
> > wondering why these were removed from the latest c_can/d_can files.
> 
> Can you give me a pointer to this driver? Are you talking about the
> mainline linux-3.1?
> 
> > The reason for this question is I'm seeing frame losses and I think it
> > is due to the driver. Increasing the socket buffer sizes did not have
> > any effect; the number is overruns was still pretty large.
> > 
> > Any feedback would be appreciated.
> 
> The problem with the c_can and d_can is, that it doesn't have a proper
> FIFO but only mailboxes. And these mailboxes don't implement a
> timestamp, so that it's not that easy to read messages in the correct order.
> 
> Does the device support bus master DMA? As CAN messages are quite small,
> the overhead of setting up DMA might be too high.
> 
> The algorithm that tries to read the CAN frames in the correct order was
> added in v3.15. That algorithm should be ported to the rx-offload
> helper. This way the mailboxes can be read in interrupt context and not
> from NAPI (which runs in softirq context only).
> 
> If this basically works, it can be extended to support 64 mailboxes.

I'm facing overflows, and have good results with the patchset I sent
last week. As Marc says, reading the mailboxes in NAPI softirq may cause
regular overflows.

Kurt



[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