Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1325730ybl; Wed, 21 Aug 2019 13:39:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhAhSLBOOpRyBlPcx/b5myOS/8WrB5chA/eEogySm+TDr0hp2BwdhD3CVb8Elk+CyxjGz3 X-Received: by 2002:a63:6a81:: with SMTP id f123mr31212662pgc.348.1566419951636; Wed, 21 Aug 2019 13:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566419951; cv=none; d=google.com; s=arc-20160816; b=I4RffYUeVAUZD8D5puKjL0B3AsFSj221Uc5e98vUbU0nF6Y1THmViSgb+bajRbICgN UexeqarCLlM2W+reIjNvB4Nb/W/HMph4y8mgXdpWaTVngFNkNdcBieeRLuJIZK+XVtu2 Ak0hgkMvmzEE7YC6+JQSpFcQV0FJgK9p95DvV4Qq3qjQre+HBk12QILSzXSMnoe9Enr+ nevMVwL/U016Ofx0HCY45o+SwNgiNIcJmiIDl5RZs3k31g1EfK5H209voMUPxu9VG3gV cZQsTzGvNO8om66ss1gYixJW6CJBL57WQeTMoZYO02JODj7fOnSdjTcod4b7b89L7fZM RbwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=KBkBS4T8hAWzkfNP3gQHnK1bQ8RpJnciYJrpqq3rMf8=; b=Ed1wfF7TehfaepKiSU2sgUrWWl4pCrsuf5j8Mxy9QI1F/0NMpuPtfgHAkIhEm9qyfv uq8ObdBdNGjYOI7YhX/z34LWMu/CG16mGXH/l9zI9kvoqELPA2jbDYAGS6lbA54VOZ37 6VS1tG+7SYXSQVtA3AxdK8IzwL8VJhKVCOj0wTAVwuyXwqIQsn15SSlxEzJGP+sWLnbE C49L89ZTyCc/VLNOhUsH3mNtaoPLI9BYs8fQF/ue7zjGBLSNdjZvgNqUiE4Xk/M5ZqB9 USeoS39UF/UAeaW1n9jHWnUAf3UbTHey2CF/sxHo6OUxVIxtUVnvAwrHkk1aTcHgpo83 cJBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=NGNASHAt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si15000547pgp.507.2019.08.21.13.38.56; Wed, 21 Aug 2019 13:39:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=NGNASHAt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726330AbfHUUiG (ORCPT + 99 others); Wed, 21 Aug 2019 16:38:06 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42999 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbfHUUiF (ORCPT ); Wed, 21 Aug 2019 16:38:05 -0400 Received: by mail-qt1-f193.google.com with SMTP id t12so4731942qtp.9 for ; Wed, 21 Aug 2019 13:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=KBkBS4T8hAWzkfNP3gQHnK1bQ8RpJnciYJrpqq3rMf8=; b=NGNASHAt0aPooyP8CTgYOtb0t3kgtdGLqJ/VHFyFTEdgiE7gvblv2PrEwXcwoLyfxI ccDsl3wj3dinhEivqLgnXhnjdMvz9SYxIr9fpo4xGRV7gSPqHBr6rxbt2u8iEjVZdgpw 7AE+NjJy/4oGhxrVjvzRnstX2xG3qMkv8QBUgrw6BgXzyLRd9Q1gQlOhegN3181ZOKWQ hisqrpXmlhJPtYveRNEhyFqUIVvw2jXBRTKqiPYR1tNoVElMJ3Vgs77iGpC9g9m12/JU /PQ7v6S2UdmdJ+RxLBjBRRYTkQgr4jOXbD0hugqQzNfBaj2Xn77PLl4Vddgkb4PP6FlG yMBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=KBkBS4T8hAWzkfNP3gQHnK1bQ8RpJnciYJrpqq3rMf8=; b=KpjbY2Ab31q8HH2aGn/fixKV4mDED/1wBHzmXLnPIG8MlEz/xzAoidA8cZDL9GCMDx /D+HGH2UwbuaBhKUaLXiP7wEJ9YMFZjL0qkry19QCzUzy75FNjTlhQyma82nUo0J3iut NWNlGLVbrhoHqh++/U7hoeD1KnMbSJ7puHy1yRWSwup7U2WibzF+7tRtKoCUh47wiKgJ nFhTmaJONwkrpBi1uTE53OpSYgT06QQXOyG0qbYcnwuJSNH4Fsrn61w7UhqzbdspbFHq vEMndwQnTKf2oxD1Zh7mX5FAgkbjJvXov5Yrm6wHShCdqs3fFOvtldpgTtP49oYl5qr2 Et6w== X-Gm-Message-State: APjAAAXQIQt6yvHjQw3hmXuXQr3Qd/Voecn/hhI4ya207lW9kDvko0HI CqMWiVw2tPQzlpvWeaRD17XAnA== X-Received: by 2002:ac8:739a:: with SMTP id t26mr33575094qtp.65.1566419884839; Wed, 21 Aug 2019 13:38:04 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id e15sm9805954qtr.51.2019.08.21.13.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 13:38:04 -0700 (PDT) Date: Wed, 21 Aug 2019 13:37:57 -0700 From: Jakub Kicinski To: Thomas Bogendoerfer Cc: Jonathan Corbet , Ralf Baechle , Paul Burton , James Hogan , Dmitry Torokhov , Lee Jones , "David S. Miller" , Srinivas Kandagatla , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Jiri Slaby , Evgeniy Polyakov , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org, Jesper Dangaard Brouer Subject: Re: [PATCH v5 10/17] net: sgi: ioc3-eth: rework skb rx handling Message-ID: <20190821133757.4fb5253c@cakuba.netronome.com> In-Reply-To: <20190821162847.479c9967d4dc8026fe65fa0e@suse.de> References: <20190819163144.3478-1-tbogendoerfer@suse.de> <20190819163144.3478-11-tbogendoerfer@suse.de> <20190819165522.451f2ea2@cakuba.netronome.com> <20190821162847.479c9967d4dc8026fe65fa0e@suse.de> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Aug 2019 16:28:47 +0200, Thomas Bogendoerfer wrote: > > This looks like a DMA engine alignment requirement, more than an > > optimization. > > that true, there are two constraints for the rx buffers, start must be aligned > to 128 bytes and a buffer must not cross a 16kbyte boundary. I was already > thinking of allocating pages and chop them up. Is there a Linux API available, > which could help for implementing this ? > > I'll probably drop this patch or only change the skb_put stuff plus RX_BUF_SIZE > define. Sounds a little like frag allocator (napi_alloc_frag()/ netdev_alloc_frag()), but I'm not sure you'd have sufficient control to skip over the 16k boundary.. Perhaps others have better suggestions.