From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 677AB7D910 for ; Wed, 21 Aug 2019 20:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729184AbfHUUiG (ORCPT ); Wed, 21 Aug 2019 16:38:06 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:44724 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728687AbfHUUiF (ORCPT ); Wed, 21 Aug 2019 16:38:05 -0400 Received: by mail-qt1-f196.google.com with SMTP id 44so4713768qtg.11 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=FsjKOOmw9GoeOYYk30tu0DxcVdBPknKxlireHJEU9UXdhn6WzIeJDWf+pDHdbe41H2 os352zZHjiqOYVDSihDsTSocv60flt+3PW+JWkPkTm7Pb/Z1Q6uqjpO+dv/X9zkqPc47 JT5QolDHd4geAHDTdZHNKb98OpSAl2/7RHxsKGvCfTegm7mfCDclir7aVPoZ2uXXDuKR O1cy2Db3XfWj7tRzcllGDUVgS/gFxWIfk3pEmuZiqtnfbvGoiEnY5Q+4lOaQonHyApC9 RYXuLXptXwm937VZxLC1pw1TnoV6IJ9taxjbD3NMiQ5pKF9vtjGcwhhTQn3/hXSnm5aQ scCQ== X-Gm-Message-State: APjAAAUIBjp/G1eMsKTlzlj2HTNOgkbDcfe6stBkDNcTtYzIpTV+MpYe b4snhrEq3l12MLbFt8/Z2Yx0iw== X-Google-Smtp-Source: APXvYqwe9lERHFY9Jt1Z7JNSvqvEYMbh8DR6XD7zaGMsKCtoXCi/P5AunlMu5Ut2t+UrTpcRunsngQ== 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-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@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.