[{"id":1777355,"web_url":"http://patchwork.ozlabs.org/comment/1777355/","msgid":"<CALx6S35b6gk39KOXTTzCFiz4S+JOOxcdJGB-+n3nx0x=xxVi8Q@mail.gmail.com>","list_archive_url":null,"date":"2017-09-29T04:11:52","subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","submitter":{"id":65986,"url":"http://patchwork.ozlabs.org/api/people/65986/","name":"Tom Herbert","email":"tom@herbertland.com"},"content":"On Thu, Sep 28, 2017 at 2:34 AM, Amine Kherbouche\n<amine.kherbouche@6wind.com> wrote:\n> This commit introduces the MPLSoGRE support (RFC 4023), using ip tunnel\n> API.\n>\n> Encap:\n>   - Add a new iptunnel type mpls.\n>   - Share tx path: gre type mpls loaded from skb->protocol.\n>\n> Decap:\n>   - pull gre hdr and call mpls_forward().\n>\n> Signed-off-by: Amine Kherbouche <amine.kherbouche@6wind.com>\n> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>\n> ---\n>  include/net/gre.h              |  1 +\n>  include/uapi/linux/if_tunnel.h |  1 +\n>  net/ipv4/gre_demux.c           | 27 +++++++++++++++++++++++++++\n>  net/ipv4/ip_gre.c              |  3 +++\n>  net/ipv6/ip6_gre.c             |  3 +++\n>  net/mpls/af_mpls.c             | 36 ++++++++++++++++++++++++++++++++++++\n>  6 files changed, 71 insertions(+)\n>\n> diff --git a/include/net/gre.h b/include/net/gre.h\n> index d25d836..aa3c4d3 100644\n> --- a/include/net/gre.h\n> +++ b/include/net/gre.h\n> @@ -35,6 +35,7 @@ struct net_device *gretap_fb_dev_create(struct net *net, const char *name,\n>                                        u8 name_assign_type);\n>  int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,\n>                      bool *csum_err, __be16 proto, int nhs);\n> +int mpls_gre_rcv(struct sk_buff *skb, int gre_hdr_len);\n>\n>  static inline int gre_calc_hlen(__be16 o_flags)\n>  {\n> diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h\n> index 2e52088..a2f48c0 100644\n> --- a/include/uapi/linux/if_tunnel.h\n> +++ b/include/uapi/linux/if_tunnel.h\n> @@ -84,6 +84,7 @@ enum tunnel_encap_types {\n>         TUNNEL_ENCAP_NONE,\n>         TUNNEL_ENCAP_FOU,\n>         TUNNEL_ENCAP_GUE,\n> +       TUNNEL_ENCAP_MPLS,\n>  };\n>\n>  #define TUNNEL_ENCAP_FLAG_CSUM         (1<<0)\n> diff --git a/net/ipv4/gre_demux.c b/net/ipv4/gre_demux.c\n> index b798862..40484a3 100644\n> --- a/net/ipv4/gre_demux.c\n> +++ b/net/ipv4/gre_demux.c\n> @@ -23,6 +23,9 @@\n>  #include <linux/netdevice.h>\n>  #include <linux/if_tunnel.h>\n>  #include <linux/spinlock.h>\n> +#if IS_ENABLED(CONFIG_MPLS)\n> +#include <linux/mpls.h>\n> +#endif\n>  #include <net/protocol.h>\n>  #include <net/gre.h>\n>\n> @@ -122,6 +125,30 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,\n>  }\n>  EXPORT_SYMBOL(gre_parse_header);\n>\n> +#if IS_ENABLED(CONFIG_MPLS)\n> +int mpls_gre_rcv(struct sk_buff *skb, int gre_hdr_len)\n> +{\n> +       if (unlikely(!pskb_may_pull(skb, gre_hdr_len)))\n> +               goto drop;\n> +\n> +       /* Pop GRE hdr and reset the skb */\n> +       skb_pull(skb, gre_hdr_len);\n> +       skb_reset_network_header(skb);\n> +\n\nI don't see why MPLS/GRE needs to be a special case in gre_rcv. Can't\nwe just follow the normal processing patch which calls the proto ops\nhandler for the protocol in the GRE header? Also, if protocol specific\ncode is added to rcv function that most likely means that we need to\nupdate the related offloads also (grant it that MPLS doesn't support\nGRO but it looks like it supports GSO). Additionally, we'd need to\nconsider if flow dissector needs a similar special case (I will point\nout that my recently posted patches there eliminated TEB as the one\nspecial case in GRE dissection).\n\nThanks,\nTom\n\n> +       return mpls_forward(skb, skb->dev, NULL, NULL);\n> +drop:\n> +       kfree_skb(skb);\n> +       return NET_RX_DROP;\n> +}\n> +#else\n> +int mpls_gre_rcv(struct sk_buff *skb, int gre_hdr_len)\n> +{\n> +       kfree_skb(skb);\n> +       return NET_RX_DROP;\n> +}\n> +#endif\n> +EXPORT_SYMBOL(mpls_gre_rcv);\n> +\n>  static int gre_rcv(struct sk_buff *skb)\n>  {\n>         const struct gre_protocol *proto;\n> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c\n> index 9cee986..7a50e4f 100644\n> --- a/net/ipv4/ip_gre.c\n> +++ b/net/ipv4/ip_gre.c\n> @@ -412,6 +412,9 @@ static int gre_rcv(struct sk_buff *skb)\n>                         return 0;\n>         }\n>\n> +       if (unlikely(tpi.proto == htons(ETH_P_MPLS_UC)))\n> +               return mpls_gre_rcv(skb, hdr_len);\n> +\n>         if (ipgre_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)\n>                 return 0;\n>\n> diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c\n> index c82d41e..440efb1 100644\n> --- a/net/ipv6/ip6_gre.c\n> +++ b/net/ipv6/ip6_gre.c\n> @@ -476,6 +476,9 @@ static int gre_rcv(struct sk_buff *skb)\n>         if (hdr_len < 0)\n>                 goto drop;\n>\n> +       if (unlikely(tpi.proto == htons(ETH_P_MPLS_UC)))\n> +               return mpls_gre_rcv(skb, hdr_len);\n> +\n>         if (iptunnel_pull_header(skb, hdr_len, tpi.proto, false))\n>                 goto drop;\n>\n> diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c\n> index 36ea2ad..4274243 100644\n> --- a/net/mpls/af_mpls.c\n> +++ b/net/mpls/af_mpls.c\n> @@ -16,6 +16,7 @@\n>  #include <net/arp.h>\n>  #include <net/ip_fib.h>\n>  #include <net/netevent.h>\n> +#include <net/ip_tunnels.h>\n>  #include <net/netns/generic.h>\n>  #if IS_ENABLED(CONFIG_IPV6)\n>  #include <net/ipv6.h>\n> @@ -39,6 +40,36 @@ static int one = 1;\n>  static int label_limit = (1 << 20) - 1;\n>  static int ttl_max = 255;\n>\n> +#if IS_ENABLED(CONFIG_NET_IP_TUNNEL)\n> +size_t ipgre_mpls_encap_hlen(struct ip_tunnel_encap *e)\n> +{\n> +       return sizeof(struct mpls_shim_hdr);\n> +}\n> +\n> +static const struct ip_tunnel_encap_ops mpls_iptun_ops = {\n> +       .encap_hlen     = ipgre_mpls_encap_hlen,\n> +};\n> +\n> +static int ipgre_tunnel_encap_add_mpls_ops(void)\n> +{\n> +       return ip_tunnel_encap_add_ops(&mpls_iptun_ops, TUNNEL_ENCAP_MPLS);\n> +}\n> +\n> +static void ipgre_tunnel_encap_del_mpls_ops(void)\n> +{\n> +       ip_tunnel_encap_del_ops(&mpls_iptun_ops, TUNNEL_ENCAP_MPLS);\n> +}\n> +#else\n> +static int ipgre_tunnel_encap_add_mpls_ops(void)\n> +{\n> +       return 0;\n> +}\n> +\n> +static void ipgre_tunnel_encap_del_mpls_ops(void)\n> +{\n> +}\n> +#endif\n> +\n>  static void rtmsg_lfib(int event, u32 label, struct mpls_route *rt,\n>                        struct nlmsghdr *nlh, struct net *net, u32 portid,\n>                        unsigned int nlm_flags);\n> @@ -2486,6 +2517,10 @@ static int __init mpls_init(void)\n>                       0);\n>         rtnl_register(PF_MPLS, RTM_GETNETCONF, mpls_netconf_get_devconf,\n>                       mpls_netconf_dump_devconf, 0);\n> +       err = ipgre_tunnel_encap_add_mpls_ops();\n> +       if (err)\n> +               pr_err(\"Can't add mpls over gre tunnel ops\\n\");\n> +\n>         err = 0;\n>  out:\n>         return err;\n> @@ -2503,6 +2538,7 @@ static void __exit mpls_exit(void)\n>         dev_remove_pack(&mpls_packet_type);\n>         unregister_netdevice_notifier(&mpls_dev_notifier);\n>         unregister_pernet_subsys(&mpls_net_ops);\n> +       ipgre_tunnel_encap_del_mpls_ops();\n>  }\n>  module_exit(mpls_exit);\n>\n> --\n> 2.1.4\n>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=herbertland-com.20150623.gappssmtp.com\n\theader.i=@herbertland-com.20150623.gappssmtp.com\n\theader.b=\"jJ7DbNeB\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y3J6S4Hy5z9t2M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 29 Sep 2017 14:12:00 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750842AbdI2ELz (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 29 Sep 2017 00:11:55 -0400","from mail-qt0-f195.google.com ([209.85.216.195]:50135 \"EHLO\n\tmail-qt0-f195.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750730AbdI2ELy (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 29 Sep 2017 00:11:54 -0400","by mail-qt0-f195.google.com with SMTP id o3so181477qte.6\n\tfor <netdev@vger.kernel.org>; Thu, 28 Sep 2017 21:11:53 -0700 (PDT)","by 10.237.61.196 with HTTP; Thu, 28 Sep 2017 21:11:52 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=herbertland-com.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=f5Y18ynCNMoqfnETMEM2DU9ZXum94WqH8maj7VIWY7s=;\n\tb=jJ7DbNeBi858HtJLMVfl8BLerDRrjUVMkXRa6Wa+eQfv3aZIoTH4u4AJSH6M2P8IHR\n\t/oyRa5jh/hVXg7mysACTLNYcbNlHU1Pze9Lo5TMdY8XLEfHeZvVIPDBeoLxvufqm+Ntx\n\t73qBptfFFxPMb309//qy53CP4+6iMGl14rHARSgTH1CD2qX1Po/YhAC66k6dg/y8zcpH\n\tuYc1k4KAIeg6bBdiOoVHxU2fpWcLm4w37xrqom4BMshWsgOGw9kBGbPbNmXAH6S7PHV4\n\t2k8SCn3XSAR0p07VpvuQmH0b9n87FAZUP0lmCpsWdbuec5YmWsldqG4fyDBl1BwEfWmU\n\t5FZQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=f5Y18ynCNMoqfnETMEM2DU9ZXum94WqH8maj7VIWY7s=;\n\tb=nNlPM6p4lQDuOwdDS+NyUMfOpQB2vHqA8Qy4fQnwrlEX6D+htIuE6NLt16eu39LRw7\n\tiqxvg+ArD7Vc0VcGTYrxfB2kgmzDU9KhPuJ564IyW8AS4pW1CPLn9h/8g8/tEYF8gxpB\n\t7pzuzRs8GjsVa2k0M9vZwF1+KDY1mOfxQhb4YbP116844guwJwS2R3S3K3mFUeTKBBMw\n\tyyWs8bOe9L8wD7CarIyUIlTfRnVlt6Vy8cqxg44HUFhCm6HSe8sZ4m5NspgYaWlkgDvV\n\tIEBx1/dAhlAdRyvOWCIryOVhRq93jEn250eBEbzx8X2fTcq0GSvWMo8ME4qH71FiMQkk\n\t7hSg==","X-Gm-Message-State":"AMCzsaXbrOzvH27f/OH5fGzkR3YvnpzdWsIMsu9gTEmNGpnZOVUKKAQK\n\ttEGM4ibQs8ou2tLARt4xEmOSNqkvjv0BA1Yh8YOnKg==","X-Google-Smtp-Source":"AOwi7QA0yC8GytaWkFE1E14G0N56g2K1EjgPBiesGgUh2ixBJVjcpnUxcHTpmcs1FwCoPP//2/KYajt0Po2ozwi3yt4=","X-Received":"by 10.237.62.200 with SMTP id o8mr4248477qtf.294.1506658313299; \n\tThu, 28 Sep 2017 21:11:53 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<2e611d0f6e0c39ff54bfe464cdf9cf6eeb7843e1.1506590878.git.amine.kherbouche@6wind.com>","References":"<cover.1506590878.git.amine.kherbouche@6wind.com>\n\t<2e611d0f6e0c39ff54bfe464cdf9cf6eeb7843e1.1506590878.git.amine.kherbouche@6wind.com>","From":"Tom Herbert <tom@herbertland.com>","Date":"Thu, 28 Sep 2017 21:11:52 -0700","Message-ID":"<CALx6S35b6gk39KOXTTzCFiz4S+JOOxcdJGB-+n3nx0x=xxVi8Q@mail.gmail.com>","Subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","To":"Amine Kherbouche <amine.kherbouche@6wind.com>","Cc":"Linux Kernel Network Developers <netdev@vger.kernel.org>,\n\txeb@mail.ru, roopa <roopa@cumulusnetworks.com>, equinox@diac24.net","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1777956,"web_url":"http://patchwork.ozlabs.org/comment/1777956/","msgid":"<201710010639.1ivwIcuJ%fengguang.wu@intel.com>","list_archive_url":null,"date":"2017-09-30T23:03:26","subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","submitter":{"id":67315,"url":"http://patchwork.ozlabs.org/api/people/67315/","name":"kernel test robot","email":"lkp@intel.com"},"content":"Hi Amine,\n\n[auto build test ERROR on net/master]\n[also build test ERROR on v4.14-rc2 next-20170929]\n[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]\n\nurl:    https://github.com/0day-ci/linux/commits/Amine-Kherbouche/expose-stack-entry-function/20171001-013434\nconfig: x86_64-rhel (attached as .config)\ncompiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901\nreproduce:\n        # save the attached .config to linux build tree\n        make ARCH=x86_64 \n\nAll errors (new ones prefixed by >>):\n\n>> ERROR: \"mpls_forward\" [net/ipv4/gre.ko] undefined!\n\n---\n0-DAY kernel test infrastructure                Open Source Technology Center\nhttps://lists.01.org/pipermail/kbuild-all                   Intel Corporation","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y4PBp5Qj8z9sRm\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun,  1 Oct 2017 10:04:34 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751375AbdI3XEV (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 30 Sep 2017 19:04:21 -0400","from mga01.intel.com ([192.55.52.88]:52513 \"EHLO mga01.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751202AbdI3XEU (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tSat, 30 Sep 2017 19:04:20 -0400","from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Sep 2017 16:04:19 -0700","from bee.sh.intel.com (HELO bee) ([10.239.97.14])\n\tby orsmga001.jf.intel.com with ESMTP; 30 Sep 2017 16:04:17 -0700","from kbuild by bee with local (Exim 4.84_2)\n\t(envelope-from <fengguang.wu@intel.com>)\n\tid 1dyQt1-000FaY-QX; Sun, 01 Oct 2017 07:09:31 +0800"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,460,1500966000\"; \n\td=\"gz'50?scan'50,208,50\";a=\"1177373796\"","Date":"Sun, 1 Oct 2017 07:03:26 +0800","From":"kbuild test robot <lkp@intel.com>","To":"Amine Kherbouche <amine.kherbouche@6wind.com>","Cc":"kbuild-all@01.org, netdev@vger.kernel.org, xeb@mail.ru,\n\troopa@cumulusnetworks.com, amine.kherbouche@6wind.com, equinox@diac24.net","Subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","Message-ID":"<201710010639.1ivwIcuJ%fengguang.wu@intel.com>","MIME-Version":"1.0","Content-Type":"multipart/mixed; boundary=\"h31gzZEtNLTqOjlF\"","Content-Disposition":"inline","In-Reply-To":"<2e611d0f6e0c39ff54bfe464cdf9cf6eeb7843e1.1506590878.git.amine.kherbouche@6wind.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-SA-Exim-Connect-IP":"<locally generated>","X-SA-Exim-Mail-From":"fengguang.wu@intel.com","X-SA-Exim-Scanned":"No (on bee); SAEximRunCond expanded to false","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1777963,"web_url":"http://patchwork.ozlabs.org/comment/1777963/","msgid":"<201710010824.LswZOaKh%fengguang.wu@intel.com>","list_archive_url":null,"date":"2017-10-01T00:17:17","subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","submitter":{"id":67315,"url":"http://patchwork.ozlabs.org/api/people/67315/","name":"kernel test robot","email":"lkp@intel.com"},"content":"Hi Amine,\n\n[auto build test ERROR on net/master]\n[also build test ERROR on v4.14-rc2 next-20170929]\n[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]\n\nurl:    https://github.com/0day-ci/linux/commits/Amine-Kherbouche/expose-stack-entry-function/20171001-013434\nconfig: i386-randconfig-sb0-10010708 (attached as .config)\ncompiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904\nreproduce:\n        # save the attached .config to linux build tree\n        make ARCH=i386 \n\nAll errors (new ones prefixed by >>):\n\n   net/mpls/af_mpls.o: In function `mpls_exit':\n>> af_mpls.c:(.exit.text+0x40): undefined reference to `ip_tunnel_encap_del_ops'\n   net/mpls/af_mpls.o: In function `mpls_init':\n>> af_mpls.c:(.init.text+0xb9): undefined reference to `ip_tunnel_encap_add_ops'\n\n---\n0-DAY kernel test infrastructure                Open Source Technology Center\nhttps://lists.01.org/pipermail/kbuild-all                   Intel Corporation","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y4QqN0Yx4z9sRg\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun,  1 Oct 2017 11:17:51 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751467AbdJAARt (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 30 Sep 2017 20:17:49 -0400","from mga02.intel.com ([134.134.136.20]:20278 \"EHLO mga02.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750988AbdJAARt (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tSat, 30 Sep 2017 20:17:49 -0400","from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 Sep 2017 17:17:47 -0700","from bee.sh.intel.com (HELO bee) ([10.239.97.14])\n\tby fmsmga001.fm.intel.com with ESMTP; 30 Sep 2017 17:17:46 -0700","from kbuild by bee with local (Exim 4.84_2)\n\t(envelope-from <fengguang.wu@intel.com>)\n\tid 1dyS28-000Ev2-MU; Sun, 01 Oct 2017 08:23:00 +0800"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,461,1500966000\"; \n\td=\"gz'50?scan'50,208,50\";a=\"1200846413\"","Date":"Sun, 1 Oct 2017 08:17:17 +0800","From":"kbuild test robot <lkp@intel.com>","To":"Amine Kherbouche <amine.kherbouche@6wind.com>","Cc":"kbuild-all@01.org, netdev@vger.kernel.org, xeb@mail.ru,\n\troopa@cumulusnetworks.com, amine.kherbouche@6wind.com, equinox@diac24.net","Subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","Message-ID":"<201710010824.LswZOaKh%fengguang.wu@intel.com>","MIME-Version":"1.0","Content-Type":"multipart/mixed; boundary=\"yrj/dFKFPuw6o+aM\"","Content-Disposition":"inline","In-Reply-To":"<2e611d0f6e0c39ff54bfe464cdf9cf6eeb7843e1.1506590878.git.amine.kherbouche@6wind.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-SA-Exim-Connect-IP":"<locally generated>","X-SA-Exim-Mail-From":"fengguang.wu@intel.com","X-SA-Exim-Scanned":"No (on bee); SAEximRunCond expanded to false","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}},{"id":1779992,"web_url":"http://patchwork.ozlabs.org/comment/1779992/","msgid":"<56c97234-a284-53ac-ae2a-55ba07e247ec@6wind.com>","list_archive_url":null,"date":"2017-10-04T17:03:22","subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","submitter":{"id":72147,"url":"http://patchwork.ozlabs.org/api/people/72147/","name":"Amine Kherbouche","email":"amine.kherbouche@6wind.com"},"content":"On 09/29/2017 06:11 AM, Tom Herbert wrote:\n>> > @@ -122,6 +125,30 @@ int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,\n>> >  }\n>> >  EXPORT_SYMBOL(gre_parse_header);\n>> >\n>> > +#if IS_ENABLED(CONFIG_MPLS)\n>> > +int mpls_gre_rcv(struct sk_buff *skb, int gre_hdr_len)\n>> > +{\n>> > +       if (unlikely(!pskb_may_pull(skb, gre_hdr_len)))\n>> > +               goto drop;\n>> > +\n>> > +       /* Pop GRE hdr and reset the skb */\n>> > +       skb_pull(skb, gre_hdr_len);\n>> > +       skb_reset_network_header(skb);\n>> > +\n> I don't see why MPLS/GRE needs to be a special case in gre_rcv. Can't\n> we just follow the normal processing patch which calls the proto ops\n> handler for the protocol in the GRE header? Also, if protocol specific\n> code is added to rcv function that most likely means that we need to\n> update the related offloads also (grant it that MPLS doesn't support\n> GRO but it looks like it supports GSO). Additionally, we'd need to\n> consider if flow dissector needs a similar special case (I will point\n> out that my recently posted patches there eliminated TEB as the one\n> special case in GRE dissection).\n>\n> Thanks,\n> Tom\n\nHi Tom,\n\nThanks for the feedback, I think this is the best way to do it, I'll do \na v6 asap.\n\nRegards,\nAmine","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=6wind-com.20150623.gappssmtp.com\n\theader.i=@6wind-com.20150623.gappssmtp.com\n\theader.b=\"zvbllZIf\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y6j0V33hVz9sPt\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu,  5 Oct 2017 04:03:38 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751296AbdJDRDf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 4 Oct 2017 13:03:35 -0400","from mail-wm0-f53.google.com ([74.125.82.53]:47104 \"EHLO\n\tmail-wm0-f53.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751240AbdJDRDe (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 4 Oct 2017 13:03:34 -0400","by mail-wm0-f53.google.com with SMTP id t69so24090089wmt.2\n\tfor <netdev@vger.kernel.org>; Wed, 04 Oct 2017 10:03:33 -0700 (PDT)","from [10.16.0.135] (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\ty8sm14554183edb.86.2017.10.04.10.03.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 04 Oct 2017 10:03:31 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=vbBY5pJ2k3gTSaI4ekT+7evaPS+YN9uhzJSptQ8YZDI=;\n\tb=zvbllZIfr1xwrh5aA+4PP5Vt24aQk+Rqghg8pWCDY5udagTVPikIrsMhIfnwZtsecp\n\tQyLuUCmzrgDm7H1jWAZqVJYwjye4fQZNE61PZqfcsGJOd6AqcyOZ4SJqVZNnXi0Rhrao\n\tinquGVTu9qfbIAg/wQnBirbVwEvRFXTDVXKTz1VI51e3HDbc+Zyok8e/dui4G7x3MUEb\n\tr7638ZecPEpyrIpUoyiFxnkIogwd0iNafEOwMe/aT6L5dcpwlpm2Aq0FVIfr5rnngDTk\n\tMguiUa1Na35U2s2zvQjKSBLs1lwdDJO95EyeKvbRb3yJcov/7uJvZhZ3bgEdzhlDRmZO\n\tbbqg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=vbBY5pJ2k3gTSaI4ekT+7evaPS+YN9uhzJSptQ8YZDI=;\n\tb=AlQQZj28Ug9yKgXfN/6MabtTeHCB5UWvleLTX1GYRwKl1/IPxjVBb9wNjBVmdlvJpz\n\tMgqtt3hUKgpH9ndNOfIgIS+mMeGDiHgBP8S3RGzl9kfyTteG/EcNnUn28f3tKqdtB7Ai\n\tdw43ouNAe/S74JLqV9LIrvY7SAV7bwH7C4XMy40L0hCHEkvc2J/rFgVA6qaomPz8a9kZ\n\tPgdaAIjtmzFyuL77L5iTXmnW+0WuTF7V2v24yZ296GAj07NY8ITPeL8bL6N/62pzaxOq\n\t9iOM6hW5Hix3XbNvEi+A0Brhb5mAUDosAd1aR47NIO/sbJDnqnsU7DMRFbMoz12N80qK\n\tMUSA==","X-Gm-Message-State":"AHPjjUjWK6mA+IlBnDRvkckTg2/Nc0598sqp1ZSh9M1/ZkbdEuM9H8yR\n\tCnXh4vnwzFCcZauLY2+NWtgYfD7xyS8=","X-Google-Smtp-Source":"AOwi7QAQI041AWDEqAbACiSaSgZ9gUsmQA0Q0sn5Q7EqDt0ITLUwDvlXL/bEBMYQ1bg1Fw9SfrSsDg==","X-Received":"by 10.80.182.183 with SMTP id d52mr29453904ede.199.1507136612922;\n\tWed, 04 Oct 2017 10:03:32 -0700 (PDT)","Subject":"Re: [PATCH v4 2/2] ip_tunnel: add mpls over gre encapsulation","To":"Tom Herbert <tom@herbertland.com>","References":"<cover.1506590878.git.amine.kherbouche@6wind.com>\n\t<2e611d0f6e0c39ff54bfe464cdf9cf6eeb7843e1.1506590878.git.amine.kherbouche@6wind.com>\n\t<CALx6S35b6gk39KOXTTzCFiz4S+JOOxcdJGB-+n3nx0x=xxVi8Q@mail.gmail.com>","Cc":"Linux Kernel Network Developers <netdev@vger.kernel.org>,\n\txeb@mail.ru, roopa <roopa@cumulusnetworks.com>, equinox@diac24.net","From":"Amine Kherbouche <amine.kherbouche@6wind.com>","Message-ID":"<56c97234-a284-53ac-ae2a-55ba07e247ec@6wind.com>","Date":"Wed, 4 Oct 2017 19:03:22 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.1.1","MIME-Version":"1.0","In-Reply-To":"<CALx6S35b6gk39KOXTTzCFiz4S+JOOxcdJGB-+n3nx0x=xxVi8Q@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]