[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130726212403.GA25674@electric-eye.fr.zoreil.com>
Date: Fri, 26 Jul 2013 23:24:03 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Neil Horman <nhorman@...driver.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [net PATCH v2] 8139cp: Add dma_mapping_error checking
Neil Horman <nhorman@...driver.com> :
> On Fri, Jul 26, 2013 at 10:06:30PM +0200, Francois Romieu wrote:
> > Neil Horman <nhorman@...driver.com> :
[...]
> > > @@ -533,6 +533,11 @@ rx_status_loop:
> > >
> > > mapping = dma_map_single(&cp->pdev->dev, new_skb->data, buflen,
> > > PCI_DMA_FROMDEVICE);
> > > + if (dma_mapping_error(&cp->pdev->dev, mapping)) {
> > > + kfree_skb(skb);
> >
> > dev->stats.rx_dropped++;
> >
> > Sorry, I did not notice that skb contained newly received data :o/
> >
> Yeah, this isn't needed. The skb being mapped in is newly allocated, and
> contains no data. We haven't dropped anything here, so theres no need for the
> stats bump.
Huh ?
[...error path...]
kfree(skb);
[...normal path...]
cp_rx_skb(cp, skb, desc);
Afaiks it's the same skb. We drop data and a stats bump is needed.
[...]
> Thoughts?
Nevermind. cp_start_xmit is a piece of it and it isn't your work to
turn it into something sensible.
--
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