From: David Miller <davem@davemloft.net>
To: nhorman@redhat.com
Cc: nhorman@tuxdriver.com, netdev@vger.kernel.org,
tedheadster@gmail.com, klassert@mathematik.tu-chemnitz.de
Subject: Re: [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic
Date: Wed, 03 Jan 2018 10:26:06 -0500 (EST) [thread overview]
Message-ID: <20180103.102606.1453240990448791901.davem@davemloft.net> (raw)
In-Reply-To: <20180103151333.GB22129@hmswarspite.think-freely.org>
From: Neil Horman <nhorman@redhat.com>
Date: Wed, 3 Jan 2018 10:13:33 -0500
> Thats exactly what this patch does, instead of creating a second loop to
> traverse all the emptied ring buffers, now I:
>
> 1) Pre-allocate a new skb when I know I'm going to receive the in-place skb
> 2) Map the skb into the appropriate dma device domain
> 3) If (1) and (2) succede, then I swap the newly allocate skb and dma address
> with the old one and recieve the old into the network stack
> 4) If (1) or (2) fail, then I goto clear_complete, which leaves the old skb and
> dma address in place, sets the buffer status back to 0 (indicating completion),
> and write the new ring status back to the hardware
>
> This is what you wanted, a pre-allocate and swap-if-successful, recycle-if-not
> approach, rather than the leave-a-hole-in-the-ring approach that is there
> currently, no? Or did I miss something else?
I misread the code sorry, you're absolutely right.
I'll apply this patch, thanks Neil. :)
next prev parent reply other threads:[~2018-01-03 15:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-29 14:51 3c59x: pci_unmap_single() oops tedheadster
2017-12-29 16:40 ` [PATCH] 3c59x: fix missing dma_mapping_error check Neil Horman
2018-01-03 2:48 ` David Miller
2018-01-03 10:42 ` Neil Horman
2018-01-03 14:53 ` David Miller
2018-01-03 14:44 ` [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic Neil Horman
2018-01-03 14:58 ` David Miller
2018-01-03 15:13 ` Neil Horman
2018-01-03 15:26 ` David Miller [this message]
2018-01-03 15:28 ` David Miller
2018-01-03 16:41 ` Neil Horman
2018-01-03 18:09 ` [PATCHv3] " Neil Horman
2018-01-03 18:44 ` David Miller
2018-01-22 6:27 ` tedheadster
2018-01-22 12:36 ` Neil Horman
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=20180103.102606.1453240990448791901.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=klassert@mathematik.tu-chemnitz.de \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=nhorman@tuxdriver.com \
--cc=tedheadster@gmail.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).