From owner-freebsd-net@freebsd.org Thu Apr 26 08:03:11 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 BB7CFFA5296 for ; Thu, 26 Apr 2018 08:03:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 586517C6E8 for ; Thu, 26 Apr 2018 08:03:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 12EC1FA5293; Thu, 26 Apr 2018 08:03:11 +0000 (UTC) Delivered-To: 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 F30B6FA5291; Thu, 26 Apr 2018 08:03:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65A757C6C5; Thu, 26 Apr 2018 08:03:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w3Q82xWi023845 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 26 Apr 2018 11:03:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w3Q82xWi023845 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w3Q82w9l023844; Thu, 26 Apr 2018 11:02:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 26 Apr 2018 11:02:58 +0300 From: Konstantin Belousov To: Ryan Stone Cc: FreeBSD Current , menyy@mellanox.com, FreeBSD Net Subject: Re: mlx5(4) jumbo receive Message-ID: <20180426080258.GI6887@kib.kiev.ua> References: <20180424085553.GA6887@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Thu, 26 Apr 2018 08:03:11 -0000 On Wed, Apr 25, 2018 at 04:04:13PM -0400, Ryan Stone wrote: > On Tue, Apr 24, 2018 at 4:55 AM, Konstantin Belousov > wrote: > > +#ifndef MLX5E_MAX_RX_BYTES > > +#define MLX5E_MAX_RX_BYTES MCLBYTES > > +#endif > > Why do you use a 2KB buffer rather than a PAGE_SIZE'd buffer? > MJUMPAGESIZE should offer significantly better performance for jumbo > frames without increasing the risk of memory fragmentation. Part of the answer is that the patch was not written in one go (even not by one person), but evolved, and this is how it shaped. Another part is that indeed, as Rick stated, I am not sure about mixing the different sizes for mbuf allocator. This might be more FUD than factual-based considerations, but still. I believe that the patch as is provides the important improvements. If developing mlx4(4) change of the same nature, I will probably take this into the exp stage from the beginning. For mlx5(4), I think that the patch should be applied as is, then I might experiment with PAGE_SIZE as the later step.