From owner-freebsd-net@freebsd.org Sat Mar 17 07:19:54 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFE2BF4C912 for ; Sat, 17 Mar 2018 07:19:53 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-qk0-x22d.google.com (mail-qk0-x22d.google.com [IPv6:2607:f8b0:400d:c09::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 95FEB6BC29 for ; Sat, 17 Mar 2018 07:19:53 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-qk0-x22d.google.com with SMTP id s188so13456224qkb.2 for ; Sat, 17 Mar 2018 00:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DK0mwP2w4Rh6sd2r6n35sHBgAHTR620ssauFunbWB8M=; b=rOFhRgJ/LpOXgsKpU0Yi19zutQnQWQUrhnMS7H1prcuX7Fz8HIAobVeh2Pc3doG/Yc Uf4aKuYKJkhPhtJ8hEFufjPbF0gbuoeAQ1E0lHHe2a0eC9YIicPJL3f9dJy+2ywFxxmN dLoE/5NQgVS/ybkpVIXl+r3V21ObyYSVcz/6hvYKc4NooHriqbnK2W2+evmHzi5QhE2q lSoUBVqGmUBmalnuCcVx6w/D6feu0tBE4bC/CWqvzWJGR+OlLBwqo0nKoXlX7ZFh6dw1 A/SD1PN2CRAPR3EieDgttzsiyYapyQOszDhuu/DeX9+ffXX8L0Ma8hQ3NgyXMVXTbrpa Xw6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DK0mwP2w4Rh6sd2r6n35sHBgAHTR620ssauFunbWB8M=; b=X69fxqEfCmiW13mMp1FZO0fCBQR6pQrWblHRK38MS8n7XtRM0qtBw2riAzmrjWYpGA Mqd4rvHWx7fM/BE2PQQtk4zOqUemgeE0zIUnOBuMividGtZwUkUF/rhWMEP/6kemIb6k pw+Pi6wcdyQT3rV/0565t6VEw39begFHm5xwaUYAWhgoWidmqBqTWDN3cZzAQ3vmApP5 5I63B5sFQnE1QnhrgXs34ieXZOhNE1A3/NiWP4sju7ck9uMvikFKl7oGdpfL8sgC7Ch4 7t30ZpgaSo2dhgM9ARpRkK+jZVpEBszTjwUGXbxPDh0h3NkN+mGbqa2J4S9mIv1YRw1y 0njQ== X-Gm-Message-State: AElRT7GmPV4FLjR7kPt6vtJ3X8WlLvJOxn3IL6Yhr5rahKQeA1ZTb/lK KiPFTy5Mat0Z08Gt2PdEfcMFuBUV2h9afLsERxA= X-Google-Smtp-Source: AG47ELtEujH7I2zGK1OtB9vuwCQ3nNsFAEATZbEFp5HroS0hq7kgWr9VgeKD1T6vUbBB+Y6zg2r64cSmZJGHCE1Xpzk= X-Received: by 10.55.77.67 with SMTP id a64mr6986952qkb.249.1521271192468; Sat, 17 Mar 2018 00:19:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.195.204 with HTTP; Sat, 17 Mar 2018 00:19:52 -0700 (PDT) In-Reply-To: <5AAC4A96.1040107@cox.net> References: <5AAC49BE.3030508@cox.net> <5AAC4A96.1040107@cox.net> From: Vincenzo Maffione Date: Sat, 17 Mar 2018 08:19:52 +0100 Message-ID: Subject: Re: netmap ixgbevf mtu To: Joe Buehler Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 07:19:54 -0000 First, please make sure to use the latest netmap from github. Yes, drivers in general use 2K or 4K RX buffers regardless of the MTU or netmap buffer size. To receive a frame larger than the RX buffer size you need multiple netmap slots (as multiple descriptors are used by the hardware), looking at the NS_MOREFRAG flag. See the example code in utils/functional.c::rx_one(). Also TX may have per-slot limitations (e.g. due to the size of the NIC TX fifo), but this is usually > 9K, so using a single descriptor per packet should always be ok. However, you can also use multiple slots on the TX side (see utils/functional.c::tx_one()). You need to set the buf_size parameter to the RX buffer size. Currently we miss a mechanism for netmap to get the actual RX buffer size from the NIC driver, so we assume 4K. We need to check that buf_size is >= RX buffer size. This mechanism will be added soon. Cheers, Vincenzo 2018-03-16 23:52 GMT+01:00 Joe Buehler : > Sorry, I should have added, this is LINUX if it matters. > > Joe Buehler wrote: > > I am having difficulties with netmap over top of ixgbevf when attempting > to use a large MTU (say 9000 bytes). > > > > Does the ixgbevf driver use 2048 byte buffers for RX regardless of the > MTU or netmap buffer size? > > > > I can send large frames just fine but inbound frames are passed via > netmap as 2048 bytes max. It is possible that netmap is passing frames in > multiple pieces I suppose, I haven't checked that yet -- my code is looking > at the frame headers only at the moment so would toss trailing pieces. > > > > Joe Buehler > > > > > > _______________________________________________ > 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" > -- Vincenzo Maffione