Subject: RE: [PATCH]NET: Add ECN support for TSO

From: "Ravinandan Arakali" <[email-masked]>
Date: Fri, 7 Jul 2006 11:56:35 -0700

Michael,
Are network cards expected to be aware-of and implement RFC3540(ECN with
nonces) ?

Thanks,
Ravi

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Michael Chan
Sent: Tuesday, June 27, 2006 8:07 PM
To: [email-masked]; [email-masked]
Cc: [email-masked]
Subject: [PATCH]NET: Add ECN support for TSO

In the current TSO implementation, NETIF_F_TSO and ECN cannot be
turned on together in a TCP connection.  The problem is that most
hardware that supports TSO does not handle CWR correctly if it is set
in the TSO packet.  Correct handling requires CWR to be set in the
first packet only if it is set in the TSO header.

This patch adds the ability to turn on NETIF_F_TSO and ECN using
GSO if necessary to handle TSO packets with CWR set.  Hardware
that handles CWR correctly can turn on NETIF_F_TSO_ECN in the dev->
features flag.

All TSO packets with CWR set will have the SKB_GSO_TCPV4_ECN set.  If
the output device does not have the NETIF_F_TSO_ECN feature set, GSO
will split the packet up correctly with CWR only set in the first
segment.

It is further assumed that all hardware will handle ECE properly by
replicating the ECE flag in all segments.  If that is not the case, a
simple extension of the logic will be required.

Signed-off-by: Michael Chan <[email-masked]>