netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@suse.cz>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: NetDev <netdev@oss.sgi.com>, jbohac@suse.cz
Subject: Re: [2/5] ieee80211: ieee80211_device alignment fix and cleanup
Date: Tue, 31 May 2005 15:30:50 +0200	[thread overview]
Message-ID: <20050531153050.139b1408@griffin.suse.cz> (raw)
In-Reply-To: <4297E78A.4030906@pobox.com>

On Fri, 27 May 2005 23:37:46 -0400, Jeff Garzik wrote:
> 1) I am not convinced that the subclassing of net_device should be done 
> in this manner.  Read drivers/net/wan/hdlc_generic.c and .../pc300_drv.c 
> for examples of how hdlc_device is handled.

We see two differences to the hdlc concept:
1. the driver private data is allocated together with the net_device and
ieee80211_device data;
2. ieee80211_device is passed to functions instead of net_device.

Allocating all the structures together just extends the concept of
net_device allocation. The advantage is that all the structures are
located close to each other in the memory which (hopefully) improves
cache performance.

Passing ieee80211_device seems to be more appropriate in this case,
since drivers will be accessing ieee80211 data far more frequently than
net_device data. For example, part of the plan is to integrate Wireless
Extensions into the ieee80211 layer -- for all the ioctl handlers, it
will be much more interesting to have the ieee80211_device passed to
them. Furthermore, driver writers will not be tempted to think that
net_device->priv points to _their_ private data (which the name
suggests, but is not true).

Or did you mean something different?

> 2) Please put all the new, protocol-layer functions 
> ieee80211_type_trans(), ieee80211_change_mtu(), ieee80211_header(), etc. 
> in their own file.

Will be posted in the next patch series.

> 3) Temporary or not, the following construct is simply not necessary. 
> Modify the definition rather than repeating this two-call piece of code 
> in multiple areas:
> 	ieee80211_priv(netdev_priv(dev));

As soon as we're done integrating WE into ieee80211, most of this will
disappear. But sure, we can add a ieee80211_priv_from_netdev (or so)
macro for now.

 
> 4) A low-level wireless hardware driver should look like other net 
> drivers, and use the existing driver API.  The low level driver should

> implement its own dev->hard_start_xmit().
> Certainly, the driver will make many calls to generic ieee80211_xxx 
> functions to get things done.

Actually, hard_start_xmit has to do a lot of work regarding software
fragmentation, encryption, sequence numbering, etc. Sure, every driver
could call some ieee80211_prepare_to_xmit function in its own
hard_start_xmit, but we see no point in doing this as it would have to
be done by almost every driver. Drivers for very clever cards may
probably be an exception, but the risk is, that if they implement part
of the logic themselves, they will be more difficult to maintain as new
features are implemented in the ieee80211 layer. Furthermore, it is
against one of our premises ("the simpler card, the simpler driver").

We think that this concept of an "ieee80211 sublayer" has more
advantages than the concept of an "ieee80211 library". Do you have any
reasons why it should be the other way round?

 Jiri Benc & Jirka Bohac


-- 
Jiri Benc
SUSE Labs

  reply	other threads:[~2005-05-31 13:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-24 13:07 [0/5] Improvements to the ieee80211 layer Jiri Benc
2005-05-24 13:10 ` [1/5] ieee80211: cleanup Jiri Benc
2005-05-28  2:43   ` Jeff Garzik
2005-05-24 13:11 ` [2/5] ieee80211: ieee80211_device alignment fix and cleanup Jiri Benc
2005-05-28  3:37   ` Jeff Garzik
2005-05-31 13:30     ` Jiri Benc [this message]
2005-05-24 13:12 ` [3/5] netdev: HH_DATA_OFF bugfix Jiri Benc
2005-05-28  3:15   ` Jeff Garzik
2005-05-24 13:12 ` [4/5] ieee80211: ethernet independency Jiri Benc
2005-05-24 13:13 ` [5/5] ieee80211: add sequence numbers Jiri Benc
2005-05-24 13:15 ` [1-2/6] ipw2100, ipw2200: patches to merge to kernel Jiri Benc
2005-05-24 17:24   ` Dave Jones
2005-05-24 17:56     ` Thomas Graf
2005-05-24 13:16 ` [3/6] ipw2100: fix after "ieee80211: cleanup" Jiri Benc
2005-05-24 13:18 ` [4/6] ipw2100: fix after "ieee80211_device alignment fix" Jiri Benc
2005-05-24 18:58   ` Pavel Machek
2005-05-24 19:18     ` Jirka Bohac
2005-05-24 13:19 ` [5/6] ipw2200: " Jiri Benc
2005-05-24 13:20 ` [6/6] ipw2200: fix after "ieee80211: ethernet independency" Jiri Benc
2005-05-24 18:52 ` [0/5] Improvements to the ieee80211 layer Pavel Machek
2005-05-25  8:29   ` Jirka Bohac
2005-05-25  9:27     ` Pavel Machek
2005-05-25  9:42       ` Jiri Benc
2005-05-25  6:55 ` Zhu Yi
2005-05-25 11:20   ` Jiri Benc
2005-05-26  3:36     ` Zhu Yi
2005-05-28  3:18 ` Jeff Garzik

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=20050531153050.139b1408@griffin.suse.cz \
    --to=jbenc@suse.cz \
    --cc=jbohac@suse.cz \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /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).