Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752860AbaKKJfE (ORCPT ); Tue, 11 Nov 2014 04:35:04 -0500 Received: from cantor2.suse.de ([195.135.220.15]:34685 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbaKKJe7 (ORCPT ); Tue, 11 Nov 2014 04:34:59 -0500 Date: Tue, 11 Nov 2014 10:34:57 +0100 From: Michal Kubecek To: Veaceslav Falico Cc: "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jay Vosburgh , Andy Gospodarek , Jiri Pirko Subject: Re: [PATCH net-next 0/3] dev_disable_lro() improvements for stacked devices Message-ID: <20141111093457.GA30178@unicorn.suse.cz> References: <20141111090522.GB20586@raspberrypi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141111090522.GB20586@raspberrypi> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 11, 2014 at 10:05:22AM +0100, Veaceslav Falico wrote: > On Tue, Nov 11, 2014 at 09:21:30AM +0100, Michal Kubecek wrote: > >Large receive offloading is known to cause problems if received packets > >are passed to other host. Therefore the kernel disables it by calling > >dev_disable_lro() whenever a network device is enslaved in a bridge or > >forwarding is enabled for it (or globally). For virtual devices we need > >to disable LRO on the underlying physical device (which is actually > >receiving the packets). > > > >Current dev_disable_lro() code handles this propagation for a vlan > >(including 802.1ad nested vlan), macvlan or a vlan on top of a macvlan. > >This patch adds LRO disabling propagation for > > > > - macvlan on top of a vlan or any stacked combination of those > > - bonding > > - teaming > > All of these drivers use the netdev_upper and friends, so why not make it > generic with netdev_for_each_all_lower() in dev_disable_lro()? I wanted to preserve current approach where for vlan and macvlan, LRO is disabled on the real device instead of the original one (rather than in addition to it) as LRO is always disabled on them. Handling all four uniformly would make the code nicer but would bring unnecessary overhead of traversing the list and dev_disable_lro() recursion. On the other hand, this operation is not time critical so it might be acceptable after all. Michal Kubecek -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/