From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 50AA97EE4B for ; Fri, 18 Oct 2013 16:20:20 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of markus.mottl@gmail.com) identity=pra; client-ip=74.125.82.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of markus.mottl@gmail.com designates 74.125.82.170 as permitted sender) identity=mailfrom; client-ip=74.125.82.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f170.google.com) identity=helo; client-ip=74.125.82.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="postmaster@mail-we0-f170.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuADAHxCYVJKfVKqlGdsb2JhbABagz9SviCBGwgWDgEBAQEHCwsJEiqCJQEBAwJAARQHHQEDDAYFCw0uIgERAQUBHAYTh3MBAw8MoiuMVYMKhBwKGScNZIkBAQUMj0oHhCkDmAmBL45sGCmEayA X-IPAS-Result: AuADAHxCYVJKfVKqlGdsb2JhbABagz9SviCBGwgWDgEBAQEHCwsJEiqCJQEBAwJAARQHHQEDDAYFCw0uIgERAQUBHAYTh3MBAw8MoiuMVYMKhBwKGScNZIkBAQUMj0oHhCkDmAmBL45sGCmEayA X-IronPort-AV: E=Sophos;i="4.93,522,1378850400"; d="scan'208";a="30890675" Received: from mail-we0-f170.google.com ([74.125.82.170]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Oct 2013 16:20:19 +0200 Received: by mail-we0-f170.google.com with SMTP id u57so3884864wes.1 for ; Fri, 18 Oct 2013 07:20:19 -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 :cc:content-type; bh=tScT7U/hqHrUp4XYCO/9hNCAA/KyuIDuQfFC61udVEg=; b=qWSFG/Gd+BslFvcD3vgPCj3teil9FpS+gkGPIm4ARqTfF0eo1stE5qg+EatmBv6TCp p+e/tRAuEBHmZMxPYfIJTQZvkH4T9YYhrOYGmafGSqBcUkvDOZbqwXD9ibKw3ks0hhEP joekulBBN/cwjH/e7G0KxItINa2v/aQwvGB7amG55U0Lhc7YljfifZD4WcGvd9PIaY4O Ief2bHLQXfmKiob6luLBlikyp+/f5uIOZzX2gRBPTwQ3AvoeaJmGjtqYPq5I4vsFEv7B gUGdG8JVExgMZy69DwUbysDQJRXWgttt9GFyD5JNNOhDGbcdOyRcgAKfa9N9G4p7sSxb EqBQ== MIME-Version: 1.0 X-Received: by 10.180.10.8 with SMTP id e8mr2642575wib.65.1382106019255; Fri, 18 Oct 2013 07:20:19 -0700 (PDT) Received: by 10.194.172.4 with HTTP; Fri, 18 Oct 2013 07:20:19 -0700 (PDT) In-Reply-To: <20131018122018.GJ25839@dark.recoil.org> References: <20131018115553.GA28679@ombreroze.happyleptic.org> <20131018115955.GG25839@dark.recoil.org> <20131018121612.GB28679@ombreroze.happyleptic.org> <20131018122018.GJ25839@dark.recoil.org> Date: Fri, 18 Oct 2013 10:20:19 -0400 Message-ID: From: Markus Mottl To: Anil Madhavapeddy Cc: Chapi Chapo , OCaml Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] IPv6 packet parsing On Fri, Oct 18, 2013 at 8:20 AM, Anil Madhavapeddy wrote: > We have a number of use-cases that run OCaml in kernel mode, directly > operating on packets read from a network driver that's also written in > OCaml. Bigarrays are used as the mechanism for passing around externally > allocated memory (i.e. network card buffers) directly, whereas inspecting > them with a string-based Bigarray requires an expensive data copy. > > See: http://anil.recoil.org/papers/2013-asplos-mirage.pdf > or http://www.openmirage.org It may also be of interest to investigate the use of "splice" and "tee" on Linux to avoid frequent switches between user- and kernel mode and to duplicate I/O streams without having to copy the data (zero copy). There is an implementation in Core_extended.Extended_Linux in the core_extended OPAM package. Regards, Markus