From patchwork Thu Oct 31 22:46:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1187698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="e1UHJ2qv"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4740mP1VqPz9sR1 for ; Fri, 1 Nov 2019 09:46:12 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E5562DBE; Thu, 31 Oct 2019 22:46:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id A6BC0BB3 for ; Thu, 31 Oct 2019 22:46:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5ECC28A7 for ; Thu, 31 Oct 2019 22:46:08 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id e4so5097179pgs.1 for ; Thu, 31 Oct 2019 15:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ydr4DJ4Bv9NAR+2L9N+RRMm/Kt3W/9xoLD04JrldaIY=; b=e1UHJ2qvkQWP93j/qiG8ogaiLUK1CRQSj2hSSRr38/JDULVV4ut5HAdZeY8y9sulIV /HVenfTuLQT4XHigTHjLSGNvAmKHZhsOo7OdrI1GFLhcMSWZ9Orsfuf10LRK3YSe0sg6 afUiiD45QBihfJxK/2/EtVx1Rsnv1i2ol/uoFbOGJmbN4vLev0TErYSt0cocsG321fty ghsilLeTCFDu4tWJkkYQGSXS6KpW+iDTWIwJ0Pfg9KUhwAk6XAAzrppFdR13R/c/5QH8 khorZORhn+Gwb3sJMXzXCRFNPl4hTeXj0rHq1PgAc7a40/SyVZGsI/ToRT2P5d8e516c 2NOA== 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=ydr4DJ4Bv9NAR+2L9N+RRMm/Kt3W/9xoLD04JrldaIY=; b=TZeWi4pCYBU4AJ5s6vZ6aWnAFsTcCp69BxuiyUcXzbhiIIpNFZXKnaorQJWds7mNLG 5UVOG+f7CBUBQX2TS8Z6oPrkFnmLP9dcNbic8bCjO+kAmLzf1xUb3PKRDD/wAmwITBvT 1ViwriEvOCYfTtqbRNSxZM2ZmK/u3aX+lJbQpcTAN/6lTuI9qXoryKnmIhB/gc9PmBuW qWdyQkBBROfzACLXLhjbbbHMiy6bKQ71wFc2OXamySC9CsCbeE01N8nOqP4uMPBqqUIe msLDNx595reUODO9uuT3GlAD72rLG6RP3oKBrijAWIEVvs4wQFMWX6uHfEppeQfnKXPt 3m1Q== X-Gm-Message-State: APjAAAVLrbyNkNNJxO77lfsDgDzOmlXtSsl6ZOfYU9RzKzDcpmgIGKkV IhH/jimY2cpHYP8XcuFJPt+LO+1jc8o= X-Google-Smtp-Source: APXvYqxysgI6qTobGU86N+XLZsTVWz6BSZWBeuS/0Yz3upciMFRP70YNeaVfAc7mdgZZgRQsFKjX+w== X-Received: by 2002:a17:90a:eb02:: with SMTP id j2mr10784422pjz.80.1572561967386; Thu, 31 Oct 2019 15:46:07 -0700 (PDT) Received: from gizo.domain (97-115-74-198.ptld.qwest.net. [97.115.74.198]) by smtp.gmail.com with ESMTPSA id a8sm4318076pfc.20.2019.10.31.15.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Oct 2019 15:46:06 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Thu, 31 Oct 2019 15:46:04 -0700 Message-Id: <1572561964-11244-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] ip_gre: Remove even more unused code X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org There is a confusing mix of ipgre and gretap functions with some needed for gretap still having ipgre_ prefixes. This time though I think I got the rest of the unused ipgre code. Fixes: d5822f428814 ("gre: Remove dead ipgre code") Signed-off-by: Greg Rose --- datapath/linux/compat/ip_gre.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 3b7e607..8536241 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -922,44 +922,6 @@ static int erspan_tunnel_init(struct net_device *dev) return ip_tunnel_init(dev); } -static int ipgre_header(struct sk_buff *skb, struct net_device *dev, - unsigned short type, - const void *daddr, const void *saddr, unsigned int len) -{ - struct ip_tunnel *t = netdev_priv(dev); - struct iphdr *iph; - struct gre_base_hdr *greh; - - iph = (struct iphdr *)__skb_push(skb, t->hlen + sizeof(*iph)); - greh = (struct gre_base_hdr *)(iph+1); - greh->flags = gre_tnl_flags_to_gre_flags(t->parms.o_flags); - greh->protocol = htons(type); - - memcpy(iph, &t->parms.iph, sizeof(struct iphdr)); - - /* Set the source hardware address. */ - if (saddr) - memcpy(&iph->saddr, saddr, 4); - if (daddr) - memcpy(&iph->daddr, daddr, 4); - if (iph->daddr) - return t->hlen + sizeof(*iph); - - return -(t->hlen + sizeof(*iph)); -} - -static int ipgre_header_parse(const struct sk_buff *skb, unsigned char *haddr) -{ - const struct iphdr *iph = (const struct iphdr *) skb_mac_header(skb); - memcpy(haddr, &iph->saddr, 4); - return 4; -} - -static const struct header_ops ipgre_header_ops = { - .create = ipgre_header, - .parse = ipgre_header_parse, -}; - static int ipgre_tunnel_init(struct net_device *dev) { struct ip_tunnel *tunnel = netdev_priv(dev);