From: Andrew Lunn <andrew@lunn.ch>
To: Esben Haabendal <esben@geanix.com>
Cc: netdev@vger.kernel.org, YueHaibing <yuehaibing@huawei.com>,
Michal Simek <michal.simek@xilinx.com>,
linux-kernel@vger.kernel.org, Yang Wei <yang.wei9@zte.com.cn>,
Luis Chamberlain <mcgrof@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 08/12] net: ll_temac: Fix iommu/swiotlb leak
Date: Fri, 26 Apr 2019 16:21:03 +0200 [thread overview]
Message-ID: <20190426142103.GI14432@lunn.ch> (raw)
In-Reply-To: <20190426073231.4008-9-esben@geanix.com>
On Fri, Apr 26, 2019 at 09:32:27AM +0200, Esben Haabendal wrote:
> Unmap the actual buffer length, not the amount of data received.
Hi Esben
The patch Subject does not seem to match the content?
Also, there can be performance advantages of just unmapping the
received length. The unmap operation does a cache invalidate, which
can be expensive. Consider the effort of unmapping a 64 byte ACK vs 9K
jumbo frame?
Andrew
> Signed-off-by: Esben Haabendal <esben@geanix.com>
> ---
> drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
> index 309f149..56d8077 100644
> --- a/drivers/net/ethernet/xilinx/ll_temac_main.c
> +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
> @@ -821,7 +821,7 @@ static void ll_temac_recv(struct net_device *ndev)
> length = be32_to_cpu(cur_p->app4) & 0x3FFF;
>
> dma_unmap_single(ndev->dev.parent, be32_to_cpu(cur_p->phys),
> - length, DMA_FROM_DEVICE);
> + XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE);
>
> skb_put(skb, length);
> skb->protocol = eth_type_trans(skb, ndev);
> --
> 2.4.11
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-26 14:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190426073231.4008-1-esben@geanix.com>
[not found] ` <20190426073231.4008-3-esben@geanix.com>
2019-04-26 13:58 ` [PATCH 02/12] net: ll_temac: Extend support to non-device-tree platforms Andrew Lunn
[not found] ` <20190426073231.4008-11-esben@geanix.com>
2019-04-26 14:01 ` [PATCH 10/12] net: ll_temac: Replace bad usage of msleep() with usleep_range() Andrew Lunn
[not found] ` <20190426073231.4008-7-esben@geanix.com>
2019-04-26 14:05 ` [PATCH 06/12] net: ll_temac: Allow use on x86 platforms Andrew Lunn
[not found] ` <20190426073231.4008-8-esben@geanix.com>
2019-04-26 14:14 ` [PATCH 07/12] net: ll_temac: Support indirect_mutex share within TEMAC IP Andrew Lunn
[not found] ` <20190426073231.4008-9-esben@geanix.com>
2019-04-26 14:21 ` Andrew Lunn [this message]
2019-04-26 14:43 ` [PATCH 08/12] net: ll_temac: Fix iommu/swiotlb leak Robin Murphy
2019-04-26 15:37 ` Andrew Lunn
[not found] ` <20190426073231.4008-4-esben@geanix.com>
2019-04-26 18:40 ` [PATCH 03/12] net: ll_temac: Fix support for 64-bit platforms Jakub Kicinski
2019-04-26 20:59 ` Andrew Lunn
2019-04-26 21:08 ` Jakub Kicinski
2019-04-26 22:02 ` Andrew Lunn
2019-04-26 22:30 ` Jakub Kicinski
[not found] ` <20190429083422.4356-1-esben@geanix.com>
[not found] ` <20190429083422.4356-4-esben@geanix.com>
2019-04-29 22:06 ` Andrew Lunn
[not found] ` <20190429083422.4356-7-esben@geanix.com>
2019-04-29 22:06 ` [PATCH 06/12] net: ll_temac: Allow use on x86 platforms Andrew Lunn
[not found] ` <20190429083422.4356-8-esben@geanix.com>
2019-04-29 22:12 ` [PATCH 07/12] net: ll_temac: Support indirect_mutex share within TEMAC IP Andrew Lunn
[not found] ` <20190430071759.2481-1-esben@geanix.com>
[not found] ` <20190430071759.2481-8-esben@geanix.com>
2019-04-30 16:59 ` [PATCH v3 " Andrew Lunn
[not found] ` <20190430071759.2481-9-esben@geanix.com>
2019-04-30 17:00 ` [PATCH v3 08/12] net: ll_temac: Fix iommu/swiotlb leak Andrew Lunn
2019-05-01 18:33 ` [PATCH v3 00/12] net: ll_temac: x86_64 support David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190426142103.GI14432@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=esben@geanix.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=yang.wei9@zte.com.cn \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).