SocketCAN and Incoming Packet Control
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.
linux limit traffic can-bus socketcan
add a comment |
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.
linux limit traffic can-bus socketcan
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 0:36
add a comment |
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.
linux limit traffic can-bus socketcan
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.
linux limit traffic can-bus socketcan
linux limit traffic can-bus socketcan
asked Nov 14 '18 at 18:01
user856232user856232
4231526
4231526
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 0:36
add a comment |
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 0:36
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
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
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 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 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 0:36
I will give that a try. Thanks.
– user856232
Nov 20 '18 at 0:36
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53306270%2fsocketcan-and-incoming-packet-control%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53306270%2fsocketcan-and-incoming-packet-control%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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 0:36