Subject: Re: [PATCH 0/2] Disable forwarding of LRO skbs

From: Ben Hutchings <[email-masked]>
Date: Sun, 15 Jun 2008 01:51:34 +0100

Herbert Xu wrote:
> On Thu, May 01, 2008 at 12:02:27PM +0100, Ben Hutchings wrote:
> >
> > My understanding is that at the points I'm adding the check, we're only
> > considering received skbs and gso_size will only be set if LRO was used.
> 
> Unfortunately that's not the case.  The forwarding path can and
> does occur for GSO packets sent from other guests.  The obvious
> case would be a GSO packet from a guest forwarded by the host
> (as opposed to bridged) to the outside world.

Can we distinguish them by testing skb->ip_summed == CHECKSUM_PARTIAL?
That is a requirement for using hardware segmentation offload (see
netif_needs_gso()) but an skb resulting from LRO should have ip_summed
set to either CHECKSUM_UNNECESSARY or CHECKSUM_NONE.

Alternately we could introduce some kind of status flag to say that a
device is bridging or forwarding, and have ethtool_op_set_flags()
block re-enabling of LRO when that's set.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.