From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH v4 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc Date: Mon, 13 Apr 2015 17:57:21 -0700 Message-ID: <552C65F1.8010402@plumgrid.com> References: <5528C4FC.5020207@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Eric Dumazet , Thomas Graf , Jiri Pirko , Jamal Hadi Salim , netdev To: Cong Wang , Daniel Borkmann Return-path: Received: from mail-pa0-f45.google.com ([209.85.220.45]:36146 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754153AbbDNA5X (ORCPT ); Mon, 13 Apr 2015 20:57:23 -0400 Received: by pabsx10 with SMTP id sx10so119630399pab.3 for ; Mon, 13 Apr 2015 17:57:23 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 4/13/15 3:44 PM, Cong Wang wrote: > > My suggestion is fairly simple: move skb_pull() out of eth_type_trans() > and move it to netif_receive_skb(), it apparently needs much more work > but it worth the effort. This would eliminate the skb_push() in mirred > and in ifb too, dev_forward_skb() would benefit too. wow. That would be massive. We're talking months worth of work here. Though theoretically it's possible, we'd still need a flag to preserve compatibility with user space and to be able to roll such monster step by step. Also non-eth devices are calling into netif_receive_skb(). Just thinking about all corner cases of such move makes me very skeptical that we can pull it off. In general we don't care about out of tree drivers, but changing eth_type_trans() this way is really scary. I'd rather keep things simple which is this patch.