From patchwork Thu Dec 28 04:35:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wenxu X-Patchwork-Id: 853306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 3z6cVc5nxXz9s71 for ; Thu, 28 Dec 2017 15:41:10 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 870AD504; Thu, 28 Dec 2017 04:41:06 +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 0D613491 for ; Thu, 28 Dec 2017 04:41:05 +0000 (UTC) X-Greylist: delayed 00:05:21 by SQLgrey-1.7.6 Received: from m97138.mail.qiye.163.com (m97138.mail.qiye.163.com [220.181.97.138]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 82577424 for ; Thu, 28 Dec 2017 04:41:03 +0000 (UTC) Received: from localhost.localdomain (unknown [123.59.132.129]) by smtp9 (Coremail) with SMTP id u+CowACH3jKbdERaR8V6AA--.113S2; Thu, 28 Dec 2017 12:35:39 +0800 (CST) From: wenxu@ucloud.cn To: dev@openvswitch.org Date: Thu, 28 Dec 2017 12:35:37 +0800 Message-Id: <1514435737-1861-1-git-send-email-wenxu@ucloud.cn> X-Mailer: git-send-email 1.8.3.1 X-CM-TRANSID: u+CowACH3jKbdERaR8V6AA--.113S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU2qXdDUUUU X-Originating-IP: [123.59.132.129] X-CM-SenderInfo: xzhq53w6xfz0lxgou0/1tbicBu8KFlZtBgikAAAsh X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] gre: strip gre-tso offload flags 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 From: wenxu if the gro enable, ipgre receive a gre-tso package. After pop the gre-tunnel the encapsulation and GSO_ENCAP flags should be striped. or the packet encap again and will be dropped in ovs_iptunnel_handle_offloads Signed-off-by: wenxu --- datapath/linux/compat/ip_gre.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 03c5435..94fdaa9 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -140,6 +140,8 @@ static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi) __be64 tun_id; int err; + if (iptunnel_pull_offloads(skb)) + return PACKET_REJECT; skb_pop_mac_header(skb); flags = tpi->flags & (TUNNEL_CSUM | TUNNEL_KEY);