Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9384701ybi; Wed, 24 Jul 2019 03:11:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTJnLexTcs3DNzifnBlY0Ym8vfrsapthAYtJjgKt7uHkVJdTdXsoWgvzx6RGrazBGo4HWM X-Received: by 2002:a17:902:b612:: with SMTP id b18mr58595765pls.8.1563963074149; Wed, 24 Jul 2019 03:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563963074; cv=none; d=google.com; s=arc-20160816; b=NkfPFEHxs+q9+UfGICemrf0q3Ox/YeWRc+NvIk8M5AIGpmJoJfRecCPTe9QNPlHgrY Rvo55ioJoZ8J4dgCXOYmQUKqPVFFpxVzzfj2yGwkmorygAR7AG1KVQ9qlY4IhAl3w+YB GS5JZDl1QVTVnUpnWs4OViiH/Xa2yOGpHv6duPJJZSr0TYwW5nquqzXX1TCkTK5A9hYN Ocq+obyKlGWZ91GeYHs78GS+GpPPvwM/u94UCJid2z/J0c/Gw5vcw4dwWRxw2riudJmw Iq+V+HRkWK9/eBpijsZVI1RZ3bj85oNJlTUvVq65ZIUOOY/cGc3eHCEoGRmDPI3jrv1z qblw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lR8Ju9su/CBU1j0HeTY4zNhljAae1dIFpfV6iNZG33M=; b=EaXz4fOxByQSx7qxpcAifiySSljFgwxrCYgRft8OCwA0OLNfVlgrxOfT9R0iUcdtkF 6OfZJrrzPx4fVYLbRbkMD1IDgFFoLH88B7DAEt0f3nkg4CuRMdtQxLiTawsGvSfZfiHS suPQwy842im9wY7Aip+KcFX9WSQ0ialXWaDrvpnp82+gXKKGtVk/vHAU8a8pZR/wCTbE gR5W6ryjCvn3wOu/myLfwREzwYVon1vEjxK5pOt/d8RUoM9cZzqoWdgg1khO2sjpq8Yk vgghHeGQPqUb+4YKPvgEEfHXBmxFzQdWZPy71SwKvMqmTBO/D07ht/HwRYWtFMy78Yw2 JJHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rt/AaXnh"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si13310479pgg.533.2019.07.24.03.10.59; Wed, 24 Jul 2019 03:11:14 -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=@linaro.org header.s=google header.b="rt/AaXnh"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbfGXJxQ (ORCPT + 99 others); Wed, 24 Jul 2019 05:53:16 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:33104 "EHLO mail-wr1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbfGXJxP (ORCPT ); Wed, 24 Jul 2019 05:53:15 -0400 Received: by mail-wr1-f41.google.com with SMTP id n9so46325861wru.0 for ; Wed, 24 Jul 2019 02:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lR8Ju9su/CBU1j0HeTY4zNhljAae1dIFpfV6iNZG33M=; b=rt/AaXnhKheL0xFkzKLunvj8+9MwYEXt7S1oWeRDReGARnsopOBP3yinZcK7tsLHqv qFxSb0f+FgWqC2SiOJ+Y4Q+N2wnCIxG//pk1XmsRAU8Ks4FKHEcjiDkdRA/Vqy8Tpg+3 IrCkPu96jz7A5YWxYU96ngNunz6QAhNjF4guFqYYXuxMy4oeAms2bw1+kIMcTn0QoPLr 1JWbKZ0PhszWxXesACC+DBTOOgO2HEByQt11XNPWWviacFtZESCOJUwMHq+yX7lh5fV+ icCJzRZV90ddlGcEZzwNZpikwm2MDlWl0espu3AlxlUJeG/9K338Yp4WXLlVGzQSyXSH MT1A== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lR8Ju9su/CBU1j0HeTY4zNhljAae1dIFpfV6iNZG33M=; b=Ul7BJIrBiHJn0TkJ/4ad5l9dHFMUf0jc/2BDGEuwC9mO4JvzrTrMKiHnHxRrpC7wZM EJha1Qjc9p4GjPlAvh7U1bP5mTy+EjdpRBc3T3dCgpwNQTt8QFhiDOLw/J1B/iPwH8RT WSnQYlBmIl9aYM6libWFjjMeGR8d99aztcmBoxHBnS3p8qGyz/LiyRHHvw4sHU4Jtaop jL5O0+fEEI9IuU6Y7fNb9aAQicMj5WuNrUZAYrOCp4ZlRDyB5yUQ7Pzv5Wdpe+e29P8/ Jn6rZGbF90l1d9JlwBXs3VysVUEgSKlmaFqYBzyMnQS4Ohrn+3euP2wew5x+x42yE1MC 6Eyw== X-Gm-Message-State: APjAAAUnqNTyAjb4e16GpWDSltmBfozHylm8fqnPk+Z051AtcC3baxod BxtfVhDwzA7Cd+ttGUVhQPuj9A== X-Received: by 2002:a5d:6190:: with SMTP id j16mr76465400wru.49.1563961994279; Wed, 24 Jul 2019 02:53:14 -0700 (PDT) Received: from apalos (athedsl-373703.home.otenet.gr. [79.131.11.197]) by smtp.gmail.com with ESMTPSA id p18sm45611466wrm.16.2019.07.24.02.53.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 02:53:13 -0700 (PDT) Date: Wed, 24 Jul 2019 12:53:10 +0300 From: Ilias Apalodimas To: Jose Abreu Cc: David Miller , "jonathanh@nvidia.com" , "robin.murphy@arm.com" , "lists@bofh.nu" , "Joao.Pinto@synopsys.com" , "alexandre.torgue@st.com" , "maxime.ripard@bootlin.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "wens@csie.org" , "mcoquelin.stm32@gmail.com" , "linux-tegra@vger.kernel.org" , "peppe.cavallaro@st.com" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH net-next 3/3] net: stmmac: Introducing support for Page Pool Message-ID: <20190724095310.GA12991@apalos> References: <6c769226-bdd9-6fe0-b96b-5a0d800fed24@arm.com> <8756d681-e167-fe4a-c6f0-47ae2dcbb100@nvidia.com> <20190723.115112.1824255524103179323.davem@davemloft.net> <20190724085427.GA10736@apalos> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jose, > From: Ilias Apalodimas > Date: Jul/24/2019, 09:54:27 (UTC+00:00) > > > Hi David, > > > > > From: Jon Hunter > > > Date: Tue, 23 Jul 2019 13:09:00 +0100 > > > > > > > Setting "iommu.passthrough=1" works for me. However, I am not sure where > > > > to go from here, so any ideas you have would be great. > > > > > > Then definitely we are accessing outside of a valid IOMMU mapping due > > > to the page pool support changes. > > > > Yes. On the netsec driver i did test with and without SMMU to make sure i am not > > breaking anything. > > Since we map the whole page on the API i think some offset on the driver causes > > that. In any case i'll have another look on page_pool to make sure we are not > > missing anything. > > Ilias, can it be due to this: > > stmmac_main.c: > pp_params.order = DIV_ROUND_UP(priv->dma_buf_sz, PAGE_SIZE); > > page_pool.c: > dma = dma_map_page_attrs(pool->p.dev, page, 0, > (PAGE_SIZE << pool->p.order), > pool->p.dma_dir, DMA_ATTR_SKIP_CPU_SYNC); > > "order", will be at least 1 and then mapping the page can cause overlap > ? well the API is calling the map with the correct page, page offset (0) and size right? I don't see any overlapping here. Aren't we mapping what we allocate? Why do you need higher order pages? Jumbo frames? Can we do a quick test with the order being 0? Thanks, /Ilias