linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Pubbisetty, Manikanta" <mpubbise@qti.qualcomm.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"Thiagarajan, Vasanthakumar" <vthiagar@qti.qualcomm.com>
Subject: Re: [RFCv2 2/2] mac80211: Implement data xmit for 802.11 encap offload
Date: Wed, 08 Mar 2017 22:33:32 +0100	[thread overview]
Message-ID: <1489008812.7127.9.camel@sipsolutions.net> (raw)
In-Reply-To: <30b4079fcf574d6fb62a10d8fa85ac06@aphydexm01f.ap.qualcomm.com>


> > Why is that needed? Since you have a separate TX path
> > (ndo_start_xmit),
> > wouldn't it make more sense to call into a drv_tx_8023() or
> > something like that instead?
> > 
> 
> [Manikanta]  Yes, it makes sense having a separate driver hook
> instead of using drv_tx, but in case of drivers (fe ath10k) 
> where enqueuing and dequeuing tx logic (wake_tx_queue and
> ieee80211_tx_dequeue) is used there should be a way
> to indicate that the packet is not 80211 encapsulated, isn't it?
> Correct me if I am missing anything.

Ah, interesting. Yeah, I guess that makes some sense then, though I'm
not super happy with sharing the code paths between differently
encapsulated frames - best to leave that as minimal as possible.

> [Manikanta]  Hmmm you are right. I just went through the code, seems
> ieee80211_tx_status_noskb does most of them what
> ieee80211_tx_status_8023 is doing, resetting the station connection
> monitoring logic and updating last known tx rate is missing in
> _noskb. These are required, isn't it?

Maybe. I don't think the tx rate is strictly required but would be
nice, while the monitoring logic is probably needed only to avoid
spurious null data packets over the air.

However, come to think of it, we need to see how this interacts with
the tx status thing - if tx status is requested then I believe _no_skb
cannot be used.

> [Manikanta] You are correct. It is good if driver advertises the vif
> types it support in encap offload mode, but how can we decide the
> netdev_ops to be used while creating the vif? drv_add_interface will
> be invoked from ndo_open and
> even before invoking driver add_interface we have to make the
> decision of using Ethernet mode netdev_ops or the default netdev_ops,
> isn't it?

It might not be a problem to swap the dev->netdev_ops, changing only
the start_xmit, while the interface is being brought up. I assume the
driver can make this decision in add_interface(), and I think swapping
there should be OK. It might be problematic if this value changes
during suspend/resume or HW restart though.

> Can we have a separate driver hook which gives whether 80211 encap
> offload is supported for the given interface type and then decide the
> netdev_ops to be attached for the vif?

I don't think that makes sense, since you can't know if the interface
will ever be brought up, so the driver can't make a good decision since
it normally doesn't have to care about interfaces that aren't brought
up.

The only real alternative I see, which might be preferable, is for the
driver to advertise a bitmap of interface types that it wants to use
ethernet framing with.

johannes

  reply	other threads:[~2017-03-08 22:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 11:33 [RFCv2 0/2] Add new transmit data path for ethernet frame format mpubbise
2017-03-03 11:33 ` [RFCv2 1/2] mac80211: Add provision for 802.11 encap offload mpubbise
2017-03-03 12:29   ` Johannes Berg
2017-03-08 15:49     ` Pubbisetty, Manikanta
2017-03-03 11:33 ` [RFCv2 2/2] mac80211: Implement data xmit " mpubbise
2017-03-03 12:39   ` Johannes Berg
2017-03-08 15:46     ` Pubbisetty, Manikanta
2017-03-08 21:33       ` Johannes Berg [this message]
2017-03-09  9:56         ` Pubbisetty, Manikanta
2017-03-14 14:11           ` Johannes Berg
2017-03-21  5:36             ` Manikanta Pubbisetty
2017-03-31 11:52               ` Johannes Berg
2017-04-11  6:06                 ` Manikanta Pubbisetty

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=1489008812.7127.9.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mpubbise@qti.qualcomm.com \
    --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).