2002-11-06 15:16:54

by Manish Lachwani

[permalink] [raw]
Subject: Regarding zerocopy implementation ...

Is there a zerocopy receive implementation in Linux? I know that FreeBSD
5.0-CURRENT has such an implementation named zerocopy sockets and when used
with a Alteon Tigon II NIC with header splitting turned on in Firmware,
works well. Do we have any such implementation in Linux? Any reponse is
greatly appreciated ...

Thanks
Manish


2002-11-06 21:52:55

by Robert Love

[permalink] [raw]
Subject: Re: Regarding zerocopy implementation ...

On Wed, 2002-11-06 at 10:23, Manish Lachwani wrote:
> Is there a zerocopy receive implementation in Linux? I know that FreeBSD
> 5.0-CURRENT has such an implementation named zerocopy sockets and when used
> with a Alteon Tigon II NIC with header splitting turned on in Firmware,
> works well. Do we have any such implementation in Linux? Any reponse is
> greatly appreciated ...

Yes, we have zero-copy networking if the device supports the requisite
features and the driver is so coded.

Quick glance over 2.4, it looks like the following drivers support
zero-copy networking: via-rhine, tg3, sunhme, sungem, starfire, ns83820,
dl2k, acenic, 8139too, 8139cp, 3c59x family (includes 3c9xx), Intel
e100, and Intel e1000.

Robert Love


2002-11-06 21:54:52

by Manish Lachwani

[permalink] [raw]
Subject: RE: Regarding zerocopy implementation ...

Thanks for the response. When you say zerocopy networking, do you refer to
zerocopy receives too? What linux kernel version offers this support? I am
making use of 2.4.17 ...

-----Original Message-----
From: Robert Love [mailto:[email protected]]
Sent: Wednesday, November 06, 2002 1:46 PM
To: Manish Lachwani
Cc: '[email protected]'
Subject: Re: Regarding zerocopy implementation ...


On Wed, 2002-11-06 at 10:23, Manish Lachwani wrote:
> Is there a zerocopy receive implementation in Linux? I know that FreeBSD
> 5.0-CURRENT has such an implementation named zerocopy sockets and when
used
> with a Alteon Tigon II NIC with header splitting turned on in Firmware,
> works well. Do we have any such implementation in Linux? Any reponse is
> greatly appreciated ...

Yes, we have zero-copy networking if the device supports the requisite
features and the driver is so coded.

Quick glance over 2.4, it looks like the following drivers support
zero-copy networking: via-rhine, tg3, sunhme, sungem, starfire, ns83820,
dl2k, acenic, 8139too, 8139cp, 3c59x family (includes 3c9xx), Intel
e100, and Intel e1000.

Robert Love

2002-11-06 22:37:40

by Benjamin LaHaise

[permalink] [raw]
Subject: Re: Regarding zerocopy implementation ...

On Wed, Nov 06, 2002 at 04:46:24PM -0500, Robert Love wrote:
> On Wed, 2002-11-06 at 10:23, Manish Lachwani wrote:
> > Is there a zerocopy receive implementation in Linux? I know that FreeBSD
> > 5.0-CURRENT has such an implementation named zerocopy sockets and when used
> > with a Alteon Tigon II NIC with header splitting turned on in Firmware,
> > works well. Do we have any such implementation in Linux? Any reponse is
> > greatly appreciated ...
>
> Yes, we have zero-copy networking if the device supports the requisite
> features and the driver is so coded.

But we do not perform zero copy receives to userland yet.

-ben

2002-11-06 22:52:12

by Robert Love

[permalink] [raw]
Subject: RE: Regarding zerocopy implementation ...

On Wed, 2002-11-06 at 17:01, Manish Lachwani wrote:

> Thanks for the response. When you say zerocopy networking, do you refer to
> zerocopy receives too? What linux kernel version offers this support? I am
> making use of 2.4.17 ...

No, only sending is supported. See sendfile().

Yes, zero copy is in 2.4.17.

Robert Love

2002-11-06 22:50:16

by Manish Lachwani

[permalink] [raw]
Subject: RE: Regarding zerocopy implementation ...

Yes, but what abt the support in the kernel?

-----Original Message-----
From: bert hubert [mailto:[email protected]]
Sent: Wednesday, November 06, 2002 2:48 PM
To: '[email protected]'
Subject: Re: Regarding zerocopy implementation ...


On Wed, Nov 06, 2002 at 05:44:18PM -0500, Benjamin LaHaise wrote:

> > Yes, we have zero-copy networking if the device supports the requisite
> > features and the driver is so coded.
>
> But we do not perform zero copy receives to userland yet.

It has been opted that sendfile with reversed arguments could function as
'recvfile' and be renamed to 'copyfd' or something more generic like that.

Regards,

bert

--
http://www.PowerDNS.com Versatile DNS Software & Services
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO

2002-11-06 22:41:20

by bert hubert

[permalink] [raw]
Subject: Re: Regarding zerocopy implementation ...

On Wed, Nov 06, 2002 at 05:44:18PM -0500, Benjamin LaHaise wrote:

> > Yes, we have zero-copy networking if the device supports the requisite
> > features and the driver is so coded.
>
> But we do not perform zero copy receives to userland yet.

It has been opted that sendfile with reversed arguments could function as
'recvfile' and be renamed to 'copyfd' or something more generic like that.

Regards,

bert

--
http://www.PowerDNS.com Versatile DNS Software & Services
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO