All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liu CF/TW" <cfliu.tw@gmail.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Ben Greear <greearb@candelatech.com>,
	linux-wireless@vger.kernel.org,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k/mac80211: add rawtxrx, nohwcrypt module param for raw tx injection, sw crypto support.
Date: Thu, 14 May 2015 12:35:25 -0700	[thread overview]
Message-ID: <CAG5N3qGJ9jREnNaLF6ik+Z6xOjQTnZ3dZXUW_ODV8iapMWE5mg@mail.gmail.com> (raw)
In-Reply-To: <87oalnchwb.fsf@kamboji.qca.qualcomm.com>

On Thu, May 14, 2015 at 8:12 AM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> "Liu CF/TW" <cfliu.tw@gmail.com> writes:
>
>> I am going to propose just one single module parameter control: enc_mode
>>
>> - enc_mode = 0: Use HW crypto (default),
>>
>>   Driver behavior:
>>      - ath10k driver uses native WiFi mode for both Tx/Rx.
>>      - ath10k driver configures key to HW.
>>      Given HW key descriptor is configured, mac80211 would offload Tx
>> encryption to HW and only do Rx decryption (by mac80211) if HW failed
>> to do it.
>
> But isn't the point here to use 802.11 frames ("raw mode")? Then why
> name the module paramater as enc_mode? I think that's confusing.
>
> And to me enc_mode doesn't tell much, my first thought was "encoding
> mode". Wouldn't cryptmode tell more to the user?
>
>

Thanks for the suggestion. Yes, crypt_mode is better. I didn't mean
"enc({ap, oding})_mode" but "enc(ryption)_mode"

IMO, the new use cases enabled by the change are sw crypto support and
raw Tx frame injection (to bypass hw crypto if already encrypted).
Therefore I suggest use "crypt_mode" as module param so it's clear one
only needs to set it if sw crypto is desired.

"raw_mode" itself as a module param doesn't mean much to user, it
doesn't say what new use cases are supported. After all, both native
wifi and raw mode supports HW crypto.

In Ben's use case, driver that loads CT firmware can continue to run
without setting anything (default crypt_mode=0 means use HW crypto)
and FW continues its magic to enable Rx SW crypto fallback.  At some
point when CT firmware implements the FW feature
TX_RAW_ENCAP_SUPPORTED, all the crypt_modes=0,1,2 also works there.

Does this make sense?
David

> --
> Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: "Liu CF/TW" <cfliu.tw@gmail.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Ben Greear <greearb@candelatech.com>,
	linux-wireless@vger.kernel.org,
	"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k/mac80211: add rawtxrx, nohwcrypt module param for raw tx injection, sw crypto support.
Date: Thu, 14 May 2015 12:35:25 -0700	[thread overview]
Message-ID: <CAG5N3qGJ9jREnNaLF6ik+Z6xOjQTnZ3dZXUW_ODV8iapMWE5mg@mail.gmail.com> (raw)
In-Reply-To: <87oalnchwb.fsf@kamboji.qca.qualcomm.com>

On Thu, May 14, 2015 at 8:12 AM, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> "Liu CF/TW" <cfliu.tw@gmail.com> writes:
>
>> I am going to propose just one single module parameter control: enc_mode
>>
>> - enc_mode = 0: Use HW crypto (default),
>>
>>   Driver behavior:
>>      - ath10k driver uses native WiFi mode for both Tx/Rx.
>>      - ath10k driver configures key to HW.
>>      Given HW key descriptor is configured, mac80211 would offload Tx
>> encryption to HW and only do Rx decryption (by mac80211) if HW failed
>> to do it.
>
> But isn't the point here to use 802.11 frames ("raw mode")? Then why
> name the module paramater as enc_mode? I think that's confusing.
>
> And to me enc_mode doesn't tell much, my first thought was "encoding
> mode". Wouldn't cryptmode tell more to the user?
>
>

Thanks for the suggestion. Yes, crypt_mode is better. I didn't mean
"enc({ap, oding})_mode" but "enc(ryption)_mode"

IMO, the new use cases enabled by the change are sw crypto support and
raw Tx frame injection (to bypass hw crypto if already encrypted).
Therefore I suggest use "crypt_mode" as module param so it's clear one
only needs to set it if sw crypto is desired.

"raw_mode" itself as a module param doesn't mean much to user, it
doesn't say what new use cases are supported. After all, both native
wifi and raw mode supports HW crypto.

In Ben's use case, driver that loads CT firmware can continue to run
without setting anything (default crypt_mode=0 means use HW crypto)
and FW continues its magic to enable Rx SW crypto fallback.  At some
point when CT firmware implements the FW feature
TX_RAW_ENCAP_SUPPORTED, all the crypt_modes=0,1,2 also works there.

Does this make sense?
David

> --
> Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2015-05-14 19:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  1:06 [PATCH] ath10k/mac80211: add rawtxrx, nohwcrypt module param for raw tx injection, sw crypto support Liu CF/TW
2015-05-06  1:06 ` Liu CF/TW
2015-05-08 11:54 ` Kalle Valo
2015-05-08 11:54   ` Kalle Valo
2015-05-08 16:28   ` Ben Greear
2015-05-08 16:28     ` Ben Greear
2015-05-08 17:35     ` Liu CF/TW
2015-05-08 17:35       ` Liu CF/TW
2015-05-08 17:52       ` Ben Greear
2015-05-08 17:52         ` Ben Greear
2015-05-11 12:12       ` Kalle Valo
2015-05-11 12:12         ` Kalle Valo
2015-05-11 16:17         ` Ben Greear
2015-05-11 16:17           ` Ben Greear
2015-05-12 22:44           ` Liu CF/TW
2015-05-12 22:44             ` Liu CF/TW
2015-05-12 23:01             ` Liu CF/TW
2015-05-12 23:01               ` Liu CF/TW
2015-05-14 15:12             ` Kalle Valo
2015-05-14 15:12               ` Kalle Valo
2015-05-14 19:35               ` Liu CF/TW [this message]
2015-05-14 19:35                 ` Liu CF/TW
2015-05-14 21:16                 ` Ben Greear
2015-05-14 21:16                   ` Ben Greear
2015-05-11 12:24     ` Kalle Valo
2015-05-11 12:24       ` Kalle Valo

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=CAG5N3qGJ9jREnNaLF6ik+Z6xOjQTnZ3dZXUW_ODV8iapMWE5mg@mail.gmail.com \
    --to=cfliu.tw@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --cc=kvalo@qca.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.