All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Erik Flodin <erik@flodin.me>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH v2 1/2] can: add support for filtering own messages only
Date: Mon, 17 May 2021 09:36:30 +0200	[thread overview]
Message-ID: <df854f78-cd82-81b6-2456-b4c272920b6a@hartkopp.net> (raw)
In-Reply-To: <CAAMKmocfkcFhhg+JgosbOVZD7AexWEwF6rJzN=Vv86WPFhQYyA@mail.gmail.com>



On 16.05.21 22:02, Erik Flodin wrote:

>> You mainly want to throttle the outgoing traffic, to make sure that e.g.
>> a specific CAN ID is not sent 'back-to'back' and might lead to a DoS
>> situation on the wire?!?
> 
> Yes, so after a frame has been sent, I want to leave the bus idle long
> enough to give another device on the bus that has something in its TX
> queue an opportunity to send.
> 
>> Do you know about the Linux CAN queuing disciplines that might provide
>> the solution to your question?
> 
> Yes, I came across that when I started my journey in CAN-land, but
> unfortunately the kernel I have to use doesn't have support for
> traffic control. That's when I started using RECV_OWN_MSGS which
> worked until I added filters and here we are now :)
> 
> If I get the chance to update the kernel (which would have to happen
> before my proposed patch could be used anyway) I should perhaps try to
> get tc support instead. That would simplify my application at least.

:-D

In any case it seems you need to change some kernel code.

The CAN frame ematch rule is from 2012:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=f057bbb6f9ed0fb61ea11105c9ef0ed5ac1a354d

Is your kernel older than 2012? o_O
Or was TC just not enabled?

Best regards,
Oliver

  reply	other threads:[~2021-05-17  7:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 20:35 [PATCH v2 0/2] can: Add CAN_RAW_RECV_OWN_MSGS_ALL socket option Erik Flodin
2021-05-04 20:35 ` [PATCH v2 1/2] can: add support for filtering own messages only Erik Flodin
2021-05-05  6:58   ` Oliver Hartkopp
2021-05-05  8:37     ` Erik Flodin
2021-05-05  9:15       ` Oliver Hartkopp
2021-05-05 18:54         ` Erik Flodin
2021-05-06  5:26           ` Oliver Hartkopp
2021-05-09 11:28             ` Erik Flodin
2021-05-10 12:28               ` Oliver Hartkopp
2021-05-16 20:02                 ` Erik Flodin
2021-05-17  7:36                   ` Oliver Hartkopp [this message]
2021-05-17 18:09                     ` Erik Flodin
2021-05-04 20:35 ` [PATCH v2 2/2] can: raw: add CAN_RAW_RECV_OWN_MSGS_ALL socket option Erik Flodin

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=df854f78-cd82-81b6-2456-b4c272920b6a@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=erik@flodin.me \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.