From owner-freebsd-net@freebsd.org Wed Jun 15 23:50:34 2016 Return-Path: Delivered-To: freebsd-net@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 7D053A47071 for ; Wed, 15 Jun 2016 23:50:34 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3371A61 for ; Wed, 15 Jun 2016 23:50:34 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5752AA47070; Wed, 15 Jun 2016 23:50:34 +0000 (UTC) Delivered-To: net@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 56ED7A4706F for ; Wed, 15 Jun 2016 23:50:34 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (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 20BAE1A5F for ; Wed, 15 Jun 2016 23:50:34 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pf0-x22d.google.com with SMTP id i123so9710853pfg.0 for ; Wed, 15 Jun 2016 16:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=+ghvbP1sfHgID43no6vmNMWBtsw3qh/ah1K3m3nAzkQ=; b=DcmoHsTLwO2mBP6sGs1jS7ankPaEXADjv9fzUw2/bjJ63gU2IXTHJcDIIUvlHZGiwf nucPF8aKQREiMMsxPcDQ4FBaJViSPg0LbGvgL2ov9sHpgl3Rj61gsbSR0gQUZHoY53RO 7hjM0j6AfoiTHUejjhgKuupYp758B2iHHVEGEc9G3K9lUhiEvvjJDNi4JwbVqlmeuFDy Mi/pjjYXJimjdT+QIlaVmmqb/TBxNRxQCq/QtEk5SE5e14xkEmEZPERCExuNYe232MGa flkLENzUFuR4JdKChhpfOmcEm40mU1fC8SJ0R8qY2+wyqIdvMyHFqoCVrvQ+shCZc1or FF+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=+ghvbP1sfHgID43no6vmNMWBtsw3qh/ah1K3m3nAzkQ=; b=Wcq7wiabuGv0v/jEtXErEl9ht6j5Z2pwS2TYGu1yNSLnzFlvlsQlArdiuguPsWpDZg B+9OBXF6qi+sRaYQ7/3i3iF1fL1XHlC5C2tLT7aDSpswyO7mQKhwZbGwBuc33tb5ztA0 zT4Uc4BwZq2ocbdaiRzYBi1B9pQnvDSUr5CaFS6boTCa6GpcZHfquckqo6Irh0yJZ1Pm 9USApHaD3KzC2NKMMnOv2+WIfVLNfj+7gQx+v32qqXH6sLRnrNfG5+wQCFbbiLGfwaZN tQIUxL4/XIxAx5UPvMCW/ct3/ZqUoLZi5LfJRT7Xsdmbkx1suMVE2v1uEepZ7dsBV/L9 euEA== X-Gm-Message-State: ALyK8tIOQY/XLRwatlI7dx+JCHPsapkx3YvpbBzxGeaWKYrbxYop5hZYuvDB05kEV5I/FA== X-Received: by 10.98.11.4 with SMTP id t4mr1471947pfi.159.1466034632918; Wed, 15 Jun 2016 16:50:32 -0700 (PDT) Received: from [10.192.166.0] ([12.32.117.8]) by smtp.googlemail.com with ESMTPSA id z88sm27912198pfa.59.2016.06.15.16.50.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Jun 2016 16:50:31 -0700 (PDT) Sender: Navdeep Parhar Subject: Re: Netmap Checksum Offloading To: Andrey Yakovlev , Dominik Schoeffmann , "net@freebsd.org" References: <57601DFA.2040008@in.tum.de> <470941466032510@web23o.yandex.ru> From: Navdeep Parhar Message-ID: Date: Wed, 15 Jun 2016 16:50:30 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <470941466032510@web23o.yandex.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 23:50:34 -0000 On 06/15/2016 16:15, Andrey Yakovlev wrote: > ive heard on bsdcan this year that some patches exist to add hwcsum offloading to netmap, hope to see it chelsio at least cxgbe/cxl is a bit sneaky and will let you override netmap (on tx only). The ncxl interfaces declare themselves capable of checksumming but all such capabilities are disabled by default. Just enable txcsum on the interface and the hardware will do checksum insertion on tx. No way to solve the rx part entirely within the driver -- netmap has to be willing to accept checksum related flags from the driver. Regards, Navdeep > > -- > ./andy > > > 14.06.2016, 12:15, "Dominik Schoeffmann" : >> Dear Netmap Developers, >> >> during the course of my bachelor's thesis, I modified a packet generator >> called MoonGen [1] in order to utilize netmap. >> One key component was to flexibly offload checksums for different kinds >> of packets (IPv4, UDP, TCP). >> The ixgbe netmap patch was modified [2] in order to construct context >> descriptors and suitable data descriptors. This is implemented in less >> than 250 LoC (including pseudo-header calculations). >> The man page states, that checksum offloading is available via ethtool, >> although a solution inside the netmap API might be a cleaner way for >> applications to actually use these features. >> Attached is a graph showing the performance implication of using >> offloading in the current implementation. >> As can be seen, offloading has only a minor impact. >> When regarding this data (and comparing it to other frameworks), please >> keep in mind, that internally a lot of per-packet effort is needed due >> to the software architecture of the packet generator. >> >> The question being: >> Would it not make sense to include checksum offloading inside of netmap >> in order to accomodate applications operating on layer 3 and above? >> As these programs need to calculate the checksums in software, it would >> be just as fast to move these calculations to the kernel for NICs >> without checksum offloading support (and the kernel would act as a library). >> The problem which currently is imposed by the fact, that netmap exports >> the complete ring, is that context descriptors disrupt the data >> descriptors, which is unpleasant for the application. >> But you may find the data interesting nevertheless. >> >> Best Regards, >> Dominik Schoeffmann >> >> [1] https://github.com/dschoeffm/MoonGen/tree/netmap >> [2] https://github.com/dschoeffm/netmap/tree/mg-chksum-offloading > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >