[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACna6rzqwz_wp=9ayX6AUZvVSNwdAg-LniXtNwy9eRFDEoNspg@mail.gmail.com>
Date: Tue, 29 Oct 2013 09:28:56 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: Nathan Hintz <nlhintz@...mail.com>
Cc: Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH] bgmac: don't update slot on skb alloc/dma mapping error
2013/10/29 Nathan Hintz <nlhintz@...mail.com>:
> On Tue, 29 Oct 2013 07:52:58 +0100
> Rafał Miłecki <zajec5@...il.com> wrote:
>
>> 2013/10/29 Nathan Hintz <nlhintz@...mail.com>:
>> > Don't update the slot in "bgmac_dma_rx_skb_for_slot" unless both the
>> > skb alloc and dma mapping are successful; and free the newly allocated
>> > skb if a dma mapping error occurs. This will prevent an skb leak upon
>> > returning when an error occurs.
>>
>> In case of bgmac_dma_rx_skb_for_slot failure we're giving up anyway
>> (and freeing everything), but with your patch code is simpler to
>> understand, so I'm OK with that.
>>
>> Acked-by: Rafał Miłecki <zajec5@...il.com>
>>
>
> I might be misunderstanding; but it in the case of failure, it appeared to me
> that the currently received packet was dropped and the old skb would continue
> to be assigned to the slot and would be used to receive future packets (this
> would continue until bgmac_dma_rx_skb_for_slot was successful).
I was commenting on current usage (bgmac_dma_alloc), not my WIP patch
for bgmac_dma_rx_read :)
Your patch will be helpful for my bgmac_dma_rx_read rework.
--
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