From owner-freebsd-net@freebsd.org Tue Oct 11 01:17:57 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 A0300C0B31E for ; Tue, 11 Oct 2016 01:17:57 +0000 (UTC) (envelope-from lohithbsd@gmail.com) Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) (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 737EB13B; Tue, 11 Oct 2016 01:17:57 +0000 (UTC) (envelope-from lohithbsd@gmail.com) Received: by mail-pa0-x241.google.com with SMTP id r9so469112paz.1; Mon, 10 Oct 2016 18:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:message-id:date:to :mime-version; bh=hx5s9YP/uYI50ML/6qQQ6BrZe0vRWD35h1rThhgEdUA=; b=dtXRCOeY8qNke8cCmUKarSca2ZHn0bOgJhGHfztodNzClY22IiN/T8eETlaMahSKKw hbghVhtP6CGLGTxG7iraQORnetJmPN9ouKgXpa8wg7e/rcgcK+gdU3EJy6GxyUtMGLyg Bwy9FAM1a3yDVfKrO0PwfF902Fnb1HGM0YWAUA18MnVwPSbt/RCpKCPYESNvHmAN7NTe 2BliidIJlyQDJ5EYqlM/3QeYlW9sFpehB5bRrQZe9mdI0ncBfjr0Ezo1mP744PMQAuEN FcilmSTHhTTqGHGpOuarJErL/TWs0vCCU1lQ1lO6bhxIo6Ub7tW3nJ9Q0Hj1kV9t8Rpe 7aTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=hx5s9YP/uYI50ML/6qQQ6BrZe0vRWD35h1rThhgEdUA=; b=VtApJMup+USefyGvDM/lcFy/jNvyJpBku7c6NzDhEMh0H2qgaGOvGg583cdziQ5a1m Kbjjg7gWuA4yuNhcsSFwN/Uh4xdp/7yrsPerglj02uXwe1OcLAl7JsR1CZdQnywtWP88 k575yS5PkgEgLZ0vZBFsR/M3CpZzJ7K2Gl8f4yxqWTHFeBXoTQXxpZ6+WNRSJdFAb4j7 c2kcgyflZtQkPypzsxERE56BGaotpOdFoHSnzVBfopx0y3o3rcko1GmUhhlun18A1TfE tG/fOMB7ENRV6nB7TR98ChjJ5sxOlMgxF3uibxdDGpN1q4TmFNMhci6ZQwAsABuBsVK/ BGKw== X-Gm-Message-State: AA6/9RlDhHmRodwMMd7RqDcHxCBdeCTZEUUr1GaaJuKiblucSDC5qG354OB7ZB1W1dGi+w== X-Received: by 10.66.89.4 with SMTP id bk4mr2121781pab.22.1476148676786; Mon, 10 Oct 2016 18:17:56 -0700 (PDT) Received: from [172.29.109.159] ([66.129.239.11]) by smtp.gmail.com with ESMTPSA id i8sm671789paw.25.2016.10.10.18.17.55 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Oct 2016 18:17:56 -0700 (PDT) From: Lohith Bellad Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Problem with Virtio using JUMBO frame config. Message-Id: Date: Mon, 10 Oct 2016 18:17:54 -0700 To: freebsd-net@freebsd.org, bryanv@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 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, 11 Oct 2016 01:17:57 -0000 Hi All, I want to use Virtio with JUMBO frame support without TSOv4, TSOv6 and = GSO. Looks like without TSOv4, TSOv6 and GSO. The max number of segments = allowed for scatter gather operations is 4.=20 But, if TSOv4, TSOv6 or GSO feature is enabled, max segments for scatter = gather is set to 64. sys/dev/virtio/network/if_vtnet.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D if (virtio_with_feature(dev, VIRTIO_NET_F_GSO) || virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO4) || virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO6)) sc->vtnet_tx_nsegs =3D VTNET_MAX_TX_SEGS; <=3D=3D 64 else sc->vtnet_tx_nsegs =3D VTNET_MIN_TX_SEGS; <=3D=3D 4 In my case since I don=E2=80=99t have TSOv4, TSOv6 or GSO enabled, so = max segments is 4. And if I try to send PING echo with size 18000 or more (results into 3 = frames), driver is failing to send it. PING with size less than 15000 = works always. Using dtrace and vtnet sysctls found that, in my case scatter gather = segments are more than 4 and thats why EFBIG error is returned by = sglist_append_mbuf(). Also, vtnet defrag failed stats are increasing, dev.vtnet.4.tx_defragged: 111443 dev.vtnet.4.tx_defrag_failed: 7917 These changes were done in following commit https://svnweb.freebsd.org/base?view=3Drevision&revision=3D261394 So, is JUMBO frame support allowed only with TSO support or am I missing = something. Any help is appreciated. Thanks, Lohith