From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 2/3] net: mpls: Fixups for GSO Date: Mon, 26 Sep 2016 20:04:06 -0600 Message-ID: <363ba109-1951-1018-060f-25df33c717e0@cumulusnetworks.com> References: <1471626542-13335-1-git-send-email-dsa@cumulusnetworks.com> <1471626542-13335-3-git-send-email-dsa@cumulusnetworks.com> <20160822122122.GA8689@penelope.isobedori.kobe.vergenet.net> <20160822145134.GA26491@penelope.isobedori.kobe.vergenet.net> <3297517c-2889-19fe-5aa4-89e1d14eadca@cumulusnetworks.com> <20160824072002.GA27254@penelope.isobedori.kobe.vergenet.net> <586321df-72c6-0dee-4ce6-22ca2a0860fb@cumulusnetworks.com> <20160926175622.3b00d478@griffin> <20160926190259.3b878aa5@griffin> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: pravin shelar , Simon Horman , Pravin B Shelar , Linux Kernel Network Developers , "David S. Miller" , buytenh@wantstofly.org, "Eric W. Biederman" , rshearma@brocade.com, tom@herbertland.com, Thomas Graf , olivier.dugeon@orange.com, Alexander Duyck , roopa@cumulusnetworks.com To: Jiri Benc Return-path: Received: from mail-pf0-f180.google.com ([209.85.192.180]:34950 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934017AbcI0CEJ (ORCPT ); Mon, 26 Sep 2016 22:04:09 -0400 Received: by mail-pf0-f180.google.com with SMTP id s13so37279128pfd.2 for ; Mon, 26 Sep 2016 19:04:09 -0700 (PDT) In-Reply-To: <20160926190259.3b878aa5@griffin> Sender: netdev-owner@vger.kernel.org List-ID: On 9/26/16 11:02 AM, Jiri Benc wrote: > On Mon, 26 Sep 2016 17:56:22 +0200, Jiri Benc wrote: >> After push_mpls, network_header points to the start of MPLS headers. >> Which I understand was the point of this patch. However, push_mpls also >> calls invalidate_flow_key. Meaning that, depending on actions, we may >> end up calling key_extract soon after. And key_extract sets the network >> header *after* the MPLS headers. you know this code better than me, but key_extract pulls the eth header and then sets network header. If MPLS labels are present then it is the labels that the network_header now points to. How did come to the conclusion it is after the labels? >> >> That means that on output, for otherwise identical packet, >> network_header can point before or after MPLS headers based on what >> actions happened to be executed (recirculation, mainly). >> >> If I'm not misreading the code or missing something, this can't be >> right. >> >> mpls_gso_segment does not care, it resets the network_header anyway. >> What about drivers? What is the correct behavior? > > Answering to myself: it breaks skb_mac_gso_segment. Seems we need to > fix key_extract to set network_header to the beginning of MPLS headers. > I'll prepare a patch. > > Jiri >