From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH RFC 2/2] veth: propagate bridge GSO to peer Date: Thu, 30 Nov 2017 09:26:39 -0800 Message-ID: <1512062799.19682.19.camel@gmail.com> References: <20171126181749.19288-1-sthemmin@microsoft.com> <20171126181749.19288-3-sthemmin@microsoft.com> <20171126230725.1fcc3b51@xeon-e3> <20171127201419.GA79@intel.com> <20171127131502.1fbfaa66@xeon-e3> <20171128014222.GA503@intel.com> <91628267-2e48-a231-7cc2-4830eb95ceef@gmail.com> <20171130003534.GA60@intel.com> <20171130091021.658869b0@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: David Ahern , davem@davemloft.net, netdev@vger.kernel.org, sthemmin@microsoft.com, shiny.sebastian@intel.com To: Stephen Hemminger , Solio Sarabia Return-path: Received: from mail-io0-f195.google.com ([209.85.223.195]:36427 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbdK3R0m (ORCPT ); Thu, 30 Nov 2017 12:26:42 -0500 Received: by mail-io0-f195.google.com with SMTP id 81so8348365iof.3 for ; Thu, 30 Nov 2017 09:26:42 -0800 (PST) In-Reply-To: <20171130091021.658869b0@xeon-e3> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 2017-11-30 at 09:10 -0800, Stephen Hemminger wrote: > > > The problem goes back into the core GSO networking code. > Something like this is needed. > > static inline bool netif_needs_gso(struct sk_buff *skb, >    const struct net_device *dev, >    netdev_features_t features) > { > return skb_is_gso(skb) && > (!skb_gso_ok(skb, features) || >  unlikely(skb_shinfo(skb)->gso_segs > dev- > >gso_max_segs) ||  << new >  unlikely(skb_shinfo(skb)->gso_size > dev- > >gso_max_size) ||  << new >  unlikely((skb->ip_summed != CHECKSUM_PARTIAL) && >   (skb->ip_summed != CHECKSUM_UNNECESSARY))); > } > > What that will do is split up the monster GSO packets if they ever > bleed > across from one device to another through the twisty mazes of packet > processing paths. Since very few drivers have these gso_max_segs / gso_max_size, check could be done in their ndo_features_check()