From owner-freebsd-net@freebsd.org Tue Jun 7 12:22:27 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 114DAB6EC0D for ; Tue, 7 Jun 2016 12:22:27 +0000 (UTC) (envelope-from avv314@gmail.com) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (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 C3ADD1652 for ; Tue, 7 Jun 2016 12:22:26 +0000 (UTC) (envelope-from avv314@gmail.com) Received: by mail-yw0-x234.google.com with SMTP id x189so167664254ywe.3 for ; Tue, 07 Jun 2016 05:22:26 -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=oW/JukInd3nfRvTCDB+mkW3xKbwNoZDv3m1jx6MYyBA=; b=AogjMqNA8D4q/OiR7O5WTxhzRLpAxJnG3Wbb16cn390AwOptYJr0HHfKrmQeykk0cS XJT4d4f/8wYdplClsPPOpj89fFH9YXvijtdEsts+GHe65N74+sW9Udk2chHzvTKqlNTj IrgJukhBxlmjOONxqhAvSRQs7B95d6ixh09uipoxE9P87pxQzPu32CdAubllH/rsoMAB VZHlDyJM7bmN3JYLTvxNEGA9dHpD4blXmSPcqpAn+WlHShDzBJOpuffWV2asTG4m45IL Vr9PZc1W5ivd1TWLOR8teyc/LpyumbAn1NW7jx1mX2p/5va2aH7xW9nhJrsHGwM86Jno Y+cQ== 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=oW/JukInd3nfRvTCDB+mkW3xKbwNoZDv3m1jx6MYyBA=; b=JklQUpcccnmq7i8QyB/gX0I+mVwD2tGPdemyxl+3obAT0Uj+0cH86c98xQmCpaRRw+ Vw70i2BROLOVx/L1ysmmrgwe4Y8vpoUyqji8gtYj4QUFd3u/t6LhnktIRCKSm0+LcKnA tZlItv8MaIM2BcBdgZyXkDMw3tvqZLQl4EVTnNXmpKIL517I8CAHut4Ns8qN5R3OpATY DNI9r3q+pbPs60RWIIctit0sst0xwDXIQVs0cH3+W5AIMdfg4+EJBnwIx+JdGR65e8MS gVeI5lIPhbNQ/QCrDMFtQ5wmxFWeLi1qGaaSarDF9BuJ5GlUnl8MVb7FGcHsrQ49A+6h L5Tg== X-Gm-Message-State: ALyK8tL1Rxtndpwt2zhEUm1eI0FWQ2cZMUNR9eTlFejCm+IqjhhhFgAjiLlBpzea9NJIphfmlMh+mTQ8ebMEPQ== X-Received: by 10.13.206.67 with SMTP id q64mr13532855ywd.28.1465302146067; Tue, 07 Jun 2016 05:22:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.53.1 with HTTP; Tue, 7 Jun 2016 05:22:25 -0700 (PDT) In-Reply-To: References: From: Andrew Vylegzhanin Date: Tue, 7 Jun 2016 15:22:25 +0300 Message-ID: Subject: Re: Is netmap jumbo frames broken in STABLE? To: "freebsd-net@freebsd.org" Cc: Luigi Rizzo , Ryan Stone Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Tue, 07 Jun 2016 12:22:27 -0000 Just for support Luigi assumption. I've tested on 11.0-ALPHA1 (r301204). Same situation with frame size 5166 and works _well_ with frame size 4032. -- Andrew 2016-06-07 1:47 GMT+03:00 Ryan Stone : > The use of mbuf clusters larger than a single page really doesn't work. > The problem is that over time physical memory becomes fragmented and > eventually 9K of contiguous memory can't be allocated anymore. This is w= hy > many drivers now limit themselves to page-sized clusters. > > On Mon, Jun 6, 2016 at 10:03 AM, Luigi Rizzo wrote: > >> On Mon, Jun 6, 2016 at 3:22 PM, Andrew Vylegzhanin >> wrote: >> >> > Hello all, >> > >> > >> > I have an application that uses netmap for capture jumbo frames. The >> frames >> > are fixed size and have fixed rate (for example size 5166, rate 50000 >> pps). >> > The frames are pure Ethernet, without IP header. >> > >> > >> > Everything works fine in 10.0-RELEASE, 10.1-RELEASE. >> > >> > >> > Starting from 10.3 and actual 10-STABLE I've got wrong data from netma= p >> > ring. It's looks like packet data broke and packet split on two parts >> 4092 >> > and 1070 bytes, where original size was 5166. >> > >> > A code ring precessing is based on macros from netmap_user.h : >> > >> > >> > n =3D nm_ring_space(ring); >> > >> > for (rx =3D 0; rx < limit; rx++) { >> > >> > struct netmap_slot *slot =3D &ring->slot[cur]; >> > >> > char *p =3D NETMAP_BUF(ring, slot->buf_idx); >> > >> > process_payload(p, slot->len, datapx); >> > >> > cur =3D nm_ring_next(ring, cur); >> > >> > } >> > >> > ring->head =3D ring->cur =3D cur; >> > >> > >> > Here is netmap sysctl's: >> > >> > dev.netmap.buf_num=3D81920 >> > >> > dev.netmap.ring_size=3D73728 >> > >> > dev.netmap.buf_size=3D5248 >> > >> > >> > Hardware is Dell R720 (2x E5-2643 v2) with four Intel Ethernet 10G 2P >> X520 >> > Adapter. I use only one hardware queue per interface. >> > >> > >> > BTW, may be a new version of Intel ixgbe driver (3.1.13-k) is a reason= ? >> > >> > >> =E2=80=8BHi, >> yes I suspect the problem may be in the new ixgbe driver, >> probably it programs the hardware to limit buffer sizes to 4k >> even when large MTUs are in use, >> so the receiver will split >> the incoming frame in two buffers, while netmap is expecting >> only one. >> I suggest to have a look at the ioctl handler (in the driver) >> that handles the MTU setting and compare with the code >> in the previous driver. >> >> cheers >> luigi >> >> >> > Does it make sense to try with 11-CURRENT? >> > >> > >> > Thank you in advance. >> > >> > >> > -- >> > >> > Andrew >> > _______________________________________________ >> > 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" >> > >> >> >> >> -- >> -----------------------------------------+------------------------------= - >> Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione >> http://www.iet.unipi.it/~luigi/ . Universita` di Pisa >> TEL +39-050-2217533 . via Diotisalvi 2 >> Mobile +39-338-6809875 . 56122 PISA (Italy) >> -----------------------------------------+------------------------------= - >> _______________________________________________ >> 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" >> > >