[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130920213854.GA19732@electric-eye.fr.zoreil.com>
Date: Fri, 20 Sep 2013 23:38:54 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Igor Gnatenko <i.gnatenko.brain@...il.com>,
David Miller <davem@...emloft.net>, stephen@...workplumber.org,
netdev@...r.kernel.org
Subject: Re: [PATCH] skge: fix broken driver
Mikulas Patocka <mpatocka@...hat.com> :
> On Thu, 19 Sep 2013, Francois Romieu wrote:
[...]
> > Both patches don't behave exactly the same wrt pci_unmap_single.
[...]
> I see, my patch passes a wrong value to pci_unmap_single. So I made this
> change to make it pass the correct value. Do you agree with this patch ?
Yes. I did not report it. Igor did.
You may "struct skge_element ee = *e;" and save a line. Who cares about
the extra copy when netdev_alloc_skb_ip_align fails ?
Something less ugly for the longer term
- use netdev_alloc_skb_ip_align in skge_rx_fill
- have skge_rx_setup return previouly stored sk_buff * - NULL if it was so -
and ERR_PTR when it fails for whatever reason
- move netdev_alloc_skb_ip_align into skge_rx_setup
- pci_unmap in skge_rx_setup
- profit
Or isolate the struct sk_buff * + DEFINE_DMA_ part in skge_element then
save it as a whole in skge_rx_setup before initializing a new one as a
(netdev_alloc_skb_ip_align + pci_map).
Does someone volunteer to write it for net-next once the fix has been
merged and later pulled into net-next ?
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists