From owner-soc-status@freebsd.org Mon May 30 08:40:17 2016 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9DB2B5329A for ; Mon, 30 May 2016 08:40:17 +0000 (UTC) (envelope-from y.iozzelli@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8209414C0 for ; Mon, 30 May 2016 08:40:17 +0000 (UTC) (envelope-from y.iozzelli@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id z87so62286666wmh.0 for ; Mon, 30 May 2016 01:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=rGXCaDslSYtOCUH3Ioq1mmGwd7TzOaafsBtQEN0SWDo=; b=t8I5JdYaPjBdCIZxNTYSTRt2e1P29qL9LZX+g0cwbZC7HUgYTLaZ8U/bXrv6Vhbnlb HSqvIYzikbs9tD0pckqaQ/CZsaXs/IUJgQOdhLFl68feEAQvczKAZ22rs940RvH1U/io 9SPIYn+Ho+FtcLY7MQEpAIn7stkOAvmz1CzMeCKvFTnkjF4sabvjbC0kNSyL4M2q2HUB t8qE55D/jiDp/TWDLdZZjne1j+x4Pd19J+os/9u2RY9skbMrO3lv+Ornt6AhFVxvT3zQ DlTgjRhxGtw+9AinQeWEOTS/YZs+r9XhLf+j8RECxA1AAHCVP/NCumicDZsIYfugQ0Cm C0Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=rGXCaDslSYtOCUH3Ioq1mmGwd7TzOaafsBtQEN0SWDo=; b=lXffw/sQFajVZzbdKEvJJL3aadNg+4Qpyp0CfkMDbTgFjkIfADuRMGu6q3uyn3o75u 1OvLDRx/2iS0fwry26LBxzM5sf02zJNfZVhhetLc3wRp/OOwXGssp0y1/L4D77wj6zE7 9c8VuvzoFLTiBpoUM5ka6qnePu0R7pDazvs8dQYQjEpByPMmGqD1y28Z3b9wQCltU51c 3eFsIqv+ce2D1AdT6n9YK2X19JnEWCrZ94dv9JjC3BctpQz/5J4PEGtIgysaUyj+5tZ4 Mh65hzmfR8rjrjnCO1rBffmaMfz1p0PzvQDFQI1u2zS7S/g+Vuh0NlOSBl5MUOhX8ovs AvSw== X-Gm-Message-State: ALyK8tK2fsdB4XHIjzIZA/KnHXfxqTzatw4Kn3NSFkrQm3py/h+a/jc3uqZs5aR5nWl0HrzQWqDM0JGoJLp6+Q== MIME-Version: 1.0 X-Received: by 10.28.20.139 with SMTP id 133mr737828wmu.19.1464597615773; Mon, 30 May 2016 01:40:15 -0700 (PDT) Received: by 10.28.17.15 with HTTP; Mon, 30 May 2016 01:40:15 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 May 2016 10:40:15 +0200 Message-ID: Subject: Fwd: High Performance P4 Software Switch - Week 1 From: Yuri Iozzelli To: soc-status@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 08:40:17 -0000 Hi Project summary ======================== In this project I would like to implement a modified version of the reference p4 (http://p4.org) switch on FreeBSD, which uses netmap for faster packet I/O: the goal would be reaching the 1 Mpps order-of-magnitude speed (current reference implementation is limited to 150 Kpps for a simple l2 switch with 2 hosts). Week 1 ============================================================== All the dependencies are available on FreeBSD, but the software does not compile due to the lack of support for non-POD thread_local variables in clang (only on freeBSD, in linux it works). Relevant bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320#c2 I looked at glibc implementation (explained here: https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables), and decided that for my case I don't need to implement support for dynamic libraries unloading, but just make sure that destructors are called at thread exit. The code now compiles, but it crashes at runtime. I am not sure it is because of my implementation of this function, because when the crash occurs no thread has exited yet. I also fixed a bug in the original code (pull request: https://github.com/p4lang/behavioral-model/pull/133). Links: Wiki page: https://wiki.freebsd.org/SummerOfCode2016/HighPerformanceP4SoftwareSwitch#preview Code (gsoc-* brances): https://github.com/zarghul/behavioral-model Regards, Yuri Iozzelli