From: Johannes Berg <johannes@sipsolutions.net>
To: "Thiagarajan, Vasanthakumar" <vthiagar@qti.qualcomm.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [RFC 3/3] mac80211: Add receive path for ethernet frame format
Date: Fri, 16 Dec 2016 10:13:43 +0100 [thread overview]
Message-ID: <1481879623.27953.4.camel@sipsolutions.net> (raw)
In-Reply-To: <58538DFA.1090808@qti.qualcomm.com>
> Ok. So it is mainly for encap there needs to be some capability
> advertisement from driver
Obviously, since mac80211 needs to pick the ndo struct to use.
> because for decap driver would use appropriate mac80211 Rx function
> to indicate?
That should be sufficient, no?
In fact, for RX, assuming that the relevant things are offloaded (and
we should ensure that in the RX function(s)), the driver could be
allowed to switch around as dynamically as it wants to (as long as it's
not mixing in _irqsafe calls or doing other things that might cause
reordering)
> > > + memset(&rx, 0, sizeof(rx));
> >
> > That seems a bit pointless?
>
> Hmmm, is it not that all member other than the ones initialized will
> be junk and might result in crash when accessing uninitialized
> pointer member like napi?
Oh, ok. I thought it was actually all filled.
You really should support NAPI though.
> > Yeah, that's not nice - perhaps we can provide the TID out of band?
>
> Right. This is possible with ath10k where 802.11 header is also
> available in Rx desc of the frame irrespective of the format of the
> Rx payload
We could go with that for now then. Leave a comment indicating that if
it can't be provided, we need to disable statistics for it?
> >
> > > + return;
> > > +
> > > +mic_fail:
> > > + cfg80211_michael_mic_failure(sdata->dev, sta->addr,
> > > + (status->flag &
> > > RX_FLAG_MCAST)
> > > ?
> > > + NL80211_KEYTYPE_GROUP :
> > > + NL80211_KEYTYPE_PAIRWISE,
> > > + key ? key->conf.keyidx :
> > > -1,
> > > + NULL, GFP_ATOMIC);
> >
> > Do we really want to handle that inline here? The driver probably
> > has a different check to even set RX_FLAG_MMIC_ERROR, so we could
> > just ask it to call cfg80211_michael_mic_failure() [or a wrapper to
> > get sdata->dev] instead? I guess this works too though, and might
> > be easier to understand.
>
> Yeah, driver directly reporting MIC failure will be fine. I think a
> wrapper may be required rather than mac80211 based driver directly
> calling cfg80211 function?
It would be, because the driver can't get sdata->dev (although I think
there's now a hidden path to do this?)
johannes
next prev parent reply other threads:[~2016-12-16 9:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 6:00 [RFC 0/3] Add new data path for ethernet frame format Vasanthakumar Thiagarajan
2016-12-15 6:00 ` [RFC 1/3] mac80211: Add provision for 802.11 encap/decap offload Vasanthakumar Thiagarajan
2016-12-15 9:16 ` Johannes Berg
2016-12-15 10:43 ` Thiagarajan, Vasanthakumar
2016-12-16 9:30 ` Johannes Berg
2016-12-15 6:00 ` [RFC 2/3] mac80211: Implement data xmit for 802.11 encap offload Vasanthakumar Thiagarajan
2016-12-15 9:29 ` Johannes Berg
2016-12-15 12:01 ` Thiagarajan, Vasanthakumar
2016-12-15 13:32 ` Felix Fietkau
2016-12-15 13:53 ` Johannes Berg
2016-12-16 5:37 ` Thiagarajan, Vasanthakumar
2016-12-16 9:25 ` Johannes Berg
2016-12-19 11:45 ` Kalle Valo
2016-12-19 12:02 ` Thiagarajan, Vasanthakumar
2016-12-15 6:00 ` [RFC 3/3] mac80211: Add receive path for ethernet frame format Vasanthakumar Thiagarajan
2016-12-15 9:38 ` Johannes Berg
2016-12-16 6:47 ` Thiagarajan, Vasanthakumar
2016-12-16 9:13 ` Johannes Berg [this message]
2016-12-16 9:14 ` Johannes Berg
2016-12-15 9:08 ` [RFC 0/3] Add new data " Johannes Berg
2016-12-15 10:03 ` Thiagarajan, Vasanthakumar
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=1481879623.27953.4.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=vthiagar@qti.qualcomm.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).