Development discussion of WireGuard
 help / color / mirror / Atom feed
* Cortex-m support
@ 2018-02-04 20:04 Jonathan Beri
  2018-02-16 22:21 ` Jason A. Donenfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Beri @ 2018-02-04 20:04 UTC (permalink / raw)
  To: wireguard

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

Hi all,

Would it be possible to run WireGuard on cortex-m class devices? Either
bare-metal or on top of embedded OSes like FreeRTOS? Also, what's the
memory overhead (and total overhead if you estimate kernel modules used)?

Said differently, how tightly coupled is WireGuard to the kernel? Is the
code portable to other operating systems?

I just learned about WireGuard on the FLOSS podcast. Being UDP-based makes
it very attractive to IoT devices.

Thanks!

[-- Attachment #2: Type: text/html, Size: 583 bytes --]

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

* Re: Cortex-m support
  2018-02-04 20:04 Cortex-m support Jonathan Beri
@ 2018-02-16 22:21 ` Jason A. Donenfeld
  2018-02-17 15:39   ` Jonathan Beri
  0 siblings, 1 reply; 6+ messages in thread
From: Jason A. Donenfeld @ 2018-02-16 22:21 UTC (permalink / raw)
  To: Jonathan Beri; +Cc: WireGuard mailing list

Hi Jonathan,

Currently it's quite coupled to Linux, but it doesn't have to be that
way for ever. Our cross platform implementations are coming along.

Jason

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

* Re: Cortex-m support
  2018-02-16 22:21 ` Jason A. Donenfeld
@ 2018-02-17 15:39   ` Jonathan Beri
  2020-02-29 22:20     ` Jonathan Beri
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Beri @ 2018-02-17 15:39 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

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

Thanks Jason! Do you have a sense of the resource requirements? If that's a
hard question to answer because of the OS coupling, what about the main app
minus the OS-owned resources?

For comparison, I'm wondering if wiregaurd can run on a 200mhz cortex m4f,
with 246KB of ram, with an LwIP ip stack + FreeRTOS. That's the typical IoT
hardware we target.

On Fri, Feb 16, 2018, 2:21 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> Hi Jonathan,
>
> Currently it's quite coupled to Linux, but it doesn't have to be that
> way for ever. Our cross platform implementations are coming along.
>
> Jason
>

[-- Attachment #2: Type: text/html, Size: 882 bytes --]

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

* Re: Cortex-m support
  2018-02-17 15:39   ` Jonathan Beri
@ 2020-02-29 22:20     ` Jonathan Beri
  2020-03-01  7:07       ` Jason A. Donenfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Beri @ 2020-02-29 22:20 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1678 bytes --]

Hi all,

I'm interested in revisiting the idea of Wireguard on embedded systems. It
looks like cross platform implementations have gotten very mature in the
past two years. Is it anymore feasible to implement WG in an OS-less
("freestanding") environment where something like a TUN interface doesn't
exist? Take one such environment, an RTOS, and the popular open source
https://www.zephyrproject.org/. It has a full networking implementation but
apps typically use BSD sockets (
https://docs.zephyrproject.org/latest/reference/networking/sockets.html) or
PPP (https://docs.zephyrproject.org/latest/reference/networking/ppp.html)
and network management (
https://docs.zephyrproject.org/latest/reference/networking/net_mgmt.html)
directly. Also, these implementations are very optimized as they typically
run on tiny MCUs (~100 Mhz, 256kb ram.)

I'd be curious to hear y'all's thoughts!

On Sat, Feb 17, 2018 at 7:39 AM Jonathan Beri <jmberi@gmail.com> wrote:

> Thanks Jason! Do you have a sense of the resource requirements? If that's
> a hard question to answer because of the OS coupling, what about the main
> app minus the OS-owned resources?
>
> For comparison, I'm wondering if wiregaurd can run on a 200mhz cortex m4f,
> with 246KB of ram, with an LwIP ip stack + FreeRTOS. That's the typical IoT
> hardware we target.
>
> On Fri, Feb 16, 2018, 2:21 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
>> Hi Jonathan,
>>
>> Currently it's quite coupled to Linux, but it doesn't have to be that
>> way for ever. Our cross platform implementations are coming along.
>>
>> Jason
>>
>

-- 
Jonathan Beri
linkedin.com/in/jonathanberi <https://www.linkedin.com/in/jonathanberi/>

[-- Attachment #1.2: Type: text/html, Size: 2760 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: Cortex-m support
  2020-02-29 22:20     ` Jonathan Beri
@ 2020-03-01  7:07       ` Jason A. Donenfeld
  2020-03-03 16:14         ` Tony Arcieri
  0 siblings, 1 reply; 6+ messages in thread
From: Jason A. Donenfeld @ 2020-03-01  7:07 UTC (permalink / raw)
  To: Jonathan Beri, Mathias; +Cc: WireGuard mailing list

On Sun, Mar 1, 2020 at 6:20 AM Jonathan Beri <jmberi@gmail.com> wrote:
>
> Hi all,
>
> I'm interested in revisiting the idea of Wireguard on embedded systems. It looks like cross platform implementations have gotten very mature in the past two years. Is it anymore feasible to implement WG in an OS-less ("freestanding") environment where something like a TUN interface doesn't exist? Take one such environment, an RTOS, and the popular open source https://www.zephyrproject.org/. It has a full networking implementation but apps typically use BSD sockets (https://docs.zephyrproject.org/latest/reference/networking/sockets.html) or PPP (https://docs.zephyrproject.org/latest/reference/networking/ppp.html) and network management (https://docs.zephyrproject.org/latest/reference/networking/net_mgmt.html) directly. Also, these implementations are very optimized as they typically run on tiny MCUs (~100 Mhz, 256kb ram.)
>
> I'd be curious to hear y'all's thoughts!
>

It's likely our rust implementation well be well-suited for what you
have in mind.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: Cortex-m support
  2020-03-01  7:07       ` Jason A. Donenfeld
@ 2020-03-03 16:14         ` Tony Arcieri
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Arcieri @ 2020-03-03 16:14 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: Jonathan Beri, WireGuard mailing list


[-- Attachment #1.1: Type: text/plain, Size: 718 bytes --]

On Sat, Feb 29, 2020 at 11:08 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> It's likely our rust implementation well be well-suited for what you
> have in mind.


Looking at wireguard-rs, in its current form it makes a lot of use of
`alloc` (namely `Vec` and `HashMap`) and `std` features (`fs`, `net`,
`sync`).

Getting it working on a Cortex-M would involve extracting a core protocol
implementation which doesn't make use of any of those features as a
library/crate which has no dependencies (or only optional dependencies
which can be switched off with Cargo features) on `alloc` and `std`.

(as it were, I'm also interested in using wireguard-rs this way in a
"heapless" no_std environment)

-- 
Tony Arcieri

[-- Attachment #1.2: Type: text/html, Size: 1130 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

end of thread, other threads:[~2020-03-03 23:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-04 20:04 Cortex-m support Jonathan Beri
2018-02-16 22:21 ` Jason A. Donenfeld
2018-02-17 15:39   ` Jonathan Beri
2020-02-29 22:20     ` Jonathan Beri
2020-03-01  7:07       ` Jason A. Donenfeld
2020-03-03 16:14         ` Tony Arcieri

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).