From owner-freebsd-net@freebsd.org Mon Jun 6 14:03:43 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 6810BB6BE88 for ; Mon, 6 Jun 2016 14:03:43 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (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 D01F8116B for ; Mon, 6 Jun 2016 14:03:42 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-lf0-x22b.google.com with SMTP id b73so95235380lfb.3 for ; Mon, 06 Jun 2016 07:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yeOJCc1YMDRjiEVwJrFL4FWgYg/DwohFKk6rHXRxWag=; b=oBf8r/EFxhKAnaMDDYhv6MPCCyLmRmzhtDz7OP98HkNrSrLdeVHnlGLxNqZETGj0c6 Hesu5Z5zBIu3vh1X1K5xyDoCvqVN/BSLakFA0wpNcEGSWWMEk9MorIBYwzKPIOUwtfl/ rLH8UtSIfwsIsHINdOxUcUqU8nleACt7GyaBWHLl5EtoeHqWom7K2nyeC8+/A6s4tmvD OnZBOD3dh86q84HbsSPZP6iiFo9aeMyT+tsyiQE4rQQ+9qY5lIxwP2Lic7KOrWmb6PeH Nf5MfLaY/NW3Z/p70My0GN44iVKFX2aTY+8llKlqjiD0QX4YrIcNNicroKpwukM43cYx CHcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yeOJCc1YMDRjiEVwJrFL4FWgYg/DwohFKk6rHXRxWag=; b=AsZUE9KlNx/44OWs2FCeDMvK/+KYo3Ql+3T5YoFX4jo+DYFJ2vngW1dD5j+Dd4CDg3 qv3JAZNeph76xQm16Wqv0eoh695rNWovfqKC7hAFWGaevqXJjQZNU0IR20Sdw/flshS8 8NmMRv9k328LvRTr0nvrG450gPAtevEeuSXV67drc21SUtzGY9VG7Mhn17AOtE4D1r05 tZpPFecmrj953DK5V3Y83afXCX/fyPgeP4r1nT6FEoaXtsJXzBlf1/IWUjIotXMaZyvb HPBmx7oxxjcmwzf3JIjS+L7MrTRKbP26BReuE/UgrudtXeheAPGj2XIJ9540M8Qx1Ch/ QQIQ== X-Gm-Message-State: ALyK8tIwsQICT9Zt1EltflvMmf8OsJUmidPyM4HJ7GwlH4Kmkyzdp/wb4KAn/bEZ4tjMimV2qYuAQ8n7xMeE4w== X-Received: by 10.25.167.6 with SMTP id q6mr1166258lfe.173.1465221820930; Mon, 06 Jun 2016 07:03:40 -0700 (PDT) MIME-Version: 1.0 Sender: rizzo.unipi@gmail.com Received: by 10.114.182.76 with HTTP; Mon, 6 Jun 2016 07:03:40 -0700 (PDT) In-Reply-To: References: From: Luigi Rizzo Date: Mon, 6 Jun 2016 16:03:40 +0200 X-Google-Sender-Auth: 8q_crulrKNwKT7zhfQDGBbdYwCc Message-ID: Subject: Re: Is netmap jumbo frames broken in STABLE? To: Andrew Vylegzhanin Cc: "freebsd-net@freebsd.org" 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: Mon, 06 Jun 2016 14:03:43 -0000 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 fram= es > 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 netmap > ring. It's looks like packet data broke and packet split on two parts 409= 2 > 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 X52= 0 > 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" > --=20 -----------------------------------------+------------------------------- 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) -----------------------------------------+-------------------------------