netdev
[Top] [All Lists]

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

To: ravinandan.arakali@xxxxxxxxxxxx
Subject: Re: [PATCH 2.6.12-rc4] IPv4/IPv6: USO v2, Scatter-gather approach
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Tue, 19 Jul 2005 14:23:20 -0700 (PDT)
Cc: jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, raghavendra.koushik@xxxxxxxxxxxx, leonid.grossman@xxxxxxxxxxxx, ananda.raju@xxxxxxxxxxxx, rapuru.sriram@xxxxxxxxxxxx
In-reply-to: <20050603004106.BAB6A7B990@xxxxxxxxxx>
References: <20050603004106.BAB6A7B990@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
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>