On Fri, Sep 01, 2006 at 09:43:47AM +1000, herbert wrote:
> 
> It might be better to set it to the biggest frag you see rather
> than the first.

I've coded it up.

BTW Ananda, what hardware assistance do your chips currently provide
for LRO? What are the timeouts used before it gives up on aggregating
a session?

[NETDRV] s2io: Set gso_size for LRO to TCP stack

Now that the TCP stack uses gso_size to estimate the receive MSS,
it helps to actually set it :)

Unlike the sending side, there is no single MSS that naturally
pops up for LRO.  However, for our purposes the maximal TCP payload
size is the most appropriate for estimating MSS.

Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index e72e0e0..3ebc789 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -6522,6 +6522,8 @@ static int rx_osm_handler(ring_info_t *r
                                                &tcp_len, &lro, rxdp, sp);
                                switch (ret) {
                                        case 3: /* Begin anew */
+                                               skb_shinfo(skb)->gso_size =
+                                                       tcp_len;
                                                lro->parent = skb;
                                                goto aggregate;
                                        case 1: /* Aggregate */
@@ -7556,6 +7558,8 @@ static void lro_append_pkt(nic_t *sp, lr
 {
        struct sk_buff *first = lro->parent;
 
+       if (tcp_len > skb_shinfo(first)->gso_size)
+               skb_shinfo(first)->gso_size = tcp_len;
        first->len += tcp_len;
        first->data_len = lro->frags_len;
        skb_pull(skb, (skb->len - tcp_len));
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to