From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Benc Subject: Re: [PATCH net-next v2 4/4] vxlan: implement GPE Date: Wed, 16 Mar 2016 18:38:10 +0100 Message-ID: <20160316183810.43eb3f3b@griffin> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Linux Kernel Network Developers , Jesse Gross To: Tom Herbert Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41997 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933580AbcCPRiN (ORCPT ); Wed, 16 Mar 2016 13:38:13 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 16 Mar 2016 10:31:10 -0700, Tom Herbert wrote: > Sorry, I still don't like this. For VXLAN-GPE packets the above two > conditionals are a complete waste of time and I shouldn't have to go > pawing through configuration to determine what protocol has actually > be implemented. Please, at least move these into the else block of > "if (vs->flags & VXLAN_F_GPE) {" above. This saves two conditionals in > the data path, makes the parsing code more readable, and you don't > need to reference configuration to figure things out. As I already wrote, this is not possible. GPE parsing needs to occur before iptunnel_pull_header (because we need to know the protocol), GBP parsing needs to happen after it (after udp_tun_rx_dst specifically). Believe me, I would do it that way if it was possible. I also considered splitting rx path for GPE and non-GPE case and the result was much uglier and longer code. Jiri