From owner-freebsd-net@freebsd.org Fri Jun 17 01:40:28 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 18C9CA471E2 for ; Fri, 17 Jun 2016 01:40:28 +0000 (UTC) (envelope-from avv314@gmail.com) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::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 C729D196F for ; Fri, 17 Jun 2016 01:40:27 +0000 (UTC) (envelope-from avv314@gmail.com) Received: by mail-yw0-x22d.google.com with SMTP id v137so59514611ywa.3 for ; Thu, 16 Jun 2016 18:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ubzQLIjagyBVGGph5oTAmcaCu2XATcM94icQmTtNr3s=; b=EBYgySYFggXPltYZEy1A83S9xhNifzrALFDGdL9u1dTlIRwthEiNVfJnCR9mqtCiR+ gExAun5o/oAfNwUwCH1ckV3eBlybRp5GYy6HUzWmTUxCB5H6gUeBdPSkSF6gZjHkTlUJ UuBv7C4iAeO3/ldFW85dUt2zp81eFBNwgCPtzcBytnu11S5kzwYY71tB6KsHIDJckXY5 XA/6EwVUY+cJmZ81UunyiopCKCzdCs5eIcsrmyjxtkbZMFRzwFRLrnI/NZTpiGRs9O5I dCU4BEe3ucoACMd83iN+rsBMSIa1iVqnyNq1rqkGv7OSEGQ5bD4TWhafTteBrPgaau7Y zl1A== 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:from:date :message-id:subject:to:cc; bh=ubzQLIjagyBVGGph5oTAmcaCu2XATcM94icQmTtNr3s=; b=BpT+rVRS/g6fi+Bj5H1/H0UWilo+MOOyJs8fhIvYkykYM/s3GHzp5HPdyDQeVupzjj RDiZcSkUGoq0pOYpnUcW0E+x+etoWSL8gHzAD/GNafxouxr/35ancGA+NwlQf9howLSI zsOZd6fSmILUfJ9F7a0a559/aZDoVXdQd4nqWVmcAolWKufQ3N0uo+hIkG7EyYEenOqm HQ3CARBmP4ZrscQ+8Lw4XaWEdZFs88RkDZh1ToGDtujgm8dd9IKVv6tWjHgibw6LwSDV nKoRm9p8c39zDfcmAxaCqMhWNW3eAPhvHREPmgn4fUeOEJb6MxBmh/1gP7C65nNJBIs/ bphQ== X-Gm-Message-State: ALyK8tIUiKuVJMB6l0QczKfDAXM1zm5S3mHyasU51rRXs22D/si3iv+pn6l4fBTEqs+7idPZOepfVL7j/5NL7A== X-Received: by 10.13.204.22 with SMTP id o22mr5019201ywd.203.1466127627051; Thu, 16 Jun 2016 18:40:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.212.195 with HTTP; Thu, 16 Jun 2016 18:40:26 -0700 (PDT) In-Reply-To: <1502708678.10983095.1465385308094.JavaMail.zimbra@ulg.ac.be> References: <5756C17D.1090409@yandex.ru> <1502708678.10983095.1465385308094.JavaMail.zimbra@ulg.ac.be> From: Andrew Vylegzhanin Date: Fri, 17 Jun 2016 04:40:26 +0300 Message-ID: Subject: Re: Is netmap jumbo frames broken in STABLE? To: freebsd-net@freebsd.org Cc: Luigi Rizzo , "Andrey V. Elsukov" , Ryan Stone , tom.barbette@ulg.ac.be Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: Fri, 17 Jun 2016 01:40:28 -0000 About week ago I've patched if_ix.c, just returned back code fragment of max_frame_size determination from 2.8.3 version of ixgbe driver: /* ** Determine the correct mbuf pool ** for doing jumbo frames */ if (adapter->max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; else if (adapter->max_frame_size <= 4096) adapter->rx_mbuf_sz = MJUMPAGESIZE; else if (adapter->max_frame_size <= 9216) adapter->rx_mbuf_sz = MJUM9BYTES; else adapter->rx_mbuf_sz = MJUM16BYTES; After week of heavy testing everything is ok. This solution is acceptable for me for now, because I use eight interfaces in netmap mode only. In future I want to make support something like dev.ix.N.jumbo_mbuf_enable variable, since one of ix interfaces will be used for generic kernel stack with jumbo frame support. Doing with fragmented packet in netmap ring is also possible way, but need more user cpu cycles for processing, I guess. In any case I can test it when this patch will be merged for netmap. -- Andrew 2016-06-08 14:28 GMT+03:00 : > > Support for fragmented packets with ixgbe was recently added on the linux version of Netmap : > > https://github.com/luigirizzo/netmap/commit/fc1e77560a8a8ea93cc3594de5fae94334debcd3 > > I think the change for freebsd would be quite the same looking at https://github.com/freebsd/freebsd/blob/master/sys/dev/netmap/ixgbe_netmap.h#L396 > > After that, your userspace application simply have to check for the NS_MOREFRAG flag in the receive ring, and if it's set he knows the end of the packet will follow in the next buf. > > Tom