From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Ido Yariv <ido@wizery.com>
Subject: Re: [PATCH 1/2] mac80211: add TX fastpath
Date: Mon, 30 Mar 2015 16:49:25 +0200 [thread overview]
Message-ID: <1427726965.26117.33.camel@sipsolutions.net> (raw)
In-Reply-To: <1427726167-17802-1-git-send-email-johannes@sipsolutions.net> (sfid-20150330_163615_451006_13377F81)
On Mon, 2015-03-30 at 16:36 +0200, Johannes Berg wrote:
> +static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
> + struct net_device *dev, struct sta_info *sta,
> + struct ieee80211_fast_tx *fast_tx,
> + struct sk_buff *skb)
> +{
> + if (skb_shared(skb)) {
> + struct sk_buff *tmp_skb = skb;
> +
> + skb = skb_clone(skb, GFP_ATOMIC);
> + kfree_skb(tmp_skb);
> +
> + if (!skb)
> + return true;
> + }
I don't really like this so much, but it's not all that relevant right
now. I'll probably remove this in the future though and ask drivers to
support shared SKBs if they want to take advantage of this, or so.
Also, I'll probably add checksum offload (properly - we do allow that
now but it's broken) and LSO only to the fast-xmit path here, so that we
don't have to audit all the rest of the code ...
The TI driver got this wrong, and enables checksum unconditionally, but
then if the frame needs any sort of software handling it'll totally mess
up. That's not very likely as all keys are installed into the HW, but
still ...
> + /* will not be crypto-handled beyond what we do here, so use false
> + * as the may-encrypt argument for the resize
> + */
> + if (unlikely(skb_headroom(skb) < extra_head + hw_headroom &&
> + ieee80211_skb_resize(sdata, skb, extra_head + hw_headroom,
> + false))) {
> + kfree_skb(skb);
> + return true;
> + }
This might actually be wrong - I think we need to check for
IEEE80211_HW_SUPPORTS_CLONED_SKBS and skb_clone_writable(ETH_HLEN) as
well, like ieee80211_skb_resize() does.
johannes
next prev parent reply other threads:[~2015-03-30 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 14:36 [PATCH 1/2] mac80211: add TX fastpath Johannes Berg
2015-03-30 14:36 ` [PATCH 2/2] mac80211_hwsim: enable fast-xmit Johannes Berg
2015-03-30 14:49 ` Johannes Berg [this message]
2015-03-30 15:03 ` [PATCH 1/2] mac80211: add TX fastpath Joe Perches
2015-03-30 15:07 ` Johannes Berg
2015-03-30 16:42 ` Joe Perches
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=1427726965.26117.33.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=ido@wizery.com \
--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;
as well as URLs for NNTP newsgroup(s).