From: David Miller <davem@davemloft.net>
To: phoebe.buckheister@itwm.fraunhofer.de
Cc: netdev@vger.kernel.org, linux-zigbee-devel@lists.sourceforge.net
Subject: Re: [PATCH net-next v4 1/4] ieee802154: add generic header handling routines
Date: Thu, 06 Mar 2014 13:07:46 -0500 (EST) [thread overview]
Message-ID: <20140306.130746.1333492573211031660.davem@davemloft.net> (raw)
In-Reply-To: <20140306111139.2b7b6b8b@zoidberg>
From: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Date: Thu, 6 Mar 2014 11:11:39 +0100
> On Wed, 05 Mar 2014 19:39:13 -0500 (EST)
> David Miller <davem@redhat.com> wrote:
>
>> This is how we handle some fields of struct iphdr, and it's fine with
>> me.
>
> Wonderful, this will unclutter everything that concerns itself with
> some degree of header handling.
>
>> Be sure to use __LITTLE_ENDIAN_BITFIELD and __BIG_ENDIAN_BITFIELD for
>> your CPP checks.
>
> I looked at struct iphdr now that you mentioned it, and i was a little
> surprised to see that this header is often pointer-cast from an
> skb_network_header.
Why is that surprising? It's the network header.
> As far as I can see, declaring all subfields (say)
> u16 in the bitfield endianness order when the entire bitfield is a u16
> in the header will result in correct behaviour for cast/memcpy. Is this
> correct? If not, I'll write out explicit operations for each bitfield
> member.
memcpy() "just works"
next prev parent reply other threads:[~2014-03-06 18:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 14:34 [PATCH net-next v4 0/4] ieee802154: clean up header handling Phoebe Buckheister
2014-03-04 14:34 ` [PATCH net-next v4 2/4] mac802154: use new header ops in wpan devices Phoebe Buckheister
[not found] ` <1393943688-24221-1-git-send-email-phoebe.buckheister-mPn0NPGs4xGatNDF+KUbs4QuADTiUCJX@public.gmane.org>
2014-03-04 14:34 ` [PATCH net-next v4 1/4] ieee802154: add generic header handling routines Phoebe Buckheister
2014-03-04 22:00 ` David Miller
2014-03-04 22:16 ` Phoebe Buckheister
2014-03-04 22:20 ` David Miller
2014-03-04 22:49 ` Phoebe Buckheister
2014-03-05 0:23 ` David Miller
[not found] ` <20140304.192309.337489223683931299.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2014-03-05 1:01 ` Phoebe Buckheister
2014-03-05 1:09 ` David Miller
2014-03-09 17:59 ` Ben Hutchings
[not found] ` <1394387943.15968.1.camel-nDn/Rdv9kqW9Jme8/bJn5UCKIB8iOfG2tUK59QYPAWc@public.gmane.org>
2014-03-09 22:49 ` David Miller
2014-03-05 19:15 ` Phoebe Buckheister
2014-03-06 0:39 ` David Miller
2014-03-06 10:11 ` Phoebe Buckheister
2014-03-06 18:07 ` David Miller [this message]
2014-03-06 18:28 ` Phoebe Buckheister
2014-03-04 14:34 ` [PATCH net-next v4 3/4] ieee802154: remove addresses from mac_cb Phoebe Buckheister
2014-03-04 14:34 ` [PATCH net-next v4 4/4] ieee802154: remove seq member of mac_cb Phoebe Buckheister
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=20140306.130746.1333492573211031660.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=phoebe.buckheister@itwm.fraunhofer.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).