From patchwork Thu Jul 21 18:14:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 651359 X-Patchwork-Delegate: pshelar@ovn.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rwMQ12p3kz9sxS for ; Fri, 22 Jul 2016 04:15:05 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 3491F10C61; Thu, 21 Jul 2016 11:14:41 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 6459C10C5F for ; Thu, 21 Jul 2016 11:14:38 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id C59401E00DD for ; Thu, 21 Jul 2016 12:14:37 -0600 (MDT) X-ASG-Debug-ID: 1469124877-09eadd5bd3161e10001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar5.cudamail.com with ESMTP id 36CQYlzncAe2fJI6 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 21 Jul 2016 12:14:37 -0600 (MDT) X-Barracuda-Envelope-From: cascardo@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 21 Jul 2016 18:14:37 -0000 Received-SPF: pass (mx3-pf2.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 651A6796EA for ; Thu, 21 Jul 2016 18:14:36 +0000 (UTC) Received: from indiana.gru.redhat.com (ovpn-116-65.phx2.redhat.com [10.3.116.65]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6LIEQih019357 for ; Thu, 21 Jul 2016 14:14:35 -0400 X-CudaMail-Envelope-Sender: cascardo@redhat.com From: Thadeu Lima de Souza Cascardo To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-720035120 X-CudaMail-DTE: 072116 X-CudaMail-Originating-IP: 209.132.183.28 Date: Thu, 21 Jul 2016 15:14:15 -0300 X-ASG-Orig-Subj: [##CM-V2-720035120##][PATCH 4/6] datapath: remove rpl_ipv6_skip_exthdr Message-Id: <1469124857-30036-5-git-send-email-cascardo@redhat.com> In-Reply-To: <1469124857-30036-1-git-send-email-cascardo@redhat.com> References: <1469124857-30036-1-git-send-email-cascardo@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 21 Jul 2016 18:14:36 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1469124877 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 4/6] datapath: remove rpl_ipv6_skip_exthdr X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" This backported functon was only used for Linux 3.2 or older. As we support only Linux 3.10 or newer, there is no need for it anymore. Signed-off-by: Thadeu Lima de Souza Cascardo --- datapath/linux/compat/exthdrs_core.c | 46 -------------------------------- datapath/linux/compat/include/net/ipv6.h | 6 ----- 2 files changed, 52 deletions(-) diff --git a/datapath/linux/compat/exthdrs_core.c b/datapath/linux/compat/exthdrs_core.c index 6692ce3..697f9d0 100644 --- a/datapath/linux/compat/exthdrs_core.c +++ b/datapath/linux/compat/exthdrs_core.c @@ -2,52 +2,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) -int rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start, - u8 *nexthdrp, __be16 *frag_offp) -{ - u8 nexthdr = *nexthdrp; - - *frag_offp = 0; - - while (ipv6_ext_hdr(nexthdr)) { - struct ipv6_opt_hdr _hdr, *hp; - int hdrlen; - - if (nexthdr == NEXTHDR_NONE) - return -1; - hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr); - if (hp == NULL) - return -1; - if (nexthdr == NEXTHDR_FRAGMENT) { - __be16 _frag_off, *fp; - fp = skb_header_pointer(skb, - start+offsetof(struct frag_hdr, - frag_off), - sizeof(_frag_off), - &_frag_off); - if (fp == NULL) - return -1; - - *frag_offp = *fp; - if (ntohs(*frag_offp) & ~0x7) - break; - hdrlen = 8; - } else if (nexthdr == NEXTHDR_AUTH) - hdrlen = (hp->hdrlen+2)<<2; - else - hdrlen = ipv6_optlen(hp); - - nexthdr = hp->nexthdr; - start += hdrlen; - } - - *nexthdrp = nexthdr; - return start; -} -EXPORT_SYMBOL_GPL(rpl_ipv6_skip_exthdr); -#endif /* Kernel version < 3.3 */ - #ifndef HAVE_IP6_FH_F_SKIP_RH /* * find the offset to specified header or the protocol number of last header diff --git a/datapath/linux/compat/include/net/ipv6.h b/datapath/linux/compat/include/net/ipv6.h index dbb66e1..48a307a 100644 --- a/datapath/linux/compat/include/net/ipv6.h +++ b/datapath/linux/compat/include/net/ipv6.h @@ -9,12 +9,6 @@ #define NEXTHDR_SCTP 132 /* Stream Control Transport Protocol */ #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) -#define ipv6_skip_exthdr rpl_ipv6_skip_exthdr -extern int rpl_ipv6_skip_exthdr(const struct sk_buff *skb, int start, - u8 *nexthdrp, __be16 *frag_offp); -#endif - #ifndef HAVE_IP6_FH_F_SKIP_RH enum {