From patchwork Mon Sep 11 21:10:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812616 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="Fn792nrl"; 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 3xrgZs3smwz9s8J for ; Tue, 12 Sep 2017 07:11:17 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 95DE4BFD; Mon, 11 Sep 2017 21:11:15 +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 4CF60BFD for ; Mon, 11 Sep 2017 21:11:14 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 24A19271 for ; Mon, 11 Sep 2017 21:11:14 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id g65so5168733pfe.1 for ; Mon, 11 Sep 2017 14:11:14 -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=cLOriGy/joL8MYl4vFtEcJGP66SpCfNiqeu7LW3J3lI=; b=Fn792nrlpzsC0Fd3i76xoWIOFa3RZBCmrNC4s0m4IKCfcrT39EJuNJCcXjBUXP47fx hVAD1A7CV2NesPkZvgWlXCO+c0DqCjpFn/ePxqIHyeB+kqn+393IH1NvIJjF+kYg5oTW EjW1DLvE2t6Ue1bdvyyvqbt3DGCW9kX9IFZKBWl19Y+2r9qNUP+NqeY4R/UVoFjWE3VG vtaj7o6ygI8TneHG5mgDammX4MefZuRMWNtHBe8Ir7btcrhSJhdJWQ2I/ZgtJWmeqmzP //L8/WvkD6ra/F5kNXrC7Mxx48u3XOytHo0ZYDAJO2Clamt+IVFrs0Q5wxsHHI/9I98w fcNQ== 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=cLOriGy/joL8MYl4vFtEcJGP66SpCfNiqeu7LW3J3lI=; b=dAmZ2mIwL+4IyrqOzPaBMbtBpmTFXg3PcLUwlvqL3cp9frETkYarNUoqSOHCKFbXf5 TvXTKQ+RTpke6w8+9TdzAw3VHaL7n3rLvfkIYeyPP/Ad2PwdrCcYSkfnpFefCG2sosYU bbe+4b6uypMMHmXX+sU0gqXyoALptymfs6ScNTnuqNxVbM7Kdzy6V05JoQHculT4XPx+ gjqOg5QysEQuVNkOIxJgjMOQCZ3qPwuyleZGaQtA3YqJqYzlUgy/jUrT0YlY4WvXBeWM M9W7ddbkNBadRkhzoikjST3+r0IFpbu8j66/migSDc2TA3A8GZ8p07eP9ehLcVflDAtj uIaA== X-Gm-Message-State: AHPjjUhe7XodrSF9A12GgtjUTv3hCmYYZzTBuL7XSbW8XYr8MhmbQa0Y e2AyY2Zk2hwnic8r X-Google-Smtp-Source: AOwi7QBM8hBK4+gZZcUfrZhzni7Ysh1xCLzAABCj1QgFyv/FDCfuV5R/lDBxqW1l14gxoAqtVusBqQ== X-Received: by 10.159.253.152 with SMTP id q24mr75227pls.166.1505164273364; Mon, 11 Sep 2017 14:11:13 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:12 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:10:54 -0700 Message-Id: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 01/16] acinclude: Check for 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 Removed in kernel 4.13 Signed-off-by: Greg Rose --- acinclude.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index aeb594a..0e98ade 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -767,6 +767,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [OVS_DEFINE([HAVE_VXLAN_DEV_CFG])]) OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h], [nf_conntrack_helper_put]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h],[SKB_GSO_UDP], + [OVS_DEFINE([HAVE_SKB_GSO_UDP])]) + if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then From patchwork Mon Sep 11 21:10:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812617 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="a29L3spx"; 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 3xrgbV3w1Zz9s8J for ; Tue, 12 Sep 2017 07:11:50 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 92A6BCA8; Mon, 11 Sep 2017 21:11:17 +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 D73A7C8F for ; Mon, 11 Sep 2017 21:11:15 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 799CEA4 for ; Mon, 11 Sep 2017 21:11:15 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id h4so5399593pfk.0 for ; Mon, 11 Sep 2017 14:11:15 -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=a29L3spxgx22/ehF9qWHQTaIrAtrmS06BOwtxK8GTMUetjHroiUteuCZ9T1uEy1c+r rEZP0avN0I9ev0sb3dlDQ6kd0P1VjKPbDpxagJ1fboB7pCfv01YcGn32876Fq0aJrMK/ uWl8hFEq01ctSTUyhxQjgdepjgF/4VJhCMSuxZYBQ8OYXgkSUQcQO31PFSD4bpgA8F4e cKRvi8BR4zyti5IsuBEPsV+HfSGbgeRkycQdnxgi+fCzBJmBNE6xWiFBykM6baUpcQ8I CoVazPXmzB3e4HtU0AFhuibX2pXj4V+5FJxG7NnsUDyApJ7ofnYyJWoFA26qkxg/waa6 lEcQ== 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=YvWYy6dJHprornYWWS0/x52XdQwdOCaV2WpWu1iUMNiktXPuPrpo63I2ussQAO48Pi UeZPowUPTCTqlHK7aUlYQdhb4zvoyVV7y6Zx5CWI/Pdq5tdHxdEzYFf6wwzwjkhzs8QE 47nzHP/77JggjLp7W6MzHbnBvmZwaV0VjeNLxBwZrG1X42dshhvE+wcwvJw/G/vy6+iW jtY4siW1eQuAATY10/nDG9kp0kizTbRjI0vJuBJFYWCXTCLbjA6Klsz058OFmYoLLutI gGuhjsw+fI/o79xmcKccOknpCWaDdqFg6s1Crzk5OgsJ2uA55OYZnhqcV368UbZnfOdk uf9A== X-Gm-Message-State: AHPjjUiCfMmFEws0nTjhLaZ/ovWIkVFJWkYRZDzrT+QIJrL4k4SpPQQ2 b/PRz8NuTNIcKPWD X-Google-Smtp-Source: ADKCNb6/JQ+8th3Sw+CISv5J8oQxFWyjfIxMnQaS5T5IVT6+rhII3+y8i0/igSiCtn7FlyxFSYMV6A== X-Received: by 10.159.246.12 with SMTP id b12mr14478996pls.58.1505164274740; Mon, 11 Sep 2017 14:11:14 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:13 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:10:55 -0700 Message-Id: <1505164269-9455-2-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 02/16] 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)) { From patchwork Mon Sep 11 21:10:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812619 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="ZTkPiuEB"; 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 3xrgcT130Nz9s8J for ; Tue, 12 Sep 2017 07:12:41 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B77F6CAC; Mon, 11 Sep 2017 21:11:19 +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 38DB9C82 for ; Mon, 11 Sep 2017 21:11:17 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 099CAD3 for ; Mon, 11 Sep 2017 21:11:16 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id v82so5195958pgb.1 for ; Mon, 11 Sep 2017 14:11:16 -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=yHqpAVnwZ5598nsvJT24Ki7ePIntNOD9TQ05S8Hu91s=; b=ZTkPiuEBUzKFzZkkEYnzhbjozjgHrex/UGUKgBWu356ZfuCX5+Glg+RQRhCCC7CpME EiNaM0eXLX4qS93upUfmF3nVjsUR9ASZQZxKr5jgLC92nhZ5ZMEGTMRXJ1JMQMgXT5p2 tpZSuhsXF2RPQN8F9Ceco88dgEYI3IIXk1JSPV5u1Y96FcXILyxJEPn/HfGUdmLrteNh v3SfApZkwXlPtt2Buv2Suk+QnY0EOZYcScugEYOaNSvUea7ATsPzNBQPmr053TItsvgM Ke5CdWz9Bzh9xWq/pAzDTG1hN5FnUp97rWXIRXJPGNgMbbSMNKYFaJGBKDn24ytvI41O gcyQ== 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=yHqpAVnwZ5598nsvJT24Ki7ePIntNOD9TQ05S8Hu91s=; b=j+sd7hN3D23ktlPn30OGYPnoi1UhI4sqiC0OglmfywRU9gwsrZP/QMTQw7py70dKJx 5woVpa8aBrASl2hTAp7UuSVfe+NcIDsb3q1vsaFYT2aMAejs88d0b9Eep3N7oJZl0fLm gi+f9EG6uvXKuBlLdRMN/7CNGxlMN69BRMSikxWsP8MQUX7vk4kblfzBtoAG+ghyyQe/ iixDi7QPFnDjsC7V+Cmxd0aYhxnIwx49/pFbr5hPvcNZRkKGIdaj8ktQHzxMTy/UlZ/8 J5nyq98M/m1yDz9ol29dATm+5RRFQ2zEbbrt2sk8i7zYUEBoyAG7hv6ImPFWT3bKt9qK IiWA== X-Gm-Message-State: AHPjjUj+BRLihA/UNdY7QCyv4ctcRfs2HwBFAF9KHjXqlm+3RQVYLBYS +28wHLthBuuezxZ1 X-Google-Smtp-Source: ADKCNb6q90Ft3GOCiVjSH05EBU0G1tqhb8K9ToR3L85RlRjd3R2VLhJ9ZHcjWKAJPgjPckRLFa6Bdw== X-Received: by 10.84.129.226 with SMTP id b89mr14709651plb.36.1505164276298; Mon, 11 Sep 2017 14:11:16 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:15 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:10:56 -0700 Message-Id: <1505164269-9455-3-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 03/16] datapath: Optimize updating for OvS flow_stats. 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 c57c054eb5b1ccf230c49f736f7a018fcbc3e952 Author: Tonghao Zhang Date: Mon Jul 17 23:28:05 2017 -0700 openvswitch: Optimize updating for OvS flow_stats. In the ovs_flow_stats_update(), we only use the node var to alloc flow_stats struct. But this is not a common case, it is unnecessary to call the numa_node_id() everytime. This patch is not a bugfix, but there maybe a small increase. Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller Signed-off-by: Greg Rose --- datapath/flow.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datapath/flow.c b/datapath/flow.c index 599b4e5..30e4d21 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -71,7 +71,6 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, const struct sk_buff *skb) { struct flow_stats *stats; - int node = numa_node_id(); int cpu = smp_processor_id(); int len = skb->len + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); @@ -107,7 +106,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, __GFP_THISNODE | __GFP_NOWARN | __GFP_NOMEMALLOC, - node); + numa_node_id()); if (likely(new_stats)) { new_stats->used = jiffies; new_stats->packet_count = 1; From patchwork Mon Sep 11 21:10:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812620 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="lsERN/cy"; 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 3xrgdB6Sp0z9sCZ for ; Tue, 12 Sep 2017 07:13:18 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B8D6ACB3; Mon, 11 Sep 2017 21:11:21 +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 DF302CB3 for ; Mon, 11 Sep 2017 21:11:19 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4CD30D3 for ; Mon, 11 Sep 2017 21:11:19 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id v5so5183674pgn.4 for ; Mon, 11 Sep 2017 14:11:19 -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 :mime-version:content-transfer-encoding; bh=/XSTG34Q8GxNSzWNs3owPR5+/APDMgxxJfnT4f3elck=; b=lsERN/cyW/XRjxBGu9AZVNTwNjHlra7E2mAe2PyxHk8psYeOfuQFOo8E78KkrXXimv Vod1U2mu+8qYKwdYJCijq4RzLL013Ys2FP8XVjZ46S/EtVCP4VDiV6UaK9uGVyEeXRl6 XDYUcw9crNVHDHQ+oAaTawEgBWVb+uZo2h1TVovjieOJrXWAwE4cKuD6aPC2fYQSKYV8 L2r01PVa8ML7BNXojZpa2wDq+KylfmQYE2LTFAO2PWN4r0bq6X4J27a0f4JktksnZXVP pRl6uxufTrIAddkTHuTM4yuNQJc+YlWgWTvKl8PVRNfdqbHS3OfRUiNdKfA3DaDtjB25 +GbA== 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:mime-version:content-transfer-encoding; bh=/XSTG34Q8GxNSzWNs3owPR5+/APDMgxxJfnT4f3elck=; b=bKtZSHRi3GFCrxZyhirD5k6wdby2/ErUpZy1JA6fx7geMRg0YcCT2n5octvX+fpgG4 L4dNGvWWT6+en+0uUmmRqvh5HlX2QvjCDSj7dKKzg5rpD3w5v34v4UvWD1sGLV/PMmst 4ZtNdIJxQh18OJwAjcgWazDlAJDORe2w4TWlDZD5pY4YWECU7PLc3arTffT0hkCP5osM bKuz1o37w7mdW6gyCNegziV+8uy4BCO+MxDqfgs8ndD3+KiOWKr9IA/iUw+NZ/OPC7nl oZSUdz63deVG+LR6w2XSnj2gO8pXSGSQQSxAovG70+cQ5ejlFkxE2p2LcoBT9UJX7uNq uc1A== X-Gm-Message-State: AHPjjUjgPtguxMuldmP7MjJHBPsnmcHEt+D3xTpPxBKQkJGExiQeGFMA N1HSm2tutMuQAVgy X-Google-Smtp-Source: ADKCNb7nYbijSM8g8W+h/1ykKGFowFtclLuw1J+2Usb2W2KLtso69Hludq7VLohIIi4Tt/XM9cx2Og== X-Received: by 10.84.229.8 with SMTP id b8mr15059400plk.405.1505164277848; Mon, 11 Sep 2017 14:11:17 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:16 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:10:57 -0700 Message-Id: <1505164269-9455-4-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 04/16] datapath: Optimize operations for OvS flow_stats. 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: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Upstream commit: commit c4b2bf6b4a35348fe6d1eb06928eb68d7b9d99a9 Author: Tonghao Zhang Date: Mon Jul 17 23:28:06 2017 -0700 openvswitch: Optimize operations for OvS flow_stats. When calling the flow_free() to free the flow, we call many times (cpu_possible_mask, eg. 128 as default) cpumask_next(). That will take up our CPU usage if we call the flow_free() frequently. When we put all packets to userspace via upcall, and OvS will send them back via netlink to ovs_packet_cmd_execute(will call flow_free). The test topo is shown as below. VM01 sends TCP packets to VM02, and OvS forward packtets. When testing, we use perf to report the system performance. VM01 --- OvS-VM --- VM02 Without this patch, perf-top show as below: The flow_free() is 3.02% CPU usage. 4.23% [kernel] [k] _raw_spin_unlock_irqrestore 3.62% [kernel] [k] __do_softirq 3.16% [kernel] [k] __memcpy 3.02% [kernel] [k] flow_free 2.42% libc-2.17.so [.] __memcpy_ssse3_back 2.18% [kernel] [k] copy_user_generic_unrolled 2.17% [kernel] [k] find_next_bit When applied this patch, perf-top show as below: Not shown on the list anymore. 4.11% [kernel] [k] _raw_spin_unlock_irqrestore 3.79% [kernel] [k] __do_softirq 3.46% [kernel] [k] __memcpy 2.73% libc-2.17.so [.] __memcpy_ssse3_back 2.25% [kernel] [k] copy_user_generic_unrolled 1.89% libc-2.17.so [.] _int_malloc 1.53% ovs-vswitchd [.] xlate_actions With this patch, the TCP throughput(we dont use Megaflow Cache + Microflow Cache) between VMs is 1.18Gbs/sec up to 1.30Gbs/sec (maybe ~10% performance imporve). This patch adds cpumask struct, the cpu_used_mask stores the cpu_id that the flow used. And we only check the flow_stats on the cpu we used, and it is unncessary to check all possible cpu when getting, cleaning, and updating the flow_stats. Adding the cpu_used_mask to sw_flow struct does’t increase the cacheline number. Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Signed-off-by: Greg Rose --- datapath/flow.c | 7 ++++--- datapath/flow.h | 2 ++ datapath/flow_table.c | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/datapath/flow.c b/datapath/flow.c index 30e4d21..5da7e3e 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -71,7 +71,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, const struct sk_buff *skb) { struct flow_stats *stats; - int cpu = smp_processor_id(); + unsigned int cpu = smp_processor_id(); int len = skb->len + (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0); stats = rcu_dereference(flow->stats[cpu]); @@ -116,6 +116,7 @@ void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, rcu_assign_pointer(flow->stats[cpu], new_stats); + cpumask_set_cpu(cpu, &flow->cpu_used_mask); goto unlock; } } @@ -143,7 +144,7 @@ void ovs_flow_stats_get(const struct sw_flow *flow, memset(ovs_stats, 0, sizeof(*ovs_stats)); /* We open code this to make sure cpu 0 is always considered */ - for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpu_possible_mask)) { + for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, &flow->cpu_used_mask)) { struct flow_stats *stats = rcu_dereference_ovsl(flow->stats[cpu]); if (stats) { @@ -167,7 +168,7 @@ void ovs_flow_stats_clear(struct sw_flow *flow) int cpu; /* We open code this to make sure cpu 0 is always considered */ - for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpu_possible_mask)) { + for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, &flow->cpu_used_mask)) { struct flow_stats *stats = ovsl_dereference(flow->stats[cpu]); if (stats) { diff --git a/datapath/flow.h b/datapath/flow.h index 07af912..0796b09 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -218,6 +219,7 @@ struct sw_flow { */ struct sw_flow_key key; struct sw_flow_id id; + struct cpumask cpu_used_mask; struct sw_flow_mask *mask; struct sw_flow_actions __rcu *sf_acts; struct flow_stats __rcu *stats[]; /* One for each CPU. First one diff --git a/datapath/flow_table.c b/datapath/flow_table.c index 6fe3739..47057a1 100644 --- a/datapath/flow_table.c +++ b/datapath/flow_table.c @@ -104,6 +104,8 @@ struct sw_flow *ovs_flow_alloc(void) RCU_INIT_POINTER(flow->stats[0], stats); + cpumask_set_cpu(0, &flow->cpu_used_mask); + return flow; err: kmem_cache_free(flow_cache, flow); @@ -147,7 +149,7 @@ static void flow_free(struct sw_flow *flow) if (flow->sf_acts) ovs_nla_free_flow_actions((struct sw_flow_actions __force *)flow->sf_acts); /* We open code this to make sure cpu 0 is always considered */ - for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, cpu_possible_mask)) + for (cpu = 0; cpu < nr_cpu_ids; cpu = cpumask_next(cpu, &flow->cpu_used_mask)) if (flow->stats[cpu]) kmem_cache_free(flow_stats_cache, rcu_dereference_raw(flow->stats[cpu])); From patchwork Mon Sep 11 21:10:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812621 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="ZqcG3csK"; 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 3xrgdv5N5nz9s8J for ; Tue, 12 Sep 2017 07:13:55 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E6967CBF; Mon, 11 Sep 2017 21:11:22 +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 83F26CB6 for ; Mon, 11 Sep 2017 21:11:20 +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 0BDECA4 for ; Mon, 11 Sep 2017 21:11:19 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id j16so2096404pga.2 for ; Mon, 11 Sep 2017 14:11:19 -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=0+aUV5igeT+9+FLHYM4g+qIb6RSjylqrQrjIkbzhqlA=; b=ZqcG3csK3cs+o6rZi+1bLu/6dmuLCKo8RE9TPKhn83pZZ1LwHeogD0IDAL1xO0rxPM u3RaYzftD3wPksML7n9GhkIOyUJ5ea+zNI0h7ZdVSuKZFLFFCGBxx3ixNoiPbVkCkiqu wkbyl0E5pVQKaVBVZXl4Aok96K82FlZjwBrZSfElGwaLHYsvfiMOeWySGQI9xQi0dSLc 5OVNw8IAB5VnQDwo6I/9FI/ZAx07V9x+dAqnQAWiYnqxUXdKIRJKlFSqhVRu2DJjfcCS LfSD/fE0qNRG5Q2cvbaotoq+sxrrbxNweLgUfxdHSUojfstf6ooMDRsKZGTQJrJ4vvdE bDcg== 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=0+aUV5igeT+9+FLHYM4g+qIb6RSjylqrQrjIkbzhqlA=; b=imDJEBq8YbKx+tvgqfRZFRW2z9VhHHUkYFdCiD2I3EgCCDnmJ8HS/RIcIFdbTZlTPQ Lu22MNLRr7R8wvx1XoWNhTz0jBlcAgPAr99jUjLx5//umMubcTAtgFUvnKD631AYqB4w Rb0dPGfSwBNu3GVGLfP8ig8t5RcWjd/jWJ25nLqoZu9y61Yzhbipmsx3SF8Ad6EEYQEJ QNTFLrQ7GwYqdHENUM6TMAfDZX126b+9HEO8P6ntEkibvcPqHqabif4X8L8gPBiLKo3I GcfjM3sQ2HZZwe9SmH6F6fAwwbCdZbLldADLdk1o2ZepUMh2C5mX633Q5wzwPO7fvLGU FrtQ== X-Gm-Message-State: AHPjjUicBCGphAclo0SSnqKDA/3R7OTvUa+6b4AGaloTINquy4JQYgOz 8bTWBqeNaGlLQ/dG X-Google-Smtp-Source: ADKCNb5/gCVfEvHPNF3+lcCSDmutGQa1UsXDdkPoU7FscOATqJptEW/aEDF8autdyFN3bkeDM8DVew== X-Received: by 10.99.165.88 with SMTP id r24mr12837914pgu.331.1505164279208; Mon, 11 Sep 2017 14:11:19 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:18 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:10:58 -0700 Message-Id: <1505164269-9455-5-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 05/16] datapath: Remove unnecessary newlines from OVS_NLERR uses 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 0ed80da518a1f27562a013f106505e495e891fe4 Author: Joe Perches Date: Fri Aug 11 04:26:26 2017 -0700 openvswitch: Remove unnecessary newlines from OVS_NLERR uses OVS_NLERR already adds a newline so these just add blank lines to the logging. Signed-off-by: Joe Perches Acked-by: Joe Stringer Signed-off-by: David S. Miller Signed-off-by: Greg Rose --- datapath/conntrack.c | 14 +++++--------- datapath/flow_netlink.c | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index b645ab1..d517a87 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1221,15 +1221,13 @@ static int parse_nat(const struct nlattr *attr, int type = nla_type(a); if (type > OVS_NAT_ATTR_MAX) { - OVS_NLERR(log, - "Unknown NAT attribute (type=%d, max=%d).\n", + OVS_NLERR(log, "Unknown NAT attribute (type=%d, max=%d)", type, OVS_NAT_ATTR_MAX); return -EINVAL; } if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) { - OVS_NLERR(log, - "NAT attribute type %d has unexpected length (%d != %d).\n", + OVS_NLERR(log, "NAT attribute type %d has unexpected length (%d != %d)", type, nla_len(a), ovs_nat_attr_lens[type][ip_vers]); return -EINVAL; @@ -1239,9 +1237,7 @@ static int parse_nat(const struct nlattr *attr, case OVS_NAT_ATTR_SRC: case OVS_NAT_ATTR_DST: if (info->nat) { - OVS_NLERR(log, - "Only one type of NAT may be specified.\n" - ); + OVS_NLERR(log, "Only one type of NAT may be specified"); return -ERANGE; } info->nat |= OVS_CT_NAT; @@ -1291,13 +1287,13 @@ static int parse_nat(const struct nlattr *attr, break; default: - OVS_NLERR(log, "Unknown nat attribute (%d).\n", type); + OVS_NLERR(log, "Unknown nat attribute (%d)", type); return -EINVAL; } } if (rem > 0) { - OVS_NLERR(log, "NAT attribute has %d unknown bytes.\n", rem); + OVS_NLERR(log, "NAT attribute has %d unknown bytes", rem); return -EINVAL; } if (!info->nat) { diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 9b48612..df9d88e 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -1257,7 +1257,7 @@ static int ovs_key_from_nlattrs(struct net *net, struct sw_flow_match *match, } if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) { - OVS_NLERR(log, "IPv6 flow label %x is out of range (max=%x).\n", + OVS_NLERR(log, "IPv6 flow label %x is out of range (max=%x)", ntohl(ipv6_key->ipv6_label), (1 << 20) - 1); return -EINVAL; } From patchwork Mon Sep 11 21:10:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812625 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="ewI7Zi/N"; 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 3xrgfb5rRRz9sCZ for ; Tue, 12 Sep 2017 07:14:31 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id DAF53CBD; Mon, 11 Sep 2017 21:11:23 +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 4B907CB6 for ; Mon, 11 Sep 2017 21:11:22 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 637B744F for ; Mon, 11 Sep 2017 21:11:21 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id f84so5398857pfj.3 for ; Mon, 11 Sep 2017 14:11:21 -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=VyC5nfaIBsQFXfPun5s8FCA08bl6efNI8b/Cc/PCfkY=; b=ewI7Zi/NjXabJQjAUQ/P7nY1fPb5VCFvoLz0zslayzZEhI/fINkcY4mwMJhY0LzR5t kykpp+711lcqXUK1gdGPRZR76YDV/Onfgxb3c3W7bF6sMDUUB9G7ZLfmFLejSRSobnFm 3B307fhRu2RZ/zOmJgVhdugGTVwrchqRgI22n28VKht+zFVAASbgH1UTwaf2Bjbdtmj9 56EcN4wbDRjmT9OWEYXHekn7hPC7Bfboiq4R/EVsqdXAGlKbnxfXFsBqp4FNPVJ/GXLL udc3k9MRwbFHRDGMnvJNK5n6CUTIPd2XdDRk04+ufBbWS7oXE2+paHpaCBmCXqo0s00m 8mRg== 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=VyC5nfaIBsQFXfPun5s8FCA08bl6efNI8b/Cc/PCfkY=; b=F/I1D9xmtUNmUMuYMVfN9Ykv+mICOloIWnwzjLAC1eR1Y/3DecdTHDMID8AxIEkhwd y4CbLW/17LjFVx8n4HNzHkuQ5RQqIqPXckFUm4HZ6vGLYgxcn88+lJGNdT2n13WCEhGL M6wTYa3MqLFZjzrYA9HOuG5Kn+luLy0kP/Bt784B31biBPBPcpLso7yWn5vmxyuB3MPJ lX37pFECVSq/gx3zhCwyOSVWLgEMoFA6VG4WB9lknRMG+oecCgAAR4BThmMXyETyxPjp f0mG2acEVXFpS89jjZdTJdrjadTh0TEXaSCZzKrqAiqYr6x1BPXJHLkuXTlj+WihTxmM oSow== X-Gm-Message-State: AHPjjUjbueohLUzJUW5ZMbHWhAy3YU6zYrrRW5KXcoqSlR70TYgKxNhp LeRc2pnYuGqT9iSX X-Google-Smtp-Source: ADKCNb41A+fnI56N0qFJYWTEQTRLWSsjeOag8mw4FRQUa8/U4MKbQ0J11vGGbene/rCp6hPlKFogiA== X-Received: by 10.99.104.67 with SMTP id d64mr12654850pgc.164.1505164280596; Mon, 11 Sep 2017 14:11:20 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:19 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:10:59 -0700 Message-Id: <1505164269-9455-6-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 06/16] datapath: fix skb_panic due to the incorrect actions attrlen 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 494bea39f3201776cdfddc232705f54a0bd210c4 Author: Liping Zhang Date: Wed Aug 16 13:30:07 2017 +0800 openvswitch: fix skb_panic due to the incorrect actions attrlen For sw_flow_actions, the actions_len only represents the kernel part's size, and when we dump the actions to the userspace, we will do the convertions, so it's true size may become bigger than the actions_len. But unfortunately, for OVS_PACKET_ATTR_ACTIONS, we use the actions_len to alloc the skbuff, so the user_skb's size may become insufficient and oops will happen like this: skbuff: skb_over_panic: text:ffffffff8148fabf len:1749 put:157 head: ffff881300f39000 data:ffff881300f39000 tail:0x6d5 end:0x6c0 dev: ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:129! [...] Call Trace: [] skb_put+0x43/0x44 [] skb_zerocopy+0x6c/0x1f4 [] queue_userspace_packet+0x3a3/0x448 [openvswitch] [] ovs_dp_upcall+0x30/0x5c [openvswitch] [] output_userspace+0x132/0x158 [openvswitch] [] ? ip6_rcv_finish+0x74/0x77 [ipv6] [] do_execute_actions+0xcc1/0xdc8 [openvswitch] [] ovs_execute_actions+0x74/0x106 [openvswitch] [] ovs_dp_process_packet+0xe1/0xfd [openvswitch] [] ? key_extract+0x63c/0x8d5 [openvswitch] [] ovs_vport_receive+0xa1/0xc3 [openvswitch] [...] Also we can find that the actions_len is much little than the orig_len: crash> struct sw_flow_actions 0xffff8812f539d000 struct sw_flow_actions { rcu = { next = 0xffff8812f5398800, func = 0xffffe3b00035db32 }, orig_len = 1384, actions_len = 592, actions = 0xffff8812f539d01c } So as a quick fix, use the orig_len instead of the actions_len to alloc the user_skb. Last, this oops happened on our system running a relative old kernel, but the same risk still exists on the mainline, since we use the wrong actions_len from the beginning. Fixes: ccea74457bbd ("openvswitch: include datapath actions with sampled-pac Cc: Neil McKee Signed-off-by: Liping Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Fixes: 0e469d3b380c ("datapath: Include datapath actions with sampled-packet upcall to userspace.") Signed-off-by: Greg Rose --- datapath/actions.c | 1 + datapath/datapath.c | 7 ++++--- datapath/datapath.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/datapath/actions.c b/datapath/actions.c index 59d91b2..ad18c2c 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -1348,6 +1348,7 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, goto out; } + OVS_CB(skb)->acts_origlen = acts->orig_len; err = do_execute_actions(dp, skb, key, acts->actions, acts->actions_len); diff --git a/datapath/datapath.c b/datapath/datapath.c index b565fc5..1780819 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -388,7 +388,7 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb, } static size_t upcall_msg_size(const struct dp_upcall_info *upcall_info, - unsigned int hdrlen) + unsigned int hdrlen, int actions_attrlen) { size_t size = NLMSG_ALIGN(sizeof(struct ovs_header)) + nla_total_size(hdrlen) /* OVS_PACKET_ATTR_PACKET */ @@ -405,7 +405,7 @@ static size_t upcall_msg_size(const struct dp_upcall_info *upcall_info, /* OVS_PACKET_ATTR_ACTIONS */ if (upcall_info->actions_len) - size += nla_total_size(upcall_info->actions_len); + size += nla_total_size(actions_attrlen); /* OVS_PACKET_ATTR_MRU */ if (upcall_info->mru) @@ -472,7 +472,8 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, else hlen = skb->len; - len = upcall_msg_size(upcall_info, hlen - cutlen); + len = upcall_msg_size(upcall_info, hlen - cutlen, + OVS_CB(skb)->acts_origlen); user_skb = genlmsg_new(len, GFP_ATOMIC); if (!user_skb) { err = -ENOMEM; diff --git a/datapath/datapath.h b/datapath/datapath.h index f20deed..70ad0ac 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -100,11 +100,13 @@ struct datapath { * when a packet is received by OVS. * @mru: The maximum received fragement size; 0 if the packet is not * fragmented. + * @acts_origlen: The netlink size of the flow actions applied to this skb. * @cutlen: The number of bytes from the packet end to be removed. */ struct ovs_skb_cb { struct vport *input_vport; u16 mru; + u16 acts_origlen; u32 cutlen; }; #define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb) From patchwork Mon Sep 11 21:11:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812628 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="huF7Z7pC"; 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 3xrggL484rz9s8J for ; Tue, 12 Sep 2017 07:15:10 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id F0B66CC8; Mon, 11 Sep 2017 21:11:25 +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 0D1E3CC4 for ; Mon, 11 Sep 2017 21:11:24 +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 C69E0A4 for ; Mon, 11 Sep 2017 21:11:23 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id i130so3190992pgc.0 for ; Mon, 11 Sep 2017 14:11:23 -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=tgkf12Ulg+rVemNIcsMd79J+NNsjh3ZLY1W5f6p1XsM=; b=huF7Z7pCba4qZzI0ReaqEoipSpJZutzMLrF0UIY4d4InSd9AHVDWwOmvIaN/n/xdm/ Js6DbGenVtCqjIUJX+eCN8rvxo1s7LuV3ynIFHdeIGeWCFveyTeWYI7h+SBfryESNVja p8cC5bGOFE9O1MrAx0ycDd8fdMmkwa84sxxzAlGazAA1oDKys9kcRykdA6AfeOKFYT7W TWwxZR/uUTBIc0VGMgD+L7g67ziV2a9Q5806hwVNuTDK4fF/uFFE9WacMu+F5VsbStfV p3AWYfkn28XPJ7kPeHCPstg9KZSvzttBBqa4RF2Ym/8b2fHRcM1TSMt53U10+1mJnuXi bWzA== 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=tgkf12Ulg+rVemNIcsMd79J+NNsjh3ZLY1W5f6p1XsM=; b=J9KQ3+DTbxOh776SeO250XpSK7aJJ2MVC1iJu/h5jUzM0BKGj+7jvVnIM+0ipm3s/3 +NTDx6/PRUHaS5L5y1je4olo19W25qwGWpfHxYhd6txc0uE8vwP4IfqKsCXDjc8MwGvN 2z1J3FN0XFZrX6iU+gd5d9rp0oz3xSDtqRUaCQhPej7kOxMhkbQdGZlRdqB1M8i7cZZe EOncLmAEz8V1tm2v9EVpKoUb3ku2xUqXQgt2NCTAiNeyCITCifPmXeMS8gFHLZ5IzC8d 6uo5P7HmSYqfwzfAg6R6LEFMnxe5qoXpiYCc5mdfA09qdH0/o08jTiJXQ+GjwfBYtHwC xC8Q== X-Gm-Message-State: AHPjjUhXyNwxOHLZm851CRuR4+bge92JNOBcRkBtC/vX6weZ5wlaLQ5l AXRYQrijlTplc1RU X-Google-Smtp-Source: ADKCNb5UxudyrFPPdEafD4L0BOth83a2WNJrsQBCdVneesAkZMYc6NuAA+zPqoPc99As1j5XpbYD0g== X-Received: by 10.99.119.133 with SMTP id s127mr13049910pgc.271.1505164283112; Mon, 11 Sep 2017 14:11:23 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:21 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:00 -0700 Message-Id: <1505164269-9455-7-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 07/16] acinclude: Add compat define for DST_NOCACHE 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 DST_NOCACHE is removed in the 4.13 Linux kernel - add check for it and if found set HAVE_DST_NOCACHE. Signed-off-by: Greg Rose --- acinclude.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 0e98ade..772ff03 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -769,6 +769,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [nf_conntrack_helper_put]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h],[SKB_GSO_UDP], [OVS_DEFINE([HAVE_SKB_GSO_UDP])]) + OVS_GREP_IFELSE([$KSRC/include/net/dst.h],[DST_NOCACHE], + [OVS_DEFINE([HAVE_DST_NOCACHE])]) if cmp -s datapath/linux/kcompat.h.new \ From patchwork Mon Sep 11 21:11:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812629 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="S981hRJh"; 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 3xrgh92Nm7z9s0Z for ; Tue, 12 Sep 2017 07:15:53 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 31E1CCCA; Mon, 11 Sep 2017 21:11:28 +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 D6BA8CC5 for ; Mon, 11 Sep 2017 21:11:25 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id A69C0A4 for ; Mon, 11 Sep 2017 21:11:25 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id i23so601056pfi.2 for ; Mon, 11 Sep 2017 14:11:25 -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=IKrdHeopdQgCSK5k/p82LIktc2ZAU+0pOt30MD1XmKM=; b=S981hRJhQWhw+C5DHblR22h7BpDxXCHTd9Dc+GL7LIcZhxtvkziffFB28B7t+tLjGR WEJtbF+mEwIxkY2dwlopA5ZtA7MY986SzE6iDT83TeSplWyD4e5SWCzlldUahzc++Fat AydbnQiHTrgw2IxcNs+SSFE3riZk9Ap1QAlwhxiNmYmHDh0fLLrjJc3Qkls1jENymFd4 6KhxoXhaSkf0cYrXjOy9SCrFM/OByVvONFIEP5v3UWWIe+AImavkQTsKgkPadeYJZ52z xTq3IxfdDwxO9qwBgXOX4QdiFv8tI0jXylzFNEVweHhr+RWtKYgxTRq44pdaCAzVY29h JM3A== 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=IKrdHeopdQgCSK5k/p82LIktc2ZAU+0pOt30MD1XmKM=; b=PcuaRKCU92rVOoZsrwf7Wsexy9EMBp+CfPsxcrEGHvwo2nQUIREZWehV/IxOF9uFyz M9cY9lYFC9363s2TMPXV9rWLL/NexbhoshnihOngiZc64PzOo8dc9oHZnHN4u0876ukh VM5w/NXYjDGlhG7+FMJbdUDGoGgZT4WKvQ7NdXn9f8I5fR4hthnMp1OYKFMYYimRM7KC f7Z5P7Ri8EfokFuFWzDbICfLmc1vrInJMBsNb80fmCKI1v+omcJbz3iaTmRNN3fCjNXP OwdOb3ksfAkFd9+PLdSsgS24UJfGcnARUOP9G/dWBf9yBdWY4lp8+q+eWWRDJ1+PsjM0 DNBw== X-Gm-Message-State: AHPjjUir31U+bvPqHVc/W3m0Clk/rQkSIBIFGVJFNN0DgDzD/QJl+loQ 3hF3bDv9pr5CZP7F X-Google-Smtp-Source: AOwi7QAXWnRP227yVgJwZQRl8CjCKuifdtVtdryqVfIlXz/1MEW8Dh9xG+u4uX4FF5aYIMie9krUnw== X-Received: by 10.98.153.198 with SMTP id t67mr503254pfk.62.1505164284580; Mon, 11 Sep 2017 14:11:24 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:23 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:01 -0700 Message-Id: <1505164269-9455-8-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 08/16] compat: Add check for DST_NOCACHE 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 DST_NOCACHE was removed from the Linux 4.13 kernel. Check if HAVE_DST_NOCACHE is defined for older kernels. Signed-off-by: Greg Rose --- datapath/linux/compat/include/net/ip6_fib.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/include/net/ip6_fib.h b/datapath/linux/compat/include/net/ip6_fib.h index 2c8a513..4d58375 100644 --- a/datapath/linux/compat/include/net/ip6_fib.h +++ b/datapath/linux/compat/include/net/ip6_fib.h @@ -27,7 +27,11 @@ static inline u32 rt6_get_cookie(const struct rt6_info *rt) { if (rt->rt6i_flags & RTF_PCPU || - (unlikely(rt->dst.flags & DST_NOCACHE) && rt->dst.from)) +#ifdef HAVE_DST_NOCACHE + (unlikely(rt->dst.flags & DST_NOCACHE) && rt->dst.from)) +#else + (unlikely(!list_empty(&rt->rt6i_uncached)) && rt->dst.from)) +#endif rt = (struct rt6_info *)(rt->dst.from); return rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; From patchwork Mon Sep 11 21:11:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812632 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="a370Pw2Y"; 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 3xrghp6729z9s0Z for ; Tue, 12 Sep 2017 07:16:26 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 1C91FCD6; Mon, 11 Sep 2017 21:11:29 +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 02373CC1 for ; Mon, 11 Sep 2017 21:11:28 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 11E95113 for ; Mon, 11 Sep 2017 21:11:26 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id d8so5189233pgt.3 for ; Mon, 11 Sep 2017 14:11:26 -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=/WbyF8asxOV/8GGGq0/som18GCYwLQ31DpieV4HUtds=; b=a370Pw2Y7O13JBYn6vQv4Xk9kpKY1lskBhG+w0+FfcToThwOeRUebB3Cp74aEo3OXe heC1LLW8ITUWnT+Qjx9Ism40Rdz761NW2snOl0l/GP3ejjDhI98VgLyk8H5+ealM7bYz 9U38/d46S3bRK/fSexA/BoEJik2Lkw6vzm354zbfUABsCxLUq0ftMjlj1qrO9ILAhrH7 ozNdlt8hwOTtct3dX2PMmHpy5+fu8TGEk6LETAffthAZZML19EK5QMbpu1xZpYnyzmrv ut10SwXSNG2Cr+hFs/LB9V/7UpgLUKikkETO55oA92YAGdp9o5ta+7DsdeuMQjEFgxJY lU+A== 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=/WbyF8asxOV/8GGGq0/som18GCYwLQ31DpieV4HUtds=; b=d9N7mAgWtgm3NCR4sExcirTQNnvS70Urw4aYXLARguyzB14w27BcVdoxdtFtjIhVbf V/69RdJa074ylb9TyHwbHGei4My5GZqzDmU7RgMn8SxnXVOmJBCy1YWjAQoNfXj6GCxZ IuCbALewdeGYkHsKG5QPiu9R1srMnxfLRZfBzcID04Nu9XYRQpgi8NebCLXSgwaHG/Fu 8yMfWsp62QyiMU38+tGT+uRgBWWvkkrL3hbUBoSWwfvsZXo2zMj7LDeDr8CIX17Ry9Hq 3pR7NwUTQw9EMg9M0e1+/qzYLms5gMqJswEuJ8RTbywdku0eTIHPXyCaTOE5CYiEb7QQ yRwQ== X-Gm-Message-State: AHPjjUjYjyp2NLBsl+S+/q9dGcgZ11SPsSEoanFNsHOv/ZAiwySAQ2BU HPtqmB3p9o5GlyTs X-Google-Smtp-Source: ADKCNb6eZvAJAd9bt0eci9MDjFdjzSoiJ92J/tcCX6FdWZhLYlR96vEf9/Svx5nf7gQetAw/CNj41Q== X-Received: by 10.84.131.103 with SMTP id 94mr7838768pld.302.1505164286380; Mon, 11 Sep 2017 14:11:26 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:25 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:02 -0700 Message-Id: <1505164269-9455-9-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 09/16] acinclude: Check for extended netlink ack presence 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 RTNL ops validate and newlink now include the extended netlink ack feature. Check for it and set HAVE_EXT_ACK_IN_RTNL_LINKOPS if found. Signed-off-by: Greg Rose --- acinclude.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 772ff03..577437f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -771,6 +771,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [OVS_DEFINE([HAVE_SKB_GSO_UDP])]) OVS_GREP_IFELSE([$KSRC/include/net/dst.h],[DST_NOCACHE], [OVS_DEFINE([HAVE_DST_NOCACHE])]) + OVS_FIND_FIELD_IFELSE([$KSRC/include/net/rtnetlink.h], [rtnl_link_ops], + [extack], + [OVS_DEFINE([HAVE_EXT_ACK_IN_RTNL_LINKOPS])]) if cmp -s datapath/linux/kcompat.h.new \ From patchwork Mon Sep 11 21:11:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812633 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="Pcf35ymw"; 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 3xrgjX0grmz9s0Z for ; Tue, 12 Sep 2017 07:17:04 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 25FF8CE0; Mon, 11 Sep 2017 21:11:31 +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 050CFCD4 for ; Mon, 11 Sep 2017 21:11:29 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AE2B4113 for ; Mon, 11 Sep 2017 21:11:28 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id i130so3191048pgc.0 for ; Mon, 11 Sep 2017 14:11:28 -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=Fp0jy2VWVzdGePQ9IHOwA0mTmBpFVj4rHwVBjorT0ss=; b=Pcf35ymwhcf5bpTUHWUXbwUI0v6HML5ukU1QIENZIZEXwiZopc3dLDVUOxkMlqShu1 bGNH7/8VzgfnkpdVfbbWhV6i5DZN5+vh6jyNPMrryEr24TOokcPqL60I648gg/ABgvx+ O8hhsB/kALbOiKoEGvUTN4pQyKeoFxPVoZwVi/rNTG+HygZj3uvpZFHWW1Iu1ay5rG9y xG6J0GV26GM0NTHuvdQ46i04E7UZsgHahwBusmsS0TZZvV76QKt+1wWZq7uvA6+C91Lt bDYth3kI9YjxGNVbE5g6ICowhigd5Hd9/DQ74FuBBLtdzagnskRr8FJJSdAodO453pNz ux+w== 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=Fp0jy2VWVzdGePQ9IHOwA0mTmBpFVj4rHwVBjorT0ss=; b=AlDv1upPWB7EUVEs44ynEbbC2CO3iIlJyotsAQm3Ht2TzIKoZsVmll0MVFYGqH9iWr 7eBHrGedTTuD65XJ3XU5VSYoGjMbnroRgTDVqwKJaT6Ynqrjz5xARIXsYu3M/dYrsUYg iXfumbqCZfOc/92GiKoU6ApJn3paNHjlQNgbdPU5qqKr5H9WoZs7xPKZpve3LFjMS6IS 1u3P49nrx5+EKBedxGyUSiaaohLW3xunjem4JIzTkrC3bdRnZlX2itVUHOoeL5WZ49bi h88lIrKbLah4/c8ORrzspbChD0000iGHC+BBYN3aFoTiXhf5ZoJFF14zIYI0IwFukElj dQ0A== X-Gm-Message-State: AHPjjUgmLJkU0pGde9dReD9W/Bf9uXNgBK6AnoIJMZfBmK1VyX9eAs8Q 472tFBNH0jVsaDWm X-Google-Smtp-Source: ADKCNb7GVH6K+7e2L9qFGaRoOTmCbjJ3F0sWMYXA3CTPutg/2sa6uQDrwqgDmmY/3WqsheHGQ3ArSw== X-Received: by 10.84.128.69 with SMTP id 63mr15099292pla.446.1505164288008; Mon, 11 Sep 2017 14:11:28 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:26 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:03 -0700 Message-Id: <1505164269-9455-10-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 10/16] datapath: Fixup RTNL ops for kernel 4.13 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 The RTNL ops validate and newlink functions now take the extended netlink ack parameter. Use the new HAVE_EXT_ACK_IN_RTNL_LINKOPS define to check if the additional parameter is present and add the parameter if so. While in the modules remove the checks for Linux kernels < 2.3.39 since they are no longer supported since 2.5.x. Signed-off-by: Greg Rose --- datapath/linux/compat/lisp.c | 21 ++++++++++----------- datapath/linux/compat/stt.c | 11 +++++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/datapath/linux/compat/lisp.c b/datapath/linux/compat/lisp.c index c505fad..34f8232 100644 --- a/datapath/linux/compat/lisp.c +++ b/datapath/linux/compat/lisp.c @@ -608,7 +608,12 @@ static const struct nla_policy lisp_policy[IFLA_LISP_MAX + 1] = { [IFLA_LISP_PORT] = { .type = NLA_U16 }, }; +#ifdef HAVE_EXT_ACK_IN_RTNL_LINKOPS +static int lisp_validate(struct nlattr *tb[], struct nlattr *data[], + struct netlink_ext_ack __always_unused *extack) +#else static int lisp_validate(struct nlattr *tb[], struct nlattr *data[]) +#endif { if (tb[IFLA_ADDRESS]) { if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) @@ -660,17 +665,15 @@ static int lisp_configure(struct net *net, struct net_device *dev, return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) +#ifdef HAVE_EXT_ACK_IN_RTNL_LINKOPS static int lisp_newlink(struct net *net, struct net_device *dev, - struct nlattr *tb[], struct nlattr *data[]) -{ + struct nlattr *tb[], struct nlattr *data[], + struct netlink_ext_ack __always_unused *extack) #else -static int lisp_newlink(struct net_device *dev, +static int lisp_newlink(struct net *net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[]) - -{ - struct net *net = &init_net; #endif +{ __be16 dst_port = htons(LISP_UDP_PORT); if (data[IFLA_LISP_PORT]) @@ -679,11 +682,7 @@ static int lisp_newlink(struct net_device *dev, return lisp_configure(net, dev, dst_port); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) static void lisp_dellink(struct net_device *dev, struct list_head *head) -#else -static void lisp_dellink(struct net_device *dev) -#endif { struct lisp_dev *lisp = netdev_priv(dev); diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index 964d993..07f5892 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -1909,7 +1909,12 @@ static const struct nla_policy stt_policy[IFLA_STT_MAX + 1] = { [IFLA_STT_PORT] = { .type = NLA_U16 }, }; +#ifdef HAVE_EXT_ACK_IN_RTNL_LINKOPS +static int stt_validate(struct nlattr *tb[], struct nlattr *data[], + struct netlink_ext_ack __always_unused *extack) +#else static int stt_validate(struct nlattr *tb[], struct nlattr *data[]) +#endif { if (tb[IFLA_ADDRESS]) { if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) @@ -1961,8 +1966,14 @@ static int stt_configure(struct net *net, struct net_device *dev, return 0; } +#ifdef HAVE_EXT_ACK_IN_RTNL_LINKOPS +static int stt_newlink(struct net *net, struct net_device *dev, + struct nlattr *tb[], struct nlattr *data[], + struct netlink_ext_ack __always_unused *extack) +#else static int stt_newlink(struct net *net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[]) +#endif { __be16 dst_port = htons(STT_DST_PORT); From patchwork Mon Sep 11 21:11:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812635 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="b2Oi2v6G"; 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 3xrgkG6J2Mz9s0Z for ; Tue, 12 Sep 2017 07:17:42 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 977C2CD9; Mon, 11 Sep 2017 21:11:32 +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 2B103CD2 for ; Mon, 11 Sep 2017 21:11:30 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 04E37D3 for ; Mon, 11 Sep 2017 21:11:29 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id v5so5183822pgn.4 for ; Mon, 11 Sep 2017 14:11:29 -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=wiMUz0XsGzNNDSGfYEbydZSyWk0XYKrYs7yImojJu6s=; b=b2Oi2v6G/B5TOrHO9eEIRKAKsoicWUm7fV77tappOzbVcgw1hxxQtekzkRn2lTubKY 3gJvTyHjVKJRhivIYIoM3vFFEZonbNewCGczCDcrfb+X4UuqXfk+/toC+tGsrmo/3HWd 75nqLq5sJrUbnV2KjsfQf70pcCZ6YgquA0l/dHmy6lvXUSaDWaDoE6L5cuaBnRsWJb2h 7oXYIMOgddkl5UN/euVlMpgrwlCHlgxOye8islCAU89kqRFJW4WdBm+ltRUxtJu+z++Z DNA6WpjIoGW+Sau+PFMUmam5GjTqihPq7XHE0ClX12utligtN7jywASaW5hJqzpjrh9K yUVg== 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=wiMUz0XsGzNNDSGfYEbydZSyWk0XYKrYs7yImojJu6s=; b=AbOjNuwqqYlbgoanKk/DWdSYtKfcxs3vGir2+LGCoT1ZrqXshrRSwL1yYFvxgEoahb 1ijhlmL8fs+32WcDd/kBV2tiKXq119yRK1h/1gsQIuc7PYa0FS3MBETV1gdiSmGCCD1A nhwOIJl46bdgEdAYoOo9guMgI1hhT/VixdSkTaOuxlblRTdWkU7AsLaRfL1cWpP8kztt po97JCKD2niT9KqZqIMSLXMhzvjYx/WqwbUa6iafqYJYKRf43eb2J8IEi6Sp8VZIOjcZ b6qrxsflK6mSnI94XbWxzSEP06gZNipXruSB5RUkbSthXIRWlSLk6M86J2dIw6i/Nwe4 huAQ== X-Gm-Message-State: AHPjjUjY1qERsI09Sg2YcWmcn5ju+DGupU9Nlrv37dsdeG2Lbu0DooA0 5EPkplXAuGoQmfN2 X-Google-Smtp-Source: ADKCNb6w5pMj7N6YSDETBmJEDXCUfGSHv+pmQ66D9+0K7QliI6Nnazef4M6O19q7V6A8HkMbwLUM+Q== X-Received: by 10.99.105.196 with SMTP id e187mr12461957pgc.360.1505164289313; Mon, 11 Sep 2017 14:11:29 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:28 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:04 -0700 Message-Id: <1505164269-9455-11-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 11/16] acinclude: Check for existence of nf_hook_ops member "list". 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 The "list" member of the nf_hook_ops structure is removed in Linux kernel release 4.13. Signed-off-by: Greg Rose --- acinclude.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 577437f..46efa69 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -774,6 +774,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/rtnetlink.h], [rtnl_link_ops], [extack], [OVS_DEFINE([HAVE_EXT_ACK_IN_RTNL_LINKOPS])]) + OVS_FIND_FIELD_IFELSE([$KSRC/include/linux/netfilter.h], [nf_hook_ops], + [list], + [OVS_DEFINE([HAVE_LIST_IN_NF_HOOK_OPS])]) if cmp -s datapath/linux/kcompat.h.new \ From patchwork Mon Sep 11 21:11:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812636 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="WFBk1054"; 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 3xrgl40qsfz9s0Z for ; Tue, 12 Sep 2017 07:18:23 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id AA225CE6; Mon, 11 Sep 2017 21:11:33 +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 D91B3CE5 for ; Mon, 11 Sep 2017 21:11:31 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 88346A4 for ; Mon, 11 Sep 2017 21:11:31 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id v82so5196216pgb.1 for ; Mon, 11 Sep 2017 14:11:31 -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=nPdlOTHNVb3WRrDRBSU7ayog3o492lnv6hbUgsalfX4=; b=WFBk1054CPjOhEFZTShw6/Ixf4wlUlQk71zrOIPSgNuGGLZBu2G92QRlwu2ImegOMs aSM2+cd53yGhyPP1CRMALSDdvBJ/RYb/gcNuqe53yRgHBmjPQ8YgmzzNSMPzNlUplMt3 13urVrl77AMft0oE3MGoeKEPLNa/kzoatgfGBMy0rsZgc955YhPahZAlWVxw2wLandwo APIwP4Ibc6hMMj/PXIAaVzYM3VYkC1iWEWc+90f5eozv2/v+oAy86AyctKup6TnSoK6O TWNd6ohB7LkETyLpsWb2z//HnLUz+pRnyxyhTWl97xbDEQjXT4hhxrzjsf34QxJcnEpm Rgew== 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=nPdlOTHNVb3WRrDRBSU7ayog3o492lnv6hbUgsalfX4=; b=BcwT1Ag+wtxluRz3AfaEPn21+pepLm8TY95IDbSMgn2Wn1MQ8AGiJKnHa7ITVXR5fF HlBp/JJzPtBCofd3FE6f6qvSFUWIDtK9f4s+BYPtfcXkxksUx1FeBgtCYWlL8zbDCwGr E2MKAFbfgo0YoHIhAawzcO6LCIH0JJ3oRJ7i6qgkjJ2dJav8QBGwGId1mQpuzW6MzwL/ oLo7ccrZPv5wTd+wSEwaAdreqyWBk+Mvr+sVqcNvDVwAEaExfdxprjl08aXpBluolKfk Fz5d+4HADBv+2q2fDi9A3b4oVivAOrpRHaRzMyYuq8WZmBMgIUj3PbN+neJ+jAG/5fv8 XXbA== X-Gm-Message-State: AHPjjUh7xxfXQ3xG03c+JScBis6OQGSzBl46pJuT5aiV6R8+k+bt32u2 R5VRy6eGuCr1d24/ X-Google-Smtp-Source: ADKCNb7OQC5W2TP7pxbu+u4aAd/YXsU/qU7GFMSzz2C+c9xvaO3yYCGIfu8IKktcP2lvG/cROQwMlw== X-Received: by 10.84.133.3 with SMTP id 3mr7642570plf.182.1505164290757; Mon, 11 Sep 2017 14:11:30 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:29 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:05 -0700 Message-Id: <1505164269-9455-12-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 12/16] datapath: Check for existence of nf_hook_ops member list 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 The list member of nf_hook_ops has been removed in Linux kernel release 4.13. Check for the definition of it in pre-4.13 kernels. Signed-off-by: Greg Rose --- datapath/linux/compat/stt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index 07f5892..37d5f4b 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -2110,7 +2110,9 @@ int stt_init_module(void) if (rc) goto out2; +#ifdef HAVE_LIST_IN_NF_HOOK_OPS INIT_LIST_HEAD(&nf_hook_ops.list); +#endif pr_info("STT tunneling driver\n"); return 0; out2: From patchwork Mon Sep 11 21:11:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812637 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="rlDQcDos"; 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 3xrglv3fBTz9s0Z for ; Tue, 12 Sep 2017 07:19:07 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B730ECE3; Mon, 11 Sep 2017 21:11: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 56BC0CE8 for ; Mon, 11 Sep 2017 21:11:33 +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 130B2113 for ; Mon, 11 Sep 2017 21:11:32 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id i130so3191106pgc.0 for ; Mon, 11 Sep 2017 14:11: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=GtvOG6nV2JH+Y7/d1ncsC6tRujV+5/9Tjcr9aMNbjbM=; b=rlDQcDosNnhJ7MoFKmtGdnnFKZGLx/sM9Z+SUQb8oxFtI1op1OPbP2DA9+mOiPFve7 +oxUE7J8ghIG3wqUS8nPwWye43xdQlOOwhX6gA4hN0tWBEjhwDGow7JQMBzwS9CiQ9sy r6XNS/If2CuUaMvoRNs4nDP3x0Aio6e+B1vpfCjRYbR+7HvG8eMgKSGQGcpLrJDgOsUz FHF6MUYvGdyjve+dJSz6VfGpfjV9/O22fG/TmaszEacIOw+MDGZ6OGQPoNJOLcS3zgNF YQpVAWep4f0Q7cPOJ8dJdbs3W1xdVZAJuoRjcw2ckKpU/s4We1h0TbXo5KgF3y/PIYFV W8Ig== 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=GtvOG6nV2JH+Y7/d1ncsC6tRujV+5/9Tjcr9aMNbjbM=; b=nou9H7LVBK6Qs9A2Xw6zpU85ZhfLj1KBDd4gLOS1q340u468Y4M4dQfhbHqY9BpaMu JGZ8U28Rpx5d0SO+m7kHU8xTdf+e8y282VKU32feQys3W1JRYXWB84vWNfrRtq5nisEX 7IXplqEamuYQPNHKqy+OxOl+Zqy5AKxKYcbemrKqwXMLos/og6r67F3h6vZVmQuPzr6y 8MhwozS5ItHE7+BONmDJYLoDSAARtpDCdqT2+2GjOouA8DK53tb7pxEy2nli3YgyuZN1 OxYE6ob7YsqVx6t46VzR3YwnaiCVaqcMT+gdhqVZJzTII+STtkGgJTEt+nFWd/Fus9SC upLA== X-Gm-Message-State: AHPjjUgMDDkX3uRhLIQQ0Ju/z3KPml/AETVhtrWyIi8B8OckjBdayuXG 1pMxaKB2bOGBZa55 X-Google-Smtp-Source: ADKCNb5VRpw35SaW6xx/URT9ZsU4Doc76h7dFaUxDoC/71Id5sVoBzvM+het1tuxerGLCOtKIcpwSg== X-Received: by 10.99.95.194 with SMTP id t185mr12898822pgb.145.1505164292383; Mon, 11 Sep 2017 14:11:32 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:31 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:06 -0700 Message-Id: <1505164269-9455-13-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 13/16] datapath: Fix up vxlan device 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 I missed a couple of usages of the flags parameter from vxlan_dev while adding compatibility code to handle the removal of the flags. Add the checks so that the module can compile for Linux kernel release 4.13 Fixes: 143656435c ("datapath: get rid of redundant vxlan_dev.flags") Signed-off-by: Greg Rose --- datapath/vport-vxlan.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c index 2910694..c7139ab 100644 --- a/datapath/vport-vxlan.c +++ b/datapath/vport-vxlan.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Nicira, Inc. + * Copyright (c) 2015,2017 Nicira, Inc. * Copyright (c) 2013 Cisco Systems, Inc. * * This program is free software; you can redistribute it and/or @@ -60,14 +60,22 @@ static int vxlan_get_options(const struct vport *vport, struct sk_buff *skb) return -EMSGSIZE; nla_nest_end(skb, exts); +#ifdef HAVE_VXLAN_DEV_CFG + } else if (vxlan->cfg.flags & VXLAN_F_GPE) { +#else } else if (vxlan->flags & VXLAN_F_GPE) { +#endif struct nlattr *exts; exts = nla_nest_start(skb, OVS_TUNNEL_ATTR_EXTENSION); if (!exts) return -EMSGSIZE; +#ifdef HAVE_VXLAN_DEV_CFG + if (vxlan->cfg.flags & VXLAN_F_GPE && +#else if (vxlan->flags & VXLAN_F_GPE && +#endif nla_put_flag(skb, OVS_VXLAN_EXT_GPE)) return -EMSGSIZE; From patchwork Mon Sep 11 21:11:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812638 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="DT8IDGte"; 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 3xrgmh6zzLz9s0Z for ; Tue, 12 Sep 2017 07:19:48 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 99524CF1; Mon, 11 Sep 2017 21:11:36 +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 81752CC6 for ; Mon, 11 Sep 2017 21:11:34 +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 581E5D3 for ; Mon, 11 Sep 2017 21:11:34 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id i130so3191128pgc.0 for ; Mon, 11 Sep 2017 14:11:34 -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=nrnfv0FqOkgsuL7eWsOQ3OejoRsOyWgE8r6t6Mo5kx4=; b=DT8IDGteSSCoXa2Gd0PLHhpJRsF2L4bAofjvhQ5UD+e9jAktPmFSqlhKg/NrQeISmI +xsN4FprIQmNdOH52ciO6bMr9nNPfHUFvouDCo96bbFup6RsN4QDk2jMNzpqQA+N/QXd Vr57s984TKuseUxFZukRAQssmLGvifN5fadPE5fUwGqdn3+VdWfx5gdnEFDuzu9waf71 e1q5NBPMaLqbQ0bejxcrUALp9dmfAwmJVgU+hA4N4XPfBvWYvTwRJZ7jMqgREnf7XAWR ZR2iLvOrX7n1BX7xTYivLtqrZm1kCsLSVg8SlTOJj4tpcYy3GIzfK0MnTN64+bJMDDCy cqVA== 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=nrnfv0FqOkgsuL7eWsOQ3OejoRsOyWgE8r6t6Mo5kx4=; b=VGXKMx48d70NrKRVKFYfjpqshNbXqcaokcOX2eB3eGgKJ+AbBwHuSe17XELygwJN83 9OWshPAKD8Xf4Mb9Tal1lzecjTj0d6cdkzbpYHsFVWWEa2gg7bdsfhctgDTsYeHl8s50 CLpqOu6VPdajCKjpWSGT7GQJB5L11XVRO5Eb4ATvLgTUzoGtv5zv5UyUoFYGQz37UM3F G8PtUSs4Q3C9r47spPK+eOPMFmGRqqNLt4ofmgWMWgHnj8nm/kZ2jeUt5qsRf9O9Ehf9 6ha/I7XJDDGtq6t4SFNELdzRoNcD2vZsbp61StYCiyFFEfdAq0xrnQrKSoxAHXbVQevs 6lHQ== X-Gm-Message-State: AHPjjUhBCbLGoMx5Ha5v2utx+QZR6FmV0Us4tMsOVqxgY6mxUuALoCr+ Owr3Wb2ToFIkESUP X-Google-Smtp-Source: ADKCNb5dUrS5yYrpjQq41h+r2Yu1GOXEmhlGNDbyf2nsa89mZM34n1ldIR7kjsGmfywiJdrCoQvT4w== X-Received: by 10.84.238.205 with SMTP id l13mr14652858pln.173.1505164293683; Mon, 11 Sep 2017 14:11:33 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:32 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:07 -0700 Message-Id: <1505164269-9455-14-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 14/16] acinclude: Add support for Linux 4.13 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 Add configuration support for the just released 4.13 Linux kernel. Signed-off-by: Greg Rose --- acinclude.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 46efa69..cb5f3ae 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -143,10 +143,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [ AC_MSG_RESULT([$kversion]) if test "$version" -ge 4; then - if test "$version" = 4 && test "$patchlevel" -le 12; then + if test "$version" = 4 && test "$patchlevel" -le 13; then : # Linux 4.x else - AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.11.x is not supported (please refer to the FAQ for advice)]) + AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.13.x is not supported (please refer to the FAQ for advice)]) fi elif test "$version" = 3 && test "$patchlevel" -ge 10; then : # Linux 3.x From patchwork Mon Sep 11 21:11:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812639 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="kTgCPMwv"; 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 3xrgnr3C2Vz9s2G for ; Tue, 12 Sep 2017 07:20:48 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0C59ECFD; Mon, 11 Sep 2017 21:11:38 +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 22E3ECF1 for ; Mon, 11 Sep 2017 21:11:36 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id DA246271 for ; Mon, 11 Sep 2017 21:11:35 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id d8so5189378pgt.3 for ; Mon, 11 Sep 2017 14:11:35 -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=wAjMGrRFMCwj5JQ184SgyfxvtliONuyj2bXhHASoWU8=; b=kTgCPMwvyS1+xnkJmNONZ92joz4kZRE1HfJoMBi+nqF9pMS2xzZ9IgaL8jjrcXdWTV RoOZLoKSto9/tBIr1HWHGK7T8516cn2MeCyL8Daxp5/f5mcx7WQDlBePVAfageWtcECG zWqwmdFr38Yhaxprm5ht+4dL57XdHTcQJB3s7wwsDzWknnbesMZAUcPjHMbuHE2w34xX YA81JiW8x+hroYPWda4DnxW/5Eoi9OjsgZXob5LhTkDsYlfA1VqLTAdR4Ac4vDc+hgvs bJAWM+wnV6+si0Pk3l3a/4iuCEtWnnE5DrcjoDz/TAnB/I15OWLK7KgKK5Qh4Oe0QNRm A67w== 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=wAjMGrRFMCwj5JQ184SgyfxvtliONuyj2bXhHASoWU8=; b=Wwd9hU3h+HiGtuBEdXMO9D+yFLwq8Fo1GZeb84FTrEm7qNrd0LCNkDsXo++9JxjJJi HUgRM3nNaSSCQQ5iD7CAFKhzt/gCElqeMVjgtOGXGt9/uc2S7+0J03wctasesfRYcI9g FiGkGtOL9ukbRc2xTlm7kfJehUOvFrkASRu6amGgu/AlJX8MxHqToXpqcRZGeygWn4WN p/9AwqrKsIVLaO65MZ4CugOSoHXMymw5jtDiZu9BNxWjZoNTkwd45wRebwBo5Tv5QGiR X/GO+fBxXQmYdYCVUPH3Mg2BJiHFGEiVqjZQ9vQZ1gBq1Q5YA9I8cS9fRIL1+e1r9ddy DZRA== X-Gm-Message-State: AHPjjUioJN+egxGNwTK0Lv5vhhz70DfZRTOX0UY9KEVCLL44oL5lsjVl HjyKamK4h3VK3G5r X-Google-Smtp-Source: ADKCNb4+Pf0tP5KIwKE3TuhNNTzMn6edPNk8i8ca38qsPr4M7NjSsJclGeXrAyF2an7ei4H7L5RDYA== X-Received: by 10.84.229.78 with SMTP id d14mr14605637pln.415.1505164295190; Mon, 11 Sep 2017 14:11:35 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:34 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:08 -0700 Message-Id: <1505164269-9455-15-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 15/16] Documentation: Update NEWS and FAQ. 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 Document Open vSwitch Linux kernel support for the 4.13 kernel release. Signed-off-by: Greg Rose --- Documentation/faq/releases.rst | 2 +- NEWS | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst index c785529..064a496 100644 --- a/Documentation/faq/releases.rst +++ b/Documentation/faq/releases.rst @@ -65,7 +65,7 @@ Q: What Linux kernel versions does each Open vSwitch release work with? 2.5.x 2.6.32 to 4.3 2.6.x 3.10 to 4.7 2.7.x 3.10 to 4.9 - 2.8.x 3.10 to 4.12 + 2.8.x 3.10 to 4.13 ============ ============== Open vSwitch userspace should also work with the Linux kernel module built diff --git a/NEWS b/NEWS index 6a5d2bf..a3c1a02 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ Post-v2.8.0 - OVN: * The "requested-chassis" option for a logical switch port now accepts a chassis "hostname" in addition to a chassis "name". + - Linux kernel 4.13 + * Add support for compiling OVS with the latest Linux 4.13 kernel v2.8.0 - xx xxx xxxx --------------------- From patchwork Mon Sep 11 21:11:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 812642 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="Gpx1fYeQ"; 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 3xrgpV39XGz9s7M for ; Tue, 12 Sep 2017 07:21:22 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 44FD4CF7; Mon, 11 Sep 2017 21:11:41 +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 9070CCF5 for ; Mon, 11 Sep 2017 21:11:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4FBE944F for ; Mon, 11 Sep 2017 21:11:37 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id i23so601249pfi.2 for ; Mon, 11 Sep 2017 14:11:37 -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=q3ZnW1mJcWcDX/cbifyJkUIkRAi8ZaHjhCmEhEEce80=; b=Gpx1fYeQHNUmOoed8izFUKHb/pi90HtQyruQyuAh0obV/u+TnHrl6gQDf1YXK/OzRa uFnrSnbEmFX5/0FWnogJgK4KqkkSblSYkVDGr0DwOPfpvCvq97EKOrlvP17ZxbppMiXF J9/Bnr2niqy3z3afsjkGjYwq87dvRa6FDlHzPm9yaK0l9/cjHrw+kxMjeSYCKX76UJaX y2jqsY8BlyNyiLXPixuLinzP7KFGde9Lb04tyamPD+6Uk1axYqwLytabvTDsUT3LbHue AnwAb+ntTCaFKgI7a+mgwUxFwDPXmpZDtcnAsXUwSI3W3oy+1UUiJX2lbS5WQU0CppkE bziA== 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=q3ZnW1mJcWcDX/cbifyJkUIkRAi8ZaHjhCmEhEEce80=; b=NSvLj2wzv10TWW7MHGQ5jD7b/4oOKaZi6YsT7QogfWvrlS+ABEZelUYklv9rPT1aPr LWAM5vYLoTSQ2l7sux+vZMg7CTzQVR/gNrjXr1Zus+cbLK5sn5TkYCMv3XtOcpEEH0Tr uYaxkk78yvsCxgm1uESyDEuE0ONlNeFTH6vD8yvkWCI6XuA5uadK8ZnqsxkR7y5ORf6+ RkhffnPJCZtlh2cH7fM93HKxf1cQBs3LTiUQx4pcv6vPCPxxVetRS0LHMyd2qYNkaEyP SDkaoqi/49/s+Wbt7YBGeZtWr8fC7TrSFBOYJMaxEcYU90cMwfrkYLARMjVvbtntzYW8 2vQQ== X-Gm-Message-State: AHPjjUgTI+M393Uf6PBc1Zn9+YgniIHGPu8rgwE6AOMGJJH4EVl4YX7f /6DbBSh3wo0hJJJo X-Google-Smtp-Source: ADKCNb6XopxdvkDBA+HRDNKzov+GVl2HvNgL+9Y8/6rucFy/AGVY3JIUfHfIFWViJ5Mi/n5dACon9A== X-Received: by 10.84.134.35 with SMTP id 32mr6308462plg.20.1505164296655; Mon, 11 Sep 2017 14:11:36 -0700 (PDT) Received: from gizo.domain (67-5-132-83.ptld.qwest.net. [67.5.132.83]) by smtp.gmail.com with ESMTPSA id q23sm6568745pfk.182.2017.09.11.14.11.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 14:11:35 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Mon, 11 Sep 2017 14:11:09 -0700 Message-Id: <1505164269-9455-16-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> References: <1505164269-9455-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH V2 16/16] travis: Update build kernel list 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 Linux kernel 4.13 has been released. Update the kernel build list to the current list of kernels from kernel.org. Signed-off-by: Greg Rose --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d0fd44..f217840 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,16 +25,16 @@ sudo: false env: - OPTS="--disable-ssl" - - TESTSUITE=1 KERNEL=3.16.46 + - TESTSUITE=1 KERNEL=3.16.47 - TESTSUITE=1 OPTS="--enable-shared" - BUILD_ENV="-m32" OPTS="--disable-ssl" - - KERNEL=3.16.46 DPDK=1 - - KERNEL=3.16.46 DPDK=1 OPTS="--enable-shared" - - KERNEL=4.12.2 - - KERNEL=4.11.11 - - KERNEL=4.9.38 - - KERNEL=4.4.77 - - KERNEL=4.1.42 + - KERNEL=3.16.47 DPDK=1 + - KERNEL=3.16.47 DPDK=1 OPTS="--enable-shared" + - KERNEL=4.13 + - KERNEL=4.12.11 + - KERNEL=4.9.48 + - KERNEL=4.4.87 + - KERNEL=4.1.43 - KERNEL=3.10.107 - TESTSUITE=1 LIBS=-ljemalloc