netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/9] batman-adv: add UNICAST_4ADDR packet type
Date: Sat, 03 Nov 2012 15:22:26 -0400 (EDT)	[thread overview]
Message-ID: <20121103.152226.244759041688205348.davem@davemloft.net> (raw)
In-Reply-To: <1351968514-12357-2-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

From: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Date: Sat,  3 Nov 2012 19:48:26 +0100

> The current unicast packet type does not contain the orig source address. This
> patches add a new unicast packet (called UNICAST_4ADDR) which provides two new
> fields: the originator source address and the subtype (the type of the data
> contained in the packet payload). The former is useful to identify the node
> which injected the packet into the network and the latter is useful to avoid
> creating new unicast packet types in the future: a macro defining a new subtype
> will be enough.
> 
> Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

Your packet layouts are very poorly designed and I want you to stop
and think seriously about things before extending things further.

All of this __packed stuff is a serious problem.

It means that on RISC system, fields such as your 32-bit sequence
number, will be read and written using byte loads and stores.

This is terrible.

Instead, design the structures so that they are full filled out to
at least 4 byte boundaries, so that they and the contents after
them, are 4 byte aligned too.

Then you won't need to mark all of your packet header structs
with __packed, and therefore the compiler can use full 32-bit
loads and stores to access 32-bit fields.

I'm not applying this series, sorry, it just continues a major
problem that the batman-adv code already has.

  parent reply	other threads:[~2012-11-03 19:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-03 18:48 pull request: batman-adv 2012-11-03 Antonio Quartulli
     [not found] ` <1351968514-12357-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2012-11-03 18:48   ` [PATCH 1/9] batman-adv: add UNICAST_4ADDR packet type Antonio Quartulli
     [not found]     ` <1351968514-12357-2-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2012-11-03 19:22       ` David Miller [this message]
     [not found]         ` <20121103.152226.244759041688205348.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-11-04 10:29           ` Sven Eckelmann
     [not found]             ` <12758662.vFhVQet4vg-S/pmIDWWJIwhrEaHGRlFQnOel7F/LzPIcbWoRP8EXgk@public.gmane.org>
2012-11-04 11:20               ` Sven Eckelmann
     [not found]                 ` <5244128.ID77evUSAJ-S/pmIDWWJIwhrEaHGRlFQnOel7F/LzPIcbWoRP8EXgk@public.gmane.org>
2012-11-04 17:30                   ` David Miller
2012-11-04 17:26             ` [B.A.T.M.A.N.] " David Miller
2012-11-03 18:48 ` [PATCH 2/9] batman-adv: Distributed ARP Table - add a new debug log level Antonio Quartulli
2012-11-03 18:48 ` [PATCH 3/9] batman-adv: Distributed ARP Table - create DHT helper functions Antonio Quartulli
2012-11-03 18:48 ` [PATCH 4/9] batman-adv: Distributed ARP Table - implement local storage Antonio Quartulli
2012-11-03 18:48 ` [PATCH 5/9] batman-adv: Distributed ARP Table - add ARP parsing functions Antonio Quartulli
2012-11-03 18:48 ` [PATCH 6/9] batman-adv: Distributed ARP Table - add snooping functions for ARP messages Antonio Quartulli
2012-11-03 18:48 ` [PATCH 7/9] batman-adv: Distributed ARP Table - add compile option Antonio Quartulli
2012-11-03 18:48 ` [PATCH 8/9] batman-adv: Distributed ARP Table - add runtime switch Antonio Quartulli
2012-11-03 18:48 ` [PATCH 9/9] batman-adv: Add get_ethtool_stats() support for DAT Antonio Quartulli

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=20121103.152226.244759041688205348.davem@davemloft.net \
    --to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
    --cc=b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.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).