From: Felix Fietkau <nbd@openwrt.org>
To: Adrian Chadd <adrian@freebsd.org>
Cc: Oleksij Rempel <linux@rempel-privat.de>,
ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org
Subject: Re: [ath9k-devel] [PATCH v2] ath9k: collect statistics about Rx-Dup and Rx-STBC packets
Date: Sun, 28 Apr 2013 03:21:59 +0200 [thread overview]
Message-ID: <517C79B7.1090306@openwrt.org> (raw)
In-Reply-To: <CAJ-VmokUFtFjQk0T87E57kEhp40f1v4XgJL-iN35Bzo4h-McDQ@mail.gmail.com>
On 2013-04-27 9:06 PM, Adrian Chadd wrote:
> On 27 April 2013 11:53, Oleksij Rempel <linux@rempel-privat.de> wrote:
>
>>> (And then go and re-align things inside that struct so you don't waste
>>> space.)
>>
>>
>> hmm.. what do you mean here?
>
> Structure alignment? Well, you typically want to have everything be
> dword aligned (32 bits) or word (16 bits) aligned. Otherwise the
> compiler may insert extra padding between fields in order to meet
> alignment requirements on platforms that need it (MIPS, older ARM) or
> platforms that perform slower (newer ARM.)
I think in struct ath_rx_status alignment does not matter much, it's
only kept on the stack anyway. But yes, in other cases it makes sense to
pay attention to padding to keep structs small. I also agree that making
rs_flags u16 is a good idea.
> Now, i don't know what 'bool' is, whether it's a byte, word or dword.
bool is a byte.
> That "is_mybeacon" field should probably be just another flag in
> rx_status, then just extend 'rs_flags' to 16 bits and include it. That
> way the alignment is easy to see - all the fields in rx_status and the
> htc rx_status structs have explicit sizes. :-)
>
> Felix, what do you think?
Sounds good :)
- Felix
next prev parent reply other threads:[~2013-04-28 1:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 15:25 [PATCH RFC] ath9k: collect statistics about Rx-Dup and Rx-STBC packets Oleksij Rempel
2013-04-27 18:39 ` [PATCH v2] " Oleksij Rempel
2013-04-27 18:51 ` Adrian Chadd
2013-04-27 18:53 ` Oleksij Rempel
2013-04-27 19:06 ` Adrian Chadd
2013-04-27 19:13 ` Oleksij Rempel
2013-04-28 1:21 ` Felix Fietkau [this message]
2013-04-28 6:41 ` [PATCH v3] " Oleksij Rempel
2013-04-28 12:51 ` [PATCH RFC] " Felix Fietkau
2013-04-28 14:13 ` Oleksij Rempel
2013-04-28 15:03 ` [ath9k-devel] " Oleksij Rempel
2013-04-28 19:19 ` Oleksij Rempel
2013-04-28 19:20 ` Felix Fietkau
2013-04-29 6:45 ` Wojciech Dubowik
2013-04-29 7:20 ` Oleksij Rempel
2013-04-28 14:54 ` Ben Greear
2013-04-28 15:08 ` Felix Fietkau
2013-04-28 15:15 ` Ben Greear
2013-04-28 15:32 ` Felix Fietkau
2013-05-08 5:32 ` Sujith Manoharan
2013-05-08 16:07 ` Ben Greear
2013-05-08 22:45 ` Adrian Chadd
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=517C79B7.1090306@openwrt.org \
--to=nbd@openwrt.org \
--cc=adrian@freebsd.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@rempel-privat.de \
/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).