0

I have an application for linux. I am using SocketCAN to talk to the CAN bus. We are doing this on a Beaglebone Black based device we made ourselves.

We have another device we need to listen to traffic from. This device sends a ton of data way faster than we need it or can process it.

I am trying to figure out a good way to slow down the traffic coming from this device to ours over CAN.

I found the document that talks about using traffic control (tc) for linux. I have been trying the examples and not seeing any difference in the incoming traffic.

Everything I have read about this gives examples about limiting the OUTBOUND traffic from an app to the CAN bus.

My question is whether traffic control (tc) can be used to limit incoming traffic to the kernel (and the apps that are listening)?

If not, then is there another tool that can be used for this?

I am ok dropping a percentage of packets. I assume that would have to happen.

user856232
  • 1,073
  • 2
  • 14
  • 40
  • I see that someone down voted this question, but didn't leave a comment as to what they didn't like about the question. When I hover over the down vote arrow, the tool tip says "This question does not show any research effort; it is unclear or not useful". I did lots of research. I read the documentation on TC. I read an article about using TC for SocketCAN. All of the information I read implied, but was not clear about whether TC works on incoming data as well as outgoing. That is why i am asking. If the person who down voted could comment on why I would appreciate it. – user856232 Nov 16 '18 at 19:36
  • What about using SocketCAN filter to let only required frames through? – yegorich Nov 19 '18 at 11:32
  • I am already using those filters and still my app is getting slammed with data. The data is coming in as 104 values all coming every 16ms. Even after filtering down to about 15 values (which is a minimum of what I need) the CAN interrupt is still taking 20% of the processor. Basically I just need to drop a bunch of packets to make it manageable. Since I have no control over the sending device, I have to be able to drop packets. – user856232 Nov 19 '18 at 15:08
  • I see. Then I suggest to ask this question on linux-can mailing list. – yegorich Nov 19 '18 at 20:38
  • I will give that a try. Thanks. – user856232 Nov 20 '18 at 00:36

0 Answers0