From patchwork Sat Oct 28 00:09:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Herbert X-Patchwork-Id: 831548 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quantonium-net.20150623.gappssmtp.com header.i=@quantonium-net.20150623.gappssmtp.com header.b="N2GP+boZ"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yP1N02N6lz9t4X for ; Sat, 28 Oct 2017 11:10:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751000AbdJ1AJx (ORCPT ); Fri, 27 Oct 2017 20:09:53 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:54498 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbdJ1AJv (ORCPT ); Fri, 27 Oct 2017 20:09:51 -0400 Received: by mail-pf0-f195.google.com with SMTP id n89so5997688pfk.11 for ; Fri, 27 Oct 2017 17:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantonium-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=quSccy02ASAW7vrq0M9LOTQNzveMP4xnGoQzkkiAySA=; b=N2GP+boZ1DF2METsN9cetdX+NUGboYxNekXEaqXsgx9+BwSMTdQm0AagNkiea7adKO qoZ5Au038DIhfG2tS8jyRu+LbZIqVkXETSuWfdEc/iLOj3TvUsZT/gobiAtAsupKhL2s cGPRfcv6ecP20+jKpOcZfmgydBu7pZN9Mtkr5DSAIrWTStqXWwBzD8qabM9i7tkTdcDE 2eMkZ+WbA06jeInZkWNWxHfP7vID6bkc1KQ3k9Nc45HOeyibfvlZIF4UNtKcU0krPUR/ M2/L1Va8EHZMSAS/WrT9WMbC17hQ0rTRLLHoxe+rdtiSxn/mCVDTJM/CyzLA3n+x4Fp/ UNkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=quSccy02ASAW7vrq0M9LOTQNzveMP4xnGoQzkkiAySA=; b=I1HHgzQuh3vLlUwdTvm23YsLEfbClAnjj8LWsMXln43p3rdjUx1tMTOxGFU0YNNicD CCjrqiJZMSuJigVrWTZ/VpzH43yGqkBCBuRQuajgGaH2gQxpbcS4Fnxqt1ClIw7gjGGr 1LTqqWApUgDBd7L1eAnNJUvZPWHVmrA8e1BAukFzmki7Gp8ozLWbDKymtYqvNVjPO9pL T7kBrzT+NxJBV3OOFpTwxCIk2R3dHthK9gj4uHM1M+dZ0LHpipSrBVCpTk8o3zDnxfg2 WXlPJPkBYttW9hR0n9MgzcEPFVyOIiZDbnfHecnBJ3lrqLhm/K/Ztbz6zxrzSFbkHTsD lREQ== X-Gm-Message-State: AMCzsaWQkgcEN1RJsRypaIrR9O2rJ0w7pvsjk5CmaNAPdMEujigXIk9F bFYUY4cCvcXs1DaL29DQQUgCaQ== X-Google-Smtp-Source: ABhQp+RdgaAN3Z0hF6OU62nlasDWZaj4wpmUJWx6pUh5OVAs/mKCN6EWFaQn9bpVMfk+yzrkPS7nuQ== X-Received: by 10.101.78.5 with SMTP id r5mr1614226pgt.94.1509149391156; Fri, 27 Oct 2017 17:09:51 -0700 (PDT) Received: from localhost.localdomain (c-73-162-13-107.hsd1.ca.comcast.net. [73.162.13.107]) by smtp.gmail.com with ESMTPSA id 2sm9068398pgb.30.2017.10.27.17.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 17:09:50 -0700 (PDT) From: Tom Herbert To: davem@davemloft.net Cc: pablo@netfilter.org, laforge@gnumonks.org, aschultz@tpip.net, netdev@vger.kernel.org, rohit@quantonium.net, Tom Herbert Subject: [PATCH v7 net-next 00/13] gtp: Additional feature support - Part I Date: Fri, 27 Oct 2017 17:09:24 -0700 Message-Id: <20171028000937.2631-1-tom@quantonium.net> X-Mailer: git-send-email 2.11.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch set builds upon the initial GTP implementation to make support closer to that enjoyed by other encapsulation protocols. The major items are: - Experimental IPv6 support - Configurable networking interfaces so that GTP kernel can be used and tested without needing GSN network emulation (i.e. no user space daemon needed). - Addition of a dst_cache in the GTP structure and other cleanup Additionally, this patch set also includes: - Common functions to get a route fo for an IP tunnel - Fix VXLAN gro cells initialization For IPv6 support, the mobile subscriber needs to allow IPv6 addresses, and the remote endpoint can be IPv6. For configurable interfaces, configuration is added to allow an alternate means to configure a GTP and device. This follows the typical UDP encapsulation model of specifying a listener port for receive, and a remote address and port for transmit. Configuration is performed by iproute2/ip. I will post that in a subsequent patch set. Tested: Configured the matrix of IPv4/IPv6 mobile subscriber, IPv4/IPv6 remote peer, and GTP version 0 and 1 (eight combinations). Observed connectivity and functional netperf. Also, tested VXLAN for regression. Test using openggs with ggsn and kernel module on one side and emulated sgsn on the other. Observed connectivity and functional netperf. v2: - Split the original patch to post in parts in order to make review more manageable - Make IPv6 support experimental with a configuration option for it - Prepend hash functions with gtp - Generalize iptunnel update path MTU function and call it from gtp instead using custom code - Split original patch cleaning up udp_recv into several for easier review v3: Properly include netdev on cc v4: - Move __ip6_tnl_get_route to ipv6/route.c to avoid creting dependency on ip6_tunnel - Add "select GRO_CELLS" fo Kconfig for GTP v5: - Rebase to current next-net and repost v6: - Move __ip6_tnl_get_route from net/ipv6/route.c to net/ipv6/ip6_tunnel.c. This addresses the issue pointed out by kbuild that the function is not defined when CONFIG_DST_CACHE is not set v7: - Fixed GRO cell initialization in GTP to be in ndo_init and check return value. Credit to Subash Abhinov Kasiviswanathan for pointing out this issue. - Fixed GRO cell initialization in VXLAN to also be in ndo_init and check return value Tom Herbert (13): vxlan: Move gro_cells_init to ndo_init iptunnel: Add common functions to get a tunnel route vxlan: Call common functions to get tunnel routes gtp: Call common functions to get tunnel routes and add dst_cache iptunnel: Generalize tunnel update pmtu gtp: Change to use gro_cells gtp: Use goto for exceptions in gtp_udp_encap_recv funcs gtp: udp recv clean up gtp: Call function to update path mtu gtp: Eliminate pktinfo and add port configuration gtp: Experimental encapsulation of IPv6 packets gtp: Experimental support encpasulating over IPv6 gtp: Allow configuring GTP interface as standalone drivers/net/Kconfig | 13 +- drivers/net/gtp.c | 1046 ++++++++++++++++++++++++++++++------------ drivers/net/vxlan.c | 95 +--- include/net/ip6_tunnel.h | 31 ++ include/net/ip_tunnels.h | 36 ++ include/uapi/linux/gtp.h | 8 + include/uapi/linux/if_link.h | 3 + net/ipv4/ip_tunnel.c | 70 ++- net/ipv6/ip6_tunnel.c | 42 ++ 9 files changed, 959 insertions(+), 385 deletions(-)