Re: Removing WireGuard Support From FreeBSD Base

Evilham <[email protected]>
Newsgroups gmane.os.freebsd.architechture,gmane.network.wireguard,gmane.os.freebsd.devel.hackers
Message-ID <[email protected]>
On dv., març 19 2021, Gordon Bergling wrote:

> On Wed, Mar 17, 2021 at 12:34:02PM -0600, Jason A. Donenfeld 
> wrote:
>> Hi Gordon,
>>
>> On Wed, Mar 17, 2021 at 6:53 AM Gordon Bergling 
>> <[email protected]> wrote:
>> > I am not sure, if the removal is a great idea, a removal from
>> > releng/13 and stable/13 - possibly yes, but from main?
>> >
>> > This is still -CURRENT and -CURRENT should be central place 
>> > for development,
>> > even if we have phabricator for review.
>>
>> It looks like Kyle has gone ahead with the revert anyway, so
>> development is now happening at:
>>
>> https://git.zx2c4.com/wireguard-freebsd/
>>
>> And there are now regular snapshot releases:
>>
>> https://lists.zx2c4.com/pipermail/wireguard/2021-March/006518.html
>>
>> As for your objections, and the question of what -CURRENT 
>> should or
>> shouldn't be used for, I really have no idea as a community 
>> outsider.
>> But I do look forward to submitting it for proper inclusion in
>> -CURRENT after a few more cycles of development and refinement.
>> There's also the crypto question that I'd welcome some feedback 
>> on:
>>
>> https://lists.freebsd.org/pipermail/freebsd-hackers/2021-March/057076.html
>>
>> > If the complete backout is happening, please don't forget the 
>> > manual
>> > page. I have spend a lot of time on it, while OpenBSD made a 
>> > good
>> > template.
>>
>> Thanks for bringing this up; I had actually forgotten about 
>> that. Do
>> you want to re-add it and keep that current as we develop? If 
>> you
>> email me your SSH key, you can just commit it directly.
>>
>> Jason
>
> Thanks for the reply. I still think that the removal from main 
> was a mistake,
> but it has happened.
>
> I'll create a port for WireGuard tomorrow so that FreeBSD isn't 
> losing WireGuard
> support at all, for whatever reason.
>
> --Gordon


If you do that, please take following tiny patch into account 
(missing from the git repo @zx2c4, posted to the WG ML awaiting 
moderation):

This is due to the removal commit form stable/13 and, from what I 
saw, didn't affect CURRENT or 12.

---
 src/compat.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index 6126e26..bc29c01 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -7,6 +7,9 @@
  */

 #include <sys/param.h>
+#if __FreeBSD_version < 1400000
+#include <sys/smp.h>
+#include <sys/gtaskqueue.h>
 #if __FreeBSD_version < 1300000
 #define VIMAGE

@@ -18,8 +21,6 @@
 #include <sys/malloc.h>
 #include <sys/proc.h>
 #include <sys/lock.h>
-#include <sys/smp.h>
-#include <sys/gtaskqueue.h>
 #include <sys/socketvar.h>
 #include <sys/protosw.h>
 #include <net/vnet.h>
@@ -39,6 +40,7 @@

 #undef atomic_load_ptr
 #define atomic_load_ptr(p) (*(volatile __typeof(*p) *)(p))
+#endif /* __FreeBSD_version < 1300000 */

 struct taskqgroup_cpu {
 	LIST_HEAD(, grouptask)	tgc_tasks;
@@ -67,7 +69,7 @@ static inline void taskqgroup_drain_all(struct 
taskqgroup *tqg)
 		gtaskqueue_drain_all(q);
 	}
 }
-#endif
+#endif /* __FreeBSD_version < 1400000 */

 #if __FreeBSD_version < 1202000
 static inline uint32_t arc4random_uniform(uint32_t bound)
--
2.30.1
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.