From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Arik Nemtsov <arik@wizery.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 3/4] mac80211: don't fragment packets when HW-fragmentation is on
Date: Thu, 04 Nov 2010 11:52:48 +0200 [thread overview]
Message-ID: <1288864368.10002.43.camel@powerslave> (raw)
In-Reply-To: <AANLkTimXwopqOUcBWxwAmEH1tJbtLQisW7dmm+XDWHPe@mail.gmail.com>
On Thu, 2010-11-04 at 06:34 +0100, ext Arik Nemtsov wrote:
> On Thu, Nov 4, 2010 at 04:15, Johannes Berg <johannes@sipsolutions.net> wrote:
> >
> > On Wed, 2010-11-03 at 23:50 +0200, Arik Nemtsov wrote:
> > > If the driver supports hardware TX fragmentation, don't fragment
> > > packets in the stack.
> >
> > I'm not sure why you have three patches? Seems like it could all be a
> > single mac80211 patch.
>
> Sure. I'll send a v2 with the mac80211 patches bundled into a single one.
>
> >
> > > @@ -1181,8 +1183,10 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
> > > /*
> > > * Set this flag (used below to indicate "automatic fragmentation"),
> > > * it will be cleared/left by radiotap as desired.
> > > + * Only valid when fragmentation is done by the stack.
> > > */
> > > - tx->flags |= IEEE80211_TX_FRAGMENTED;
> > > + if (!(local->hw.flags & IEEE80211_HW_TX_FRAGMENTATION))
> > > + tx->flags |= IEEE80211_TX_FRAGMENTED;
> >
> > Do we really need the hw flag? Couldn't we go off the callback, like we
> > used to? I'm not really sure which one would perform better though, I
> > guess the flag might ...
>
> I think the flag may be less confusing for new driver writers.
> Someone can implement the callback as a no-op and have a bug in his
> code as a result.
Well, if someone implements the fragmentation setting function as a
no-op, it is a bug in the driver and it should be fixed. It's easy to
make that clear in the documentation. "If the hardware doesn't support
fragmentation, set this function to NULL" or something.
That's how it's done already with other ops, such as hw_scan and so on.
I don't see a need to have another flag.
Performance-wise, if there's an impact it will be almost insignificant,
I believe.
--
Cheers,
Luca.
next prev parent reply other threads:[~2010-11-04 9:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 21:50 [PATCH 0/4] Add support for fragmentation offload Arik Nemtsov
2010-11-03 21:50 ` [PATCH 1/4] mac80211: add fragmentation offload definitions Arik Nemtsov
2010-11-03 21:50 ` [PATCH 2/4] mac80211: notify drivers about frag threshold changes Arik Nemtsov
2010-11-03 21:50 ` [PATCH 3/4] mac80211: don't fragment packets when HW-fragmentation is on Arik Nemtsov
2010-11-04 2:15 ` Johannes Berg
2010-11-04 5:34 ` Arik Nemtsov
2010-11-04 9:52 ` Luciano Coelho [this message]
2010-11-03 21:50 ` [PATCH 4/4] wl1271: add support for HW TX fragmentation Arik Nemtsov
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=1288864368.10002.43.camel@powerslave \
--to=luciano.coelho@nokia.com \
--cc=arik@wizery.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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