From: David Miller <davem@davemloft.net>
To: claudiu.manoil@freescale.com
Cc: netdev@vger.kernel.org, haokexin@gmail.com
Subject: Re: [PATCH net] gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
Date: Wed, 10 Dec 2014 13:13:47 -0500 (EST) [thread overview]
Message-ID: <20141210.131347.2165044584202384761.davem@davemloft.net> (raw)
In-Reply-To: <1418135075-17349-1-git-send-email-claudiu.manoil@freescale.com>
From: Claudiu Manoil <claudiu.manoil@freescale.com>
Date: Tue, 9 Dec 2014 16:24:35 +0200
> From: Kevin Hao <haokexin@gmail.com>
>
> We need to use dma_mapping_error() to check the dma address returned
> by dma_map_single/page(). Otherwise we would get warning like this:
...
> For TX, we need to unmap the pages which has already been mapped and
> free the skb before return. For RX, just let the rxbdp as unempty.
> We can retry to initialize it to empty in next round.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
The RX behavior needs to be adjusted.
You should never leave holes in the RX ring, ever.
Instead, try allocating the new RX skb first, and only if
you are successful should you pass up the original SKB. If
it fails, then reuse the original SKB in the RX ring.
next prev parent reply other threads:[~2014-12-10 18:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 10:37 [PATCH 0/2] DMA API usage fixes in gianfar Arseny Solokha
2014-12-05 10:37 ` [PATCH 1/2] gianfar: handle map error in gfar_new_rxbdp() Arseny Solokha
2014-12-09 20:37 ` David Miller
2014-12-05 10:37 ` [PATCH 2/2] gianfar: handle map error in gfar_start_xmit() Arseny Solokha
2014-12-05 12:42 ` Denis Kirjanov
2014-12-05 14:51 ` Claudiu Manoil
2014-12-09 20:39 ` David Miller
2014-12-10 11:03 ` David Laight
2014-12-05 14:48 ` [PATCH 0/2] DMA API usage fixes in gianfar Claudiu Manoil
2014-12-09 14:24 ` [PATCH net] gianfar: Fix dma check map error when DMA_API_DEBUG is enabled Claudiu Manoil
2014-12-10 18:13 ` David Miller [this message]
2014-12-11 2:06 ` Kevin Hao
2014-12-11 6:08 ` [PATCH net v2] " Kevin Hao
2014-12-11 17:05 ` Claudiu Manoil
2014-12-11 19:27 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-10-30 10:25 [PATCH] net: gianfar: fix " Kevin Hao
2014-10-30 16:28 ` Claudiu Manoil
2014-10-31 3:09 ` Kevin Hao
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=20141210.131347.2165044584202384761.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=claudiu.manoil@freescale.com \
--cc=haokexin@gmail.com \
--cc=netdev@vger.kernel.org \
/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).