On Thu, Dec 5, 2013 at 7:23 AM, Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
> On Wed, Dec 04, 2013 at 03:24:14PM +0800, ZHAO Gang wrote:
>> As TODO file suggested, drop packet instead of return NETDEV_TX_BUSY
>> when tx failed.
>
> Really?  That's ok to do?  Seems like you are changing the logic of the
> function a lot here, how does the code let userspace know packets were
> dropped then?
>

The TODO file said:
- In et131x_tx(), don't return NETDEV_TX_BUSY, just drop the packet
with kfree_skb().

I think I did what the TODO file suggested, the real logic change is
when tx_ring is full, instead of return NETDEV_TX_BUSY, drop packet
and return NETDEV_TX_OK.

But a `git grep` shows that many ethernet drivers return
NETDEV_TX_BUSY, maybe the best practice is to return NETDEV_TX_BUSY ?
If it is, we should remove this item from TODO file.

> greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to