From owner-freebsd-net@freebsd.org Thu Jun 16 00:04:56 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 40833A47960 for ; Thu, 16 Jun 2016 00:04:56 +0000 (UTC) (envelope-from jim@netgate.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 1F13912CC for ; Thu, 16 Jun 2016 00:04:56 +0000 (UTC) (envelope-from jim@netgate.com) Received: by mailman.ysv.freebsd.org (Postfix) id 1AC7DA4795E; Thu, 16 Jun 2016 00:04:56 +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 183FDA4795D for ; Thu, 16 Jun 2016 00:04:56 +0000 (UTC) (envelope-from jim@netgate.com) Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::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 C28EF12CA for ; Thu, 16 Jun 2016 00:04:55 +0000 (UTC) (envelope-from jim@netgate.com) Received: by mail-oi0-x22d.google.com with SMTP id d132so45009943oig.1 for ; Wed, 15 Jun 2016 17:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=74EQhOAhkDSWoiPhNNAgzA4HKMBvlXe5RrPZsmt/jX8=; b=B7gDtG6WpCBFWX0bsmKKRl/KZfYHeh2QGGj82KTqXutoy8QwsqRN4QcAE1c5/udigg a/9pt2iMJiB48ofhnPv/W+ATRTZGsdYfO3YvW/HJIK95icbwkMNozRzTUr5MVlSS4pnX ZE0kIVfZ0z0iQLP6P1PsTib0NBidU7We+zIUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=74EQhOAhkDSWoiPhNNAgzA4HKMBvlXe5RrPZsmt/jX8=; b=K9SevwCpmvTBnsxpWLnDF+5ZVliWAw1lEdCT+9E9AJRTs+Qa00lZDFAd00BgJF1xtI 7aVojydd6Xf1MPMFxQCk/DQ9eWBQT5cEsk4DMJeqrzZ7kCCIXgZHC5WQWhgFy9K35NU6 ntszaaDj7ivLjqXp6CpJeXkdKQFcs+jGFt7M1JkotQa18VyFo2ofQkGV6k/sfogEVHDP oY4E0hgKysVyhMpQq8tV00Q/LU34yHPg6A7GPzkiS5abjpyezBXhWvllyoummN42TOuK lmuyjQPY1XTbOGDIn9HsV/7t6T6vciESBqCsVB49h5yPLKH/fDRJLu/zNbpR+T1TlKMG RnKw== X-Gm-Message-State: ALyK8tLcWTXfICvOEa0OwJpQExESYNwpSYYEAtT7fqc6Y0B/KDrsk9+df3wd1LzeWWXIg0On X-Received: by 10.157.20.101 with SMTP id h92mr899811oth.114.1466035494996; Wed, 15 Jun 2016 17:04:54 -0700 (PDT) Received: from [172.21.0.108] (65-36-116-65.dyn.grandenetworks.net. [65.36.116.65]) by smtp.gmail.com with ESMTPSA id 3sm13643338otc.24.2016.06.15.17.04.54 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Jun 2016 17:04:54 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Netmap Checksum Offloading From: Jim Thompson In-Reply-To: Date: Wed, 15 Jun 2016 19:04:53 -0500 Cc: Andrey Yakovlev , Dominik Schoeffmann , "net@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <57601DFA.2040008@in.tum.de> <470941466032510@web23o.yandex.ru> To: Navdeep Parhar X-Mailer: Apple Mail (2.3124) 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: Thu, 16 Jun 2016 00:04:56 -0000 Luiz Otavio O Souza (loos@) developed these for igb(4) and, by = extension, em(4) for use in netmap-fwd. He=E2=80=99s just gone back to Brazil with 82599 ixgb(4) hardware. = I=E2=80=99m sure he=E2=80=99ll develop similar patches for ixgb(4) in = the near future. Chelsio is also =E2=80=9Con the list=E2=80=9D, but I figured I=E2=80=99d = speak to np@ about it first. ;-) =20 We might do ixl(4) as well. =20 Before Luiz retired to Brazil, we discussed upstreaming these to = FreeBSD. We=E2=80=99re committed to make it happen, but I doubt they = make 11. Jim > On Jun 15, 2016, at 6:50 PM, Navdeep Parhar wrote: >=20 > 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 >=20 > 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. >=20 > Regards, > Navdeep >=20 >>=20 >> --=20 >> ./andy >>=20 >>=20 >> 14.06.2016, 12:15, "Dominik Schoeffmann" : >>> Dear Netmap Developers, >>>=20 >>> 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. >>>=20 >>> 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. >>>=20 >>> Best Regards, >>> Dominik Schoeffmann >>>=20 >>> [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" >>=20 >=20 > _______________________________________________ > 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"