From patchwork Thu Aug 24 15:10:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 805524 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=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ne5O3ks4"; 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 3xdSRg6bVGz9sNd for ; Fri, 25 Aug 2017 01:11:11 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 740A1B0C; Thu, 24 Aug 2017 15:10:35 +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 4B1D4A6E for ; Thu, 24 Aug 2017 15:10:32 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3F765153 for ; Thu, 24 Aug 2017 15:10:32 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id 189so4339842pgj.0 for ; Thu, 24 Aug 2017 08:10:32 -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:in-reply-to:references; bh=FYHdRzxaSJxtDHuBMqsiQvS/yatwvTh7L+4GBaQczNk=; b=ne5O3ks4d+Tz1LsuhrMZ02ucp4udxp3JQfl0N8Re+1x043uJaQgqbnyAp7PBsQ9Lq4 XT7tDqSDnoxBI136lZ8Phfrqo4pB/sU7NP7WswPUMwHE7ydr8JmTnMU6r5LhivExisLK c9QANhs8cCAgRUQqnLbxR+WKG/f+1fsx35IZT1U1r5WGU4Ls/CNxMKVQlKcZB/6XIVQn trCuel01xaY5x5s4Z3LbNuG7bIio70Sdp7GnG0hjSkl0wUXJtgM3fsYDRl1FjjRNCSCn /HEkY0aDg5AybeOPdlLQFfeQ1sFcc5VRcEQkrVT4y+al1joa1oUzqCP29OYIBMXOKpLV Jgjw== 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:in-reply-to :references; bh=FYHdRzxaSJxtDHuBMqsiQvS/yatwvTh7L+4GBaQczNk=; b=Wgf33qBg/huO7WiRLto+FhuWNCGw0gNJz3gF4uh95bEm6UJ2bf4bfL/rrN5AmmQpZA BYkEggK/5DpeyzESY0Zc7B9Op4eE8151+cRZCdt1AIIruMJKuWu/kaouknWZzgqBn45+ uM683YC0fgsoBInn+mmC/RJRX2RIQAIvjDRP8nm/vjGPnTNudaNz5ZTAohHLhTy6d5lw sTesRXyuESmiKheRoSz43YfaZB0J06UdVItHc0VLhxkgyaRY5AxDzA31+h8Wnwv7ejp5 Y1fnkhnF68SgNdlvWWqrKxcGfoxhv1c3o2ZvDrPTddEqr1QwYdBOCrKRqXLB/t/eboS+ eFkA== X-Gm-Message-State: AHYfb5iLGVaYUVJjFAxVXvBnUrAr3Wca5c9eJkyz22nK1LfT0pukypeK Qqfna94SgsZ+ajPe X-Received: by 10.101.90.194 with SMTP id d2mr6398917pgt.223.1503587431659; Thu, 24 Aug 2017 08:10:31 -0700 (PDT) Received: from gizo.domain (67-5-157-64.ptld.qwest.net. [67.5.157.64]) by smtp.gmail.com with ESMTPSA id f86sm8908586pff.89.2017.08.24.08.10.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 08:10:31 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Thu, 24 Aug 2017 08:10:22 -0700 Message-Id: <1503587426-18315-2-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1503587426-18315-1-git-send-email-gvrose8192@gmail.com> References: <1503587426-18315-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 2/6] datapath: Remove all references to SKB_GSO_UDP. 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 Upstream commit: commit 880388aa3c07fdea4f9b85e35641753017b1852f Author: David S. Miller Date: Mon Jul 3 07:29:12 2017 -0700 net: Remove all references to SKB_GSO_UDP. Such packets are no longer possible. Signed-off-by: David S. Miller SKB_GSO_UDP is removed in the upstream kernel. Use HAVE_SKB_GSO_UDP define from acinclude to detect if SKB_GSO_UDP exists and if so apply openvswitch section of this upstream patch. Signed-off-by: Greg Rose --- datapath/flow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/datapath/flow.c b/datapath/flow.c index c4f63b0..599b4e5 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -589,8 +589,12 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key) key->ip.frag = OVS_FRAG_TYPE_LATER; return 0; } +#ifdef HAVE_SKB_GSO_UDP if (nh->frag_off & htons(IP_MF) || skb_shinfo(skb)->gso_type & SKB_GSO_UDP) +#else + if (nh->frag_off & htons(IP_MF)) +#endif key->ip.frag = OVS_FRAG_TYPE_FIRST; else key->ip.frag = OVS_FRAG_TYPE_NONE; @@ -707,9 +711,11 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key) if (key->ip.frag == OVS_FRAG_TYPE_LATER) return 0; +#ifdef HAVE_SKB_GSO_UDP if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP) key->ip.frag = OVS_FRAG_TYPE_FIRST; +#endif /* Transport layer. */ if (key->ip.proto == NEXTHDR_TCP) { if (tcphdr_ok(skb)) {