Re: zero copy network driver
From: Ask (ask8y_at_yahoo.com)
Date: 08/27/04
- Next message: Kasper Dupont: "Re: Rentrant and Pre-emptive Kernels"
- Previous message: Markus Wenke: "Re: gcc and some static libs"
- In reply to: Ask: "zero copy network driver"
- Next in thread: Pete Zaitcev (OTID1): "Re: zero copy network driver"
- Reply: Pete Zaitcev (OTID1): "Re: zero copy network driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Aug 2004 09:20:11 -0700
Does not sound any interest on this topic.
I think I had wrong assumption about the skb. The fact seems to BE:
*After hard_start_xmit(), the driver becaoes the owner of the skb and
responsible for the release. (so there is really no need to wait until
the
HW finishes the xmit.)
*After netif_rx, the driver loses the ownership of the skb.
Based on these facts, my following plan for RX direction can NOT be
done EITHER:
*Allocate all necesary buffers at open, and use them cyclicly.
Because the fact that the driver lost the ownership of skb, it has to
reallocate new buffer eveytime if received a frame and does pci_map_
thing again and again. That part I don't like.
ask8y@yahoo.com (Ask) wrote in message news:<6a8918d.0408260639.296d6b4c@posting.google.com>...
> Implementation of transmit function.
> hard_start_xmit(struct sk_buff *skb, struct net_device *dev).
> If I do zro copy, iahve to make sure the data in the buffer has been
> transmitted by the hardware not just tell the hardware start to
> transmit.
>
> If the hardware runnning in poll mode, I can poll the buffer
> descriptor to see if the transmit has been done before the retunn. And
> this is not very good, in the sanse that even the hW does not pushed
> out the data, the driver might have idle buffer descriptor available
> to accept data. But at leat I am sure the data has been pushed out by
> HW before the function returns.
>
> However if in in interrupt mode (most likely it'b be in), how could I
> handle this? Before next interrrupt happens I could not if the data
> has been pushed out by the HW. If the function just returns after tell
> HW to start transmit, it might happens that the calling function
> release the buffer even before the HW transmits it.
>
> Thanks for your help.
- Next message: Kasper Dupont: "Re: Rentrant and Pre-emptive Kernels"
- Previous message: Markus Wenke: "Re: gcc and some static libs"
- In reply to: Ask: "zero copy network driver"
- Next in thread: Pete Zaitcev (OTID1): "Re: zero copy network driver"
- Reply: Pete Zaitcev (OTID1): "Re: zero copy network driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|