From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Brian Thorne <hardbyte@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: [PATCH] Broadcast manager documentation
Date: Tue, 08 Oct 2013 16:03:42 +0200 [thread overview]
Message-ID: <525410BE.5080307@pengutronix.de> (raw)
In-Reply-To: <CAENe87otPZVjDkvJJDR4CLE2e4dcyzde1=5rQZWytG_JyOpvsQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3490 bytes --]
On 10/08/2013 02:56 AM, Brian Thorne wrote:
> Hi all,
>
> I wanted to use the bcm module and ended up putting together some basic findings
> that might be a useful addition to the can.txt documentation.
YEAY! documentation!
> I haven't tried submitting any patches before so please point out any mistakes.
From the howto submit patches point of view, it's preferred to send
matches inline, "git send-email" is your friend.
I cannot say anything to the contents, as I've never used the bcm so
far. However a nitpick inline:
> 0001-net-Update-the-CAN-broadcast-manager-documentation.patch
>
>
> From 282b4d202b580d57c384dc84aeb7bbb08dff556f Mon Sep 17 00:00:00 2001
> From: Brian Thorne <hardbyte@gmail.com>
> Date: Tue, 8 Oct 2013 12:10:43 +1300
> Subject: [PATCH] net: Update the CAN broadcast manager documentation
>
> Add content to empty section in controller area network
> documentation.
>
> Signed-off-by: Brian Thorne <hardbyte@gmail.com>
> ---
> Documentation/networking/can.txt | 132 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 132 insertions(+)
>
> diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
> index 820f553..38b1d7e 100644
> --- a/Documentation/networking/can.txt
> +++ b/Documentation/networking/can.txt
> @@ -593,6 +593,138 @@ solution for a couple of reasons:
> In order to receive such messages, CAN_RAW_RECV_OWN_MSGS must be set.
>
> 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM)
> +
> + The Broadcast Manager protocol provides an interface to filter and send
> + cyclic CAN packets in kernel space.
> +
> + Periodic transmissions can be modified at runtime; both the message content
> + and the interval can be altered. Periodic transmissions can use multiple
> + intervals, sending N messages at a interval, then continuing to send at
> + another given interval.
> +
> + Receive filters can be used to down sample frequent messages; detect events
> + such as message contents changes, packet length changes, and do time-out
> + monitoring of received messages.
> +
> + A BCM socket is not used for sending individual can frames, instead a new
> + special message is defined. The basic BCM frame structure used to
> + communicate with the broadcast manager and the available operations are
> + defined in include/linux/can/bcm.h. The basic BCM frame consists of a
It's "include/uapi/linux/can/bcm.h" in recent kernel trees.
> + message header with an opcode command followed by zero or more can frames.
> + The broadcast manager sends responses to user space in the same form:
> +
> + struct bcm_msg_head {
> + __u32 opcode; /* command */
> + __u32 flags; /* special flags */
> + __u32 count; /* run 'count' times with ival1 */
> + struct timeval ival1, ival2; /* count and subsequent interval */
> + canid_t can_id; /* unique can_id for task */
> + __u32 nframes; /* number of can_frames following */
> + struct can_frame frames[0];
> + };
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2013-10-08 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 0:56 [PATCH] Broadcast manager documentation Brian Thorne
2013-10-08 8:24 ` Oliver Hartkopp
2013-10-08 14:03 ` Marc Kleine-Budde [this message]
2013-10-14 19:41 ` [PATCH can-next] Add broadcast " Oliver Hartkopp
2013-10-14 20:02 ` Marc Kleine-Budde
[not found] ` <CAENe87q9PCCJjgzDp-D7GfhJkGeBJU6kog+YuMHKkNbacg1bTA@mail.gmail.com>
2013-10-14 21:00 ` Brian Thorne
2013-10-15 4:57 ` Oliver Hartkopp
2013-10-15 7:20 ` 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=525410BE.5080307@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=hardbyte@gmail.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;
as well as URLs for NNTP newsgroup(s).