Linux CAN drivers development
 help / color / mirror / Atom feed
From: "Magnus Aagaard Sørensen" <mas@csselectronics.com>
To: linux-can@vger.kernel.org
Subject: Debugging dropped/missing frames in the network layer
Date: Tue, 9 Aug 2022 14:30:43 +0200	[thread overview]
Message-ID: <e396bfcd-aca2-fef8-a25d-e6e4b61e7d70@csselectronics.com> (raw)

I am working with an out-of-tree kernel driver which maps LIN messages 
via a UART onto the CAN networking stack, to allow for using the regular 
CAN tools to also work with LIN messages (The driver in question is 
sllin, https://github.com/lin-bus/linux-lin/, based on slcan from what I 
understand).

During use, I see a lot of frames missing from the output. From 
debugging the module, I can see that the kernel module receive the 
messages as expected, but they never show up in user space using 
candump. I can trace the messages in the module to the hand-off to the 
networking stack via a netif_rx call.

Are there any additional handles in the networking/CAN stack to show me 
where the missing frames are being discarded before reaching user space, 
or which could otherwise help me narrow down the origin of this issue? 
The frames are transmitted from a custom/third party device at 19200 
kbps and with 100 ms spacing.

Hardware on the Linux side is a Raspberry Pi 4 running kernel 5.15.56 in 
64 bit mode.

Regards, Magnus.


             reply	other threads:[~2022-08-09 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 12:30 Magnus Aagaard Sørensen [this message]
2022-08-09 12:45 ` Debugging dropped/missing frames in the network layer Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e396bfcd-aca2-fef8-a25d-e6e4b61e7d70@csselectronics.com \
    --to=mas@csselectronics.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox