All of lore.kernel.org
 help / color / mirror / Atom feed
* [WireGuard] [PATCH] kernel: expose configuration for padata
@ 2016-11-10  3:07 Jason A. Donenfeld
  2016-11-10  3:08 ` [WireGuard] [PATCH] wireguard: select parallel encryption engine Jason A. Donenfeld
  2016-11-14  8:28 ` [WireGuard] [LEDE-DEV] [PATCH] kernel: expose configuration for padata Felix Fietkau
  0 siblings, 2 replies; 8+ messages in thread
From: Jason A. Donenfeld @ 2016-11-10  3:07 UTC (permalink / raw)
  To: openwrt, lede-dev, wireguard

The padata API is a powerful framework for doing parallel jobs inside
the kernel, on which various modules in the package feed can depend,
such as WireGuard. There is no item text, so that it does not show up
in menuconfig, as this is only supposed to be an option selected as a
dependency. There as already precedent for this behavior, with
CONFIG_KERNEL_RELAY, on which several packages depend.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 config/Config-kernel.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index d8ca76c..9aca2a0 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -224,6 +224,9 @@ config KERNEL_PROC_PAGE_MONITOR
 config KERNEL_RELAY
 	bool
 
+config KERNEL_CRYPTO_PCRYPT
+	bool
+
 config KERNEL_KEXEC
 	bool "Enable kexec support"
 
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [WireGuard] [PATCH] wireguard: select parallel encryption engine
  2016-11-10  3:07 [WireGuard] [PATCH] kernel: expose configuration for padata Jason A. Donenfeld
@ 2016-11-10  3:08 ` Jason A. Donenfeld
  2016-11-10 12:15   ` Baptiste Jonglez
  2016-11-14  8:28 ` [WireGuard] [LEDE-DEV] [PATCH] kernel: expose configuration for padata Felix Fietkau
  1 sibling, 1 reply; 8+ messages in thread
From: Jason A. Donenfeld @ 2016-11-10  3:08 UTC (permalink / raw)
  To: openwrt, lede-dev, wireguard

On non SMP systems, this doesn't wind up doing anything or adding any
code at all. On SMP systems, this adds a little bit of code, and makes
encryption use all cores.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 net/wireguard/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile
index 7387673..c5c014c 100644
--- a/net/wireguard/Makefile
+++ b/net/wireguard/Makefile
@@ -89,7 +89,7 @@ define KernelPackage/wireguard
   CATEGORY:=Kernel modules
   SUBMENU:=Network Support
   TITLE:=Wireguard kernel module
-  DEPENDS:=@IPV6 +kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit
+  DEPENDS:=@IPV6 +@KERNEL_CRYPTO_PCRYPT +kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit
   FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,33,wireguard)
 endef
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [WireGuard] [PATCH] wireguard: select parallel encryption engine
  2016-11-10  3:08 ` [WireGuard] [PATCH] wireguard: select parallel encryption engine Jason A. Donenfeld
@ 2016-11-10 12:15   ` Baptiste Jonglez
  0 siblings, 0 replies; 8+ messages in thread
From: Baptiste Jonglez @ 2016-11-10 12:15 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: lede-dev, wireguard

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

Hi Jason,

Thanks for the patch.  Wireguard is not part of the core OpenWRT/LEDE
systems, it is managed on https://github.com/openwrt/packages , so you
should have sent a pull request there.

Nevertheless, I will try to test and apply your patch within a few days.

Baptiste

On Thu, Nov 10, 2016 at 04:08:15AM +0100, Jason A. Donenfeld wrote:
> On non SMP systems, this doesn't wind up doing anything or adding any
> code at all. On SMP systems, this adds a little bit of code, and makes
> encryption use all cores.
> 
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
>  net/wireguard/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile
> index 7387673..c5c014c 100644
> --- a/net/wireguard/Makefile
> +++ b/net/wireguard/Makefile
> @@ -89,7 +89,7 @@ define KernelPackage/wireguard
>    CATEGORY:=Kernel modules
>    SUBMENU:=Network Support
>    TITLE:=Wireguard kernel module
> -  DEPENDS:=@IPV6 +kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit
> +  DEPENDS:=@IPV6 +@KERNEL_CRYPTO_PCRYPT +kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit
>    FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX)
>    AUTOLOAD:=$(call AutoLoad,33,wireguard)
>  endef

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [WireGuard] [LEDE-DEV] [PATCH] kernel: expose configuration for padata
  2016-11-10  3:07 [WireGuard] [PATCH] kernel: expose configuration for padata Jason A. Donenfeld
  2016-11-10  3:08 ` [WireGuard] [PATCH] wireguard: select parallel encryption engine Jason A. Donenfeld
@ 2016-11-14  8:28 ` Felix Fietkau
  2016-11-14 13:16   ` [WireGuard] [PATCH] kernel: enable pcrypt Jason A. Donenfeld
  1 sibling, 1 reply; 8+ messages in thread
From: Felix Fietkau @ 2016-11-14  8:28 UTC (permalink / raw)
  To: Jason A. Donenfeld, openwrt, lede-dev, wireguard

On 2016-11-10 04:07, Jason A. Donenfeld wrote:
> The padata API is a powerful framework for doing parallel jobs inside
> the kernel, on which various modules in the package feed can depend,
> such as WireGuard. There is no item text, so that it does not show up
> in menuconfig, as this is only supposed to be an option selected as a
> dependency. There as already precedent for this behavior, with
> CONFIG_KERNEL_RELAY, on which several packages depend.
> 
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Please enable CONFIG_CRYPTO_PCRYPT in target/linux/generic/config-* instead.

- Felix

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [WireGuard] [PATCH] kernel: enable pcrypt
  2016-11-14  8:28 ` [WireGuard] [LEDE-DEV] [PATCH] kernel: expose configuration for padata Felix Fietkau
@ 2016-11-14 13:16   ` Jason A. Donenfeld
  2016-11-16 19:35     ` Jason A. Donenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Jason A. Donenfeld @ 2016-11-14 13:16 UTC (permalink / raw)
  To: openwrt, lede-dev, wireguard, Felix Fietkau

This is a powerful API for parallel crypto from which many other modules
can benefit. It only winds up being turned on on SMP systems, which
means this adds 0 bytes to the kernel on tiny machines, while only
adding a small bit to SMP systems for big performance improvements.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 target/linux/generic/config-3.18 | 2 +-
 target/linux/generic/config-4.1  | 2 +-
 target/linux/generic/config-4.4  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 8b70c7d..c61a4b3 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -762,7 +762,7 @@ CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
 # CONFIG_CRYPTO_PCBC is not set
 # CONFIG_CRYPTO_PCOMP is not set
 # CONFIG_CRYPTO_PCOMP2 is not set
-# CONFIG_CRYPTO_PCRYPT is not set
+CONFIG_CRYPTO_PCRYPT=y
 # CONFIG_CRYPTO_RMD128 is not set
 # CONFIG_CRYPTO_RMD160 is not set
 # CONFIG_CRYPTO_RMD256 is not set
diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1
index 68bd849..4fae342 100644
--- a/target/linux/generic/config-4.1
+++ b/target/linux/generic/config-4.1
@@ -792,7 +792,7 @@ CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
 # CONFIG_CRYPTO_PCBC is not set
 # CONFIG_CRYPTO_PCOMP is not set
 # CONFIG_CRYPTO_PCOMP2 is not set
-# CONFIG_CRYPTO_PCRYPT is not set
+CONFIG_CRYPTO_PCRYPT=y
 # CONFIG_CRYPTO_RMD128 is not set
 # CONFIG_CRYPTO_RMD160 is not set
 # CONFIG_CRYPTO_RMD256 is not set
diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4
index 28e7068..843154d 100644
--- a/target/linux/generic/config-4.4
+++ b/target/linux/generic/config-4.4
@@ -791,7 +791,7 @@ CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
 # CONFIG_CRYPTO_PCBC is not set
 # CONFIG_CRYPTO_PCOMP is not set
 # CONFIG_CRYPTO_PCOMP2 is not set
-# CONFIG_CRYPTO_PCRYPT is not set
+CONFIG_CRYPTO_PCRYPT=y
 # CONFIG_CRYPTO_POLY1305 is not set
 # CONFIG_CRYPTO_RMD128 is not set
 # CONFIG_CRYPTO_RMD160 is not set
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [WireGuard] [PATCH] kernel: enable pcrypt
  2016-11-14 13:16   ` [WireGuard] [PATCH] kernel: enable pcrypt Jason A. Donenfeld
@ 2016-11-16 19:35     ` Jason A. Donenfeld
  2016-11-16 19:35       ` Felix Fietkau
  0 siblings, 1 reply; 8+ messages in thread
From: Jason A. Donenfeld @ 2016-11-16 19:35 UTC (permalink / raw)
  To: lede-dev, WireGuard mailing list, Felix Fietkau

Hi Felix,

Patchwork was changed to "accepted" --
http://patchwork.ozlabs.org/patch/694517/ -- but this hasn't shown up
in the actual LEDE repo. What's up?

Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [WireGuard] [PATCH] kernel: enable pcrypt
  2016-11-16 19:35     ` Jason A. Donenfeld
@ 2016-11-16 19:35       ` Felix Fietkau
  2016-11-16 19:36         ` Jason A. Donenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Felix Fietkau @ 2016-11-16 19:35 UTC (permalink / raw)
  To: Jason A. Donenfeld, lede-dev, WireGuard mailing list

On 2016-11-16 20:35, Jason A. Donenfeld wrote:
> Hi Felix,
> 
> Patchwork was changed to "accepted" --
> http://patchwork.ozlabs.org/patch/694517/ -- but this hasn't shown up
> in the actual LEDE repo. What's up?
It's in my staging tree and will make it to the main repo soon.

- Felix

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [WireGuard] [PATCH] kernel: enable pcrypt
  2016-11-16 19:35       ` Felix Fietkau
@ 2016-11-16 19:36         ` Jason A. Donenfeld
  0 siblings, 0 replies; 8+ messages in thread
From: Jason A. Donenfeld @ 2016-11-16 19:36 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: lede-dev, WireGuard mailing list

On Wed, Nov 16, 2016 at 8:35 PM, Felix Fietkau <nbd@nbd.name> wrote:
> It's in my staging tree and will make it to the main repo soon.

Good to hear. Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-16 19:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10  3:07 [WireGuard] [PATCH] kernel: expose configuration for padata Jason A. Donenfeld
2016-11-10  3:08 ` [WireGuard] [PATCH] wireguard: select parallel encryption engine Jason A. Donenfeld
2016-11-10 12:15   ` Baptiste Jonglez
2016-11-14  8:28 ` [WireGuard] [LEDE-DEV] [PATCH] kernel: expose configuration for padata Felix Fietkau
2016-11-14 13:16   ` [WireGuard] [PATCH] kernel: enable pcrypt Jason A. Donenfeld
2016-11-16 19:35     ` Jason A. Donenfeld
2016-11-16 19:35       ` Felix Fietkau
2016-11-16 19:36         ` Jason A. Donenfeld

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.