From: Johannes Berg <johannes@sipsolutions.net>
To: mohamed <mabbas@linux.intel.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [patch 3/5] A-MSDU Rx aggregation support
Date: Wed, 28 Mar 2007 20:23:00 +0200 [thread overview]
Message-ID: <1175106180.5151.76.camel@johannes.berg> (raw)
In-Reply-To: <1174909200.1364.56.camel@dell-4965.jf.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On Mon, 2007-03-26 at 04:40 -0700, mohamed wrote:
> + ethertype = (payload[6] << 8) | payload[7];
> +
> + if (likely((memcmp(payload, rfc1042_header, 6) == 0 &&
> + ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
> + memcmp(payload, bridge_tunnel_header, 6) == 0)) {
> + /* remove RFC1042 or Bridge-Tunnel encapsulation and
> + * replace EtherType */
> + skb_pull(skb, hdrlen + 6);
> + } else {
> + skb_pull(skb, hdrlen);
> + }
> +
> + eth = (struct ethhdr*)skb->data;
If you put the eth = stuff before ethertype = you can make this code
something like ethertype = be16_to_cpu(eth->h_proto) instead of the
hardcoded endianness conversion. And the memcmp() could be
compare_ether_addr(eth->h_dest, rfc1042_header) instead.
> + while ((u8*)eth < skb->data + skb->len) {
I don't understand this cast of eth to u8*. That seems wrong given that
there's an ethhdr there where the first byte isn't a length byte.
> + unsigned int eth_len = sizeof(struct ethhdr) +
> + ntohs(eth->h_proto);
> +
> + frame = dev_alloc_skb(3000);
Maybe there's a way to get an skb that actually points into the payload?
Not sure that is desirable though we really should optimise the receive
path.. it does far too many copies already.
I'll look some things later again, have to go now.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2007-03-28 18:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-26 11:40 [patch 3/5] A-MSDU Rx aggregation support mohamed
2007-03-26 23:36 ` Randy Dunlap
2007-03-29 6:16 ` mohamed
2007-03-28 18:19 ` Randy Dunlap
2007-03-28 18:23 ` Johannes Berg [this message]
2007-03-28 21:08 ` Michael Buesch
2007-03-29 11:06 ` Johannes Berg
2007-03-28 19:53 ` Johannes Berg
[not found] ` <1ba2fa240703291412g6bf0b38fv86c64c9171601b5e@mail.gmail.com>
2007-03-30 10:40 ` Johannes Berg
2007-04-03 6:30 ` mabbas
2007-04-02 18:38 ` Johannes Berg
2007-04-03 0:07 ` Tomas Winkler
2007-04-04 10:37 ` mabbas
2007-06-20 21:13 ` Johannes Berg
2007-07-18 0:01 ` John W. Linville
2007-07-18 10:29 ` Johannes Berg
2007-07-18 13:22 ` Tomas Winkler
2007-07-18 15:38 ` Johannes Berg
2007-07-18 15:51 ` Tomas Winkler
2007-07-18 16:56 ` Johannes Berg
2007-07-19 18:27 ` Tomas Winkler
2007-07-25 8:06 ` Tomas Winkler
2007-07-25 8:37 ` Johannes Berg
2007-07-25 18:05 ` mohamed salim abbas
2007-07-25 19:14 ` Tomas Winkler
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=1175106180.5151.76.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mabbas@linux.intel.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).