All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: socketcan-core@domain.hid, Oliver Hartkopp <socketcan@domain.hid>,
	xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] Re: Magics of [CAN] message filtering
Date: Sat, 17 Feb 2007 19:12:34 +0100	[thread overview]
Message-ID: <45D74592.1020804@domain.hid> (raw)
In-Reply-To: <45D73F0B.8090703@domain.hid>

Jan Kiszka wrote:
> Oliver Hartkopp wrote:
>> When you're touching anything inside your API, have you ever thought to add
>>
>> __attribute__ ((aligned(8)))
>>
>> to the data[8] element of the struct can_frame?
>>
>> This would enable you to make 64 bit compares directly in the data
>> section of the can_frame ...
>>
>> typedef __u32 canid_t;
>>
>> struct can_frame {
>>     canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
>>     __u8    can_dlc; /* data length code: 0 .. 8 */
>>     __u8    data[8] __attribute__ ((aligned(8)));
>> };
> 
> [Swallowing down my well-known opinion on typeof(can_dlc) :)]
> 
> Yes, this should be done, already for the more urging sake of
> unambiguous layout of the structure across the kernel/user space border.

Is this not already the case? At least the size of struct can_frame is 
16 bytes.

Wolfgang.



  reply	other threads:[~2007-02-17 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <45D425B8.7070401@domain.hid>
     [not found] ` <45D60C78.5090106@domain.hid>
2007-02-16 21:04   ` [Xenomai-core] Re: Magics of [CAN] message filtering Jan Kiszka
     [not found]     ` <45D709E4.80409@domain.hid>
2007-02-17 17:44       ` Jan Kiszka
2007-02-17 18:12         ` Wolfgang Grandegger [this message]
2007-02-17 18:56           ` Jan Kiszka
2007-02-18 18:24             ` Jan Kiszka
2007-02-18 20:41               ` Wolfgang Grandegger

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=45D74592.1020804@domain.hid \
    --to=wg@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=socketcan-core@domain.hid \
    --cc=socketcan@domain.hid \
    --cc=xenomai@xenomai.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.