Thanks Paul.
Sumit

-----Original Message-----
From: Paul Durrant [mailto:[email protected]]
Sent: Thu 12/18/2008 2:21 AM
To: Sumit Gupta
Cc: [email protected]
Subject: Re: [networking-discuss] What is zero-copy safe
 
Sumit Gupta wrote:
> Inside gld_mac_info->gldm_capabilities, there is a flag defined as 
> GLD_CAP_ZEROCOPY. Doing some research, it seem to map to 
> DL_CAPAB_ZEROCOPY which means that the NIC driver is zero copy safe. 
> What is the meaning of zero copy safe ?
> 

The meaning may have changed, but when this capability was introduced 
the meaning of it was that the driver guaranteed to complete transmits 
in a timely fashion.
The problem is that if you do a sendfile() and the network stack simply 
maps the file and wraps it in a set of STREAMS blocks then it must 
obviously hold a reference on that file; and if a driver holds onto the 
STREAMS blocks on its transmit side then it is essentally holding that 
file to ransom. So, if the driver exports the GLD_CAP_ZEROCOPY 
capability then it is essentially declaring that it is not going to hold 
  onto transmitted blocks for an unreasonable amount of time (i.e. 
significantly longer than it takes to put them on the wire) and thus 
will not hold a file to ransom in this way.

   Paul


_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to