netdev
[Top] [All Lists]

RE: [PATCH 2.6.12-rc4] IPv4/IPv6: USO v2, Scatter-gather approach

To: "'David S. Miller'" <davem@xxxxxxxxxxxxx>
Subject: RE: [PATCH 2.6.12-rc4] IPv4/IPv6: USO v2, Scatter-gather approach
From: "Ravinandan Arakali" <ravinandan.arakali@xxxxxxxxxxxx>
Date: Thu, 21 Jul 2005 11:42:10 -0700
Cc: <jgarzik@xxxxxxxxx>, <netdev@xxxxxxxxxxx>, <raghavendra.koushik@xxxxxxxxxxxx>, <leonid.grossman@xxxxxxxxxxxx>, <ananda.raju@xxxxxxxxxxxx>, <rapuru.sriram@xxxxxxxxxxxx>
Importance: Normal
In-reply-to: <20050719.142320.52167011.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
David,
We are working on your comments. Will get back to you before end of
next week.

Thanks,
Ravi

-----Original Message-----
From: David S. Miller [mailto:davem@xxxxxxxxxxxxx]
Sent: Tuesday, July 19, 2005 2:23 PM
To: ravinandan.arakali@xxxxxxxxxxxx
Cc: jgarzik@xxxxxxxxx; netdev@xxxxxxxxxxx;
raghavendra.koushik@xxxxxxxxxxxx; leonid.grossman@xxxxxxxxxxxx;
ananda.raju@xxxxxxxxxxxx; rapuru.sriram@xxxxxxxxxxxx
Subject: Re: [PATCH 2.6.12-rc4] IPv4/IPv6: USO v2, Scatter-gather
approach


From: ravinandan.arakali@xxxxxxxxxxxx
Date: Thu,  2 Jun 2005 17:41:06 -0700 (PDT)

> Attached below is version 2 of kernel patch for UDP Large send offload 
> feature. This patch uses the "Scatter-Gather" approach.
> It also incorporates David Miller's comments on the first version.

I've reviewed this patches, and I think there is a problem
with the sock_append_data() scheme.  You disallow the case
where there is an SKB on the write queue already.

This breaks NFS, and other things using MSG_MORE and UDP_CORK.
They do a two step packet building:

1) Send protocol headers, f.e. NFS

2) Send file contents via sendfile()

3) Uncork socket so packet gets emitted

and due to this check:

+       if (skb_queue_len(&sk->sk_write_queue)) {
+               *err = -EOPNOTSUPP;
+               return NULL;
+       }

you end up not supporting this correctly.

So we have two options, either add support for corked socket
handling to sock_append_data() or we go with the frag_list
patch which doesn't have this problem.

I prefer the frag_list patch from a cleanliness perspective,
however I remember you saying that the sock_append_data()
approach obtained better performance.  And that seems clear
since there will be less TX descriptors needed to send such
frames unless the driver does coalescing as it walks the
frag_list chain.


<Prev in Thread] Current Thread [Next in Thread>