From patchwork Wed Feb 14 23:18:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873566 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="Nbxd89EN"; 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 3zhb2C6Htlz9t2l for ; Thu, 15 Feb 2018 10:18:59 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id E5BC7F0F; Wed, 14 Feb 2018 23:18: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 3D48EEFE for ; Wed, 14 Feb 2018 23:18:27 +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 8D8B21C0 for ; Wed, 14 Feb 2018 23:18:26 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id j9so2799904pgv.3 for ; Wed, 14 Feb 2018 15:18:26 -0800 (PST) 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=0xmWgAYrb+ljE1k+sXZUo6yi3hxMtfxjnXLEVkG1Bac=; b=Nbxd89ENCAKV5nxI1mwZJ/+LKQf4Yef4g72alk4rGZEru+PKJtpLA5k5Pe0CUU9VF7 +X4h33yYXfZVl+v94KOKb9lgM38hMfoZMEoAmZqCy8KJg442ZoC03ccT+ZyEiZbVFuaB KMLEd5Hhm0cSY/CTn1lcMKiAobofmn19OO0wUwNBsPoAhUX2qvKI5Z4LLMHss9wVEbdH yjSZoW8G605M0Yy5Vb55bXUsrIqJZEItI5QPlr7UOTsK4HY3Qoq78wX3+WyjabIKPjZd CcJf11jmVvuJl5yR1k6fPk7jVkEYkW/vijx2QrHQrPG2LCLe02EHNo2gDiL7siVURxRk iLaw== 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=0xmWgAYrb+ljE1k+sXZUo6yi3hxMtfxjnXLEVkG1Bac=; b=jrePuZLuHWuz2zSSPv+AvVBU7aI8f1KUiHz/SEdJy9OQOSD6Pp2VzBD21ePYfPR9bp 4WtfTNfbK9mm9gFBDKfMf+gWv66uZ/5pXubDAgbbrLUmYkeeSJbrei1ppNvbz0QiTeXx qAwANqIQw1pRT1na3GMJGdeDXhDakhGZSsPx68NzUbXkzAh0gw5OK9pyMWjmerBvyw41 sbK/gfbXwZmeK197xgQJOm0r1vjmI+D2QtafQ5voNIvUW0A0mG+40fcZTAoe0YVW/qRz qNUbT6eofs/JhqKFgw/bd6v2uxgcK/4glZw65PP/1haog60wNpufdIvslhpcn3btKpDX pR2w== X-Gm-Message-State: APf1xPAID6W5mRc5LeolFG4Pt91bTGsnC6+5KKBbhOK202FnY4dKVasx CdjJcV8YBtBHZ1iPlEpNO1U4wQ== X-Google-Smtp-Source: AH8x224KiSrOHbfUgrmhnTMqodhezvAbOoKQU0EGF2NZsdw4N/z0ydPOQNxbdXlrB1abZCNCo8uo2A== X-Received: by 10.99.124.91 with SMTP id l27mr516972pgn.298.1518650305774; Wed, 14 Feb 2018 15:18:25 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:24 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:03 -0800 Message-Id: <1518650290-31536-2-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: paolo abeni Subject: [ovs-dev] [PATCH 1/8] datapath: do not propagate headroom updates to internal port X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: paolo abeni Upstream commit: commit 183dea5818315c0a172d21ecbcd2554894bf01e3 Author: Paolo Abeni Date: Thu Nov 30 15:35:33 2017 +0100 openvswitch: do not propagate headroom updates to internal port After commit 3a927bc7cf9d ("ovs: propagate per dp max headroom to all vports") the need_headroom for the internal vport is updated accordingly to the max needed headroom in its datapath. That avoids the pskb_expand_head() costs when sending/forwarding packets towards tunnel devices, at least for some scenarios. We still require such copy when using the ovs-preferred configuration for vxlan tunnels: br_int / \ tap vxlan (remote_ip:X) br_phy \ NIC where the route towards the IP 'X' is via 'br_phy'. When forwarding traffic from the tap towards the vxlan device, we will call pskb_expand_head() in vxlan_build_skb() because br-phy->needed_headroom is equal to tun->needed_headroom. With this change we avoid updating the internal vport needed_headroom, so that in the above scenario no head copy is needed, giving 5% performance improvement in UDP throughput test. As a trade-off, packets sent from the internal port towards a tunnel device will now experience the head copy overhead. The rationale is that the latter use-case is less relevant performance-wise. Signed-off-by: paolo abeni Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Cc: paolo abeni Signed-off-by: Greg Rose --- datapath/vport-internal_dev.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index 0aa331a..9bb8751 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -149,13 +149,6 @@ internal_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) } } -#ifdef HAVE_IFF_PHONY_HEADROOM -static void internal_set_rx_headroom(struct net_device *dev, int new_hr) -{ - dev->needed_headroom = new_hr < 0 ? 0 : new_hr; -} -#endif - static const struct net_device_ops internal_dev_netdev_ops = { .ndo_open = internal_dev_open, .ndo_stop = internal_dev_stop, @@ -165,13 +158,6 @@ static const struct net_device_ops internal_dev_netdev_ops = { .ndo_change_mtu = internal_dev_change_mtu, #endif .ndo_get_stats64 = (void *)internal_get_stats, -#ifdef HAVE_IFF_PHONY_HEADROOM -#ifndef HAVE_NET_DEVICE_OPS_WITH_EXTENDED - .ndo_set_rx_headroom = internal_set_rx_headroom, -#else - .extended.ndo_set_rx_headroom = internal_set_rx_headroom, -#endif -#endif }; static struct rtnl_link_ops internal_dev_link_ops __read_mostly = { @@ -189,7 +175,7 @@ static void do_setup(struct net_device *netdev) netdev->priv_flags &= ~IFF_TX_SKB_SHARING; netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_OPENVSWITCH | - IFF_PHONY_HEADROOM | IFF_NO_QUEUE; + IFF_NO_QUEUE; #ifndef HAVE_NEEDS_FREE_NETDEV netdev->destructor = internal_dev_destructor; #else @@ -239,9 +225,6 @@ static struct vport *internal_dev_create(const struct vport_parms *parms) goto error_free_netdev; } -#ifdef HAVE_IFF_PHONY_HEADROOM - vport->dev->needed_headroom = vport->dp->max_headroom; -#endif dev_net_set(vport->dev, ovs_dp_get_net(vport->dp)); internal_dev = internal_dev_priv(vport->dev); internal_dev->vport = vport; From patchwork Wed Feb 14 23:18:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873567 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="U3HvHv11"; 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 3zhb3100dfz9t2l for ; Thu, 15 Feb 2018 10:19:40 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 115D8F42; Wed, 14 Feb 2018 23:18: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 6E636F05 for ; Wed, 14 Feb 2018 23:18:29 +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 AEF621C0 for ; Wed, 14 Feb 2018 23:18:28 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id l131so2791865pga.2 for ; Wed, 14 Feb 2018 15:18:28 -0800 (PST) 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=60p88CoqcsWWyYfNhFaAskWtft0339j7URg1GQVwhFs=; b=U3HvHv11teV67LRzLckf6rHW+knXsptdKzWxYiCGMkthwzTwj1pZirhuv8nRC7C6E2 edM0UrsfjPte6NydNEjg2DD1Ae2pKrMsRzWhBFyz8rczoCSQQX2+HDseFl+1Sb0XD+RA 4m6IvYYSmblz6ybHIKHC4EuCMyTiDvaVcAchJ8QKXuwijstrvgaBQDgDGPpbXedyqUQw 5TsWmlSZXHu0trcbgLGLgcWFCaVIWzvCoPnpZxSQq3mnMDVJTSAURW4by9NkCI9iMczN JDgREL+fhDP+vFEiUixGUTPdj0+YHk9ciy0Kq5jlnQ841OuAaG5+eYR1Rl+n9jVpNYdE yrQQ== 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=60p88CoqcsWWyYfNhFaAskWtft0339j7URg1GQVwhFs=; b=dB4AlCei6EyEjr7v10tYi5F3fc2cAmbU+e5xuaRWj0x51axcMKrI1DIf0O1Ai1n48D pnmeFernZklGWZVvhg7C80KJpr6CE5wTrB1ZzuPAeCRKMpfIMW/wPvD+Hr5KQH4c3NkE Of6y7+faC8NIXEtmCkHh/z++lQmwuQ5Xs/2AMg9k2HOw2FUM2/KD4G7h++psP11YF6du EuvgIT5waC/iAX0Acr4/1bMGT5FTiZejlaKk4TxXLkkqYo0On/sPBKTmxv2utsuFFNuh kRmB5msKoiE8PUqp4QYLKqaX8eqLiIbyw2O96ZbmFYEGudwaNkXBV9A2sXMcFR1PJaN2 Kz9w== X-Gm-Message-State: APf1xPA+u8uFV7RdmOUF0/NezBMkVexjwerEedASTmPLxxLjVTBMpkyF vjdeOVB0uVI+URdM/sHFgHSEfQ== X-Google-Smtp-Source: AH8x226DUW0UK88t9HN7yEUdo3XPEt8/nEP4UyvvHb4n7CkEYmLOTjfjbj+scngXp1FgUVD/pkam4A== X-Received: by 10.99.170.10 with SMTP id e10mr515469pgf.92.1518650307878; Wed, 14 Feb 2018 15:18:27 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:26 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:04 -0800 Message-Id: <1518650290-31536-3-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Eric Garver Subject: [ovs-dev] [PATCH 2/8] datapath: Fix pop_vlan action for double tagged frames X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Eric Garver Upstream commit: commit c48e74736fccf25fb32bb015426359e1c2016e3b Author: Eric Garver Date: Wed Dec 20 15:09:22 2017 -0500 openvswitch: Fix pop_vlan action for double tagged frames skb_vlan_pop() expects skb->protocol to be a valid TPID for double tagged frames. So set skb->protocol to the TPID and let skb_vlan_pop() shift the true ethertype into position for us. Fixes: 5108bbaddc37 ("openvswitch: add processing of L3 packets") Signed-off-by: Eric Garver Reviewed-by: Jiri Benc Signed-off-by: David S. Miller Cc: Eric Garver Fixes: a27c454ee0 ("datapath: add processing of L3 packets") Signed-off-by: Greg Rose --- datapath/flow.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/datapath/flow.c b/datapath/flow.c index e345ec9..fadc074 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -584,6 +584,7 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key) return -EINVAL; skb_reset_network_header(skb); + key->eth.type = skb->protocol; } else { eth = eth_hdr(skb); ether_addr_copy(key->eth.src, eth->h_source); @@ -597,16 +598,24 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key) if (unlikely(parse_vlan(skb, key))) return -ENOMEM; - skb->protocol = parse_ethertype(skb); - if (unlikely(skb->protocol == htons(0))) + key->eth.type = parse_ethertype(skb); + if (unlikely(key->eth.type == htons(0))) return -ENOMEM; + /* Multiple tagged packets need to retain TPID to satisfy + * skb_vlan_pop(), which will later shift the ethertype into + * skb->protocol. + */ + if (key->eth.cvlan.tci & htons(VLAN_TAG_PRESENT)) + skb->protocol = key->eth.cvlan.tpid; + else + skb->protocol = key->eth.type; + skb_reset_network_header(skb); __skb_push(skb, skb->data - skb_mac_header(skb)); } skb_reset_mac_len(skb); - key->eth.type = skb->protocol; /* Network layer. */ if (key->eth.type == htons(ETH_P_IP)) { From patchwork Wed Feb 14 23:18:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873568 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="EZcbIR7f"; 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 3zhb3Y2rN9z9t2l for ; Thu, 15 Feb 2018 10:20:09 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 01857F51; Wed, 14 Feb 2018 23:18: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 8E4FAF00 for ; Wed, 14 Feb 2018 23:18:30 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id EF0821C0 for ; Wed, 14 Feb 2018 23:18:29 +0000 (UTC) Received: by mail-pl0-f68.google.com with SMTP id w21so2413245plp.11 for ; Wed, 14 Feb 2018 15:18:29 -0800 (PST) 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=FzafRfaRBZovQJ3WVflE5c+CBlE3/aK9aUfaHMcU6no=; b=EZcbIR7fqt2w+mhGMf+BbpNsN74poA/5vK1UZLsZr5gZala/BtZYnY5gIW+x+TFAXH xsoJmh3d53B7rCYTIyJpFf3BOTTwCP3gmby74fXTZhqZhw3Y48zKE1o4BEZvISyQ9N7Y GVPmOEXSLjB7LBW/H2K6clbC4J9Eyclg8Y2gzePEWMH336oKPtnKWWSF8z6vT1Tz50lF 9mGPJboM4lqK7H90F0RnKJbUPnNOtua8dYMJGPhyXO2jX1A40oVjQoFxYOEZdUqFRd6K SUhQSunt+sdzD952Xkzwrfejv//qytWlFf1pWDp8Jl/AJIaQ4arrx5x5q/loBJKUbltQ znKA== 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=FzafRfaRBZovQJ3WVflE5c+CBlE3/aK9aUfaHMcU6no=; b=N4FT5FQD83wKa56iyQMwx/8MDrR5KBk8A0TJt6ljt/R+NQXhQXMsDAlJufSxxQDqA/ +FEz3N/e/THKrFMK2jYjCsZaB+Uld1LduFEPHipKQ0euzl+/PtJ/JP3YMjWR9W4Izmqu SBujWsCcsUnpHKrx2xnn7aR239Wxyep1r3iXtDrD8QLUltmZzjRqMmwx+T0IRVUEd4lD u48qLniPZtRlOdA4n0TKV4Ea/YRXV1r5NtJ6PZKnvQwGVa9MSoyYgtYSzuk4EJXGr6r4 INeul2ACwphhbLgsAsyGiVgl/jxpqTRTgLr6aOhYIU0Mt8PowivI8wbQkilMsPmbr9YY kIJA== X-Gm-Message-State: APf1xPBAW7MmXtZecZ064CzgDOB5LERQUgMUbp7aSHTnDfaNBAZLEVkK VO0SQsH6MUeqawszkls7ALnnZQ== X-Google-Smtp-Source: AH8x226L38RG6OQ83aT6ytv+3nwSGhZYnnBr69A2iV5U4Tz8WXSEjLkPzygYpFRGwsleFoFtgszg3A== X-Received: by 2002:a17:902:6b82:: with SMTP id p2-v6mr618311plk.30.1518650309195; Wed, 14 Feb 2018 15:18:29 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:28 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:05 -0800 Message-Id: <1518650290-31536-4-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Julia Lawall Subject: [ovs-dev] [PATCH 3/8] datapath: drop unneeded newline X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Julia Lawall Upstream commit: commit e0b10844d9e617a1a5ce2ddf73d38aaa0a47a2a4 Author: Julia Lawall Date: Wed Dec 27 15:51:38 2017 +0100 openvswitch: drop unneeded newline OVS_NLERR prints a newline at the end of the message string, so the message string does not need to include a newline explicitly. Done using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller Cc: Julia Lawall Signed-off-by: Greg Rose --- datapath/conntrack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index a75ae3c..d58240b 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1315,14 +1315,14 @@ static int parse_nat(const struct nlattr *attr, /* Do not allow flags if no type is given. */ if (info->range.flags) { OVS_NLERR(log, - "NAT flags may be given only when NAT range (SRC or DST) is also specified.\n" + "NAT flags may be given only when NAT range (SRC or DST) is also specified." ); return -EINVAL; } info->nat = OVS_CT_NAT; /* NAT existing connections. */ } else if (!info->commit) { OVS_NLERR(log, - "NAT attributes may be specified only when CT COMMIT flag is also specified.\n" + "NAT attributes may be specified only when CT COMMIT flag is also specified." ); return -EINVAL; } From patchwork Wed Feb 14 23:18:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873569 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="Y5t0i8bU"; 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 3zhb416NMCz9t2l for ; Thu, 15 Feb 2018 10:20:33 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id EAA62FA0; Wed, 14 Feb 2018 23:18:34 +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 6EEACF88 for ; Wed, 14 Feb 2018 23:18:32 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D8CDA405 for ; Wed, 14 Feb 2018 23:18:31 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id p5so9388536plo.12 for ; Wed, 14 Feb 2018 15:18:31 -0800 (PST) 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=ybhevM8DEmeeZ30pHXXFya7Dtni3Lk30xmtgZjLOAUE=; b=Y5t0i8bUxMgeyrQPRZeibWZwiJcSCelGHLrZfA53cBcU1Dyonwomir8G44OvDsQSCj YDG+x31FiMKKjRM8aX0AhA6ya5jSWaoIDIr/58Rv3l6EFoRWEh0uNqrH92BSsrTBsnv2 VGoBNK6PG5WfkiqTb4YFiI2bfXan4e+T0z7YAyUaOsrMr9R43HladjC1Nrn9QRQxpPyp E49dkFpROqJTOPG1eYfTmlYkHU5531IjsRngmN3tDuH+RjpjcIinEBx0mK06tGeo0EjX Ng33dzVCz41IJO7alC9hSILW5n8+lWPULSkqfS8OkRCvipN9ABcmmdFLvfPPWds74NX4 aRIw== 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=ybhevM8DEmeeZ30pHXXFya7Dtni3Lk30xmtgZjLOAUE=; b=Md9cm+/9gtVzV6EimHWm+ty5KU2NUHCAIBMWU3KJ1VRC295E7pevwb2Th/HAyKI4Zf 8CX221en2eSD9Vi/akM6rg60BA+WZhk50rgOx/plO1UblT3Us3dbKBaAyGZf/VW4dBwh Eawd3dz+IjmdAH5qouZZLt0fkTFxrUtKPA0SOWmny7WJt89uAOu50ONJFJ+OZv4co+vp ovFo8ruX18pbVdAMXySrRYzSP6GF7hqnnGukEy7f3CB0ggv7lBffCSJKZDaLuMFDLKbl kUgLeSZjyhgQRwLrwgtg6oNcCgfRvb298qpraZtR6QByOBtliqVRsCPknk/8Nb+SZ9/P sUoA== X-Gm-Message-State: APf1xPA0m9PTGoS0sdO+Ti+iSgNnM8ufgnhaKNBboM9AX6aoB4zKuEsy jMrD+sSkUyv8zlS0Bq8C5xUgog== X-Google-Smtp-Source: AH8x225CEqkSBgsUtNC0OZhbuxuWAj1UsP8FaNpGp0ySu1W/kjKQfjaaTdTwvwAelPFWzDq75SoBZA== X-Received: by 2002:a17:902:203:: with SMTP id 3-v6mr583296plc.413.1518650311061; Wed, 14 Feb 2018 15:18:31 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:30 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:06 -0800 Message-Id: <1518650290-31536-5-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Yang Shi Subject: [ovs-dev] [PATCH 4/8] datapath: remove unused hardirq.h X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Yang Shi Upstream commit: commit 419091f1cc8afce943fd12af0df26201ee20c1c0 Author: Yang Shi Date: Tue Jan 9 03:52:53 2018 +0800 net: ovs: remove unused hardirq.h Preempt counter APIs have been split out, currently, hardirq.h just includes irq_enter/exit APIs which are not used by openvswitch at all. So, remove the unused hardirq.h. Signed-off-by: Yang Shi Acked-by: Pravin B Shelar Cc: "David S. Miller" Cc: dev@openvswitch.org Signed-off-by: David S. Miller Cc: Yang Shi Signed-off-by: Greg Rose --- datapath/vport-internal_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/datapath/vport-internal_dev.c b/datapath/vport-internal_dev.c index 9bb8751..f48684b 100644 --- a/datapath/vport-internal_dev.c +++ b/datapath/vport-internal_dev.c @@ -16,7 +16,6 @@ * 02110-1301, USA */ -#include #include #include #include From patchwork Wed Feb 14 23:18:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873570 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="MZ6R6tcv"; 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 3zhb4S70MYz9t2l for ; Thu, 15 Feb 2018 10:20:56 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 03F57FBB; Wed, 14 Feb 2018 23:18: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 DCE3AF3D for ; Wed, 14 Feb 2018 23:18:33 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9A94C405 for ; Wed, 14 Feb 2018 23:18:33 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id v3so9411654plg.3 for ; Wed, 14 Feb 2018 15:18:33 -0800 (PST) 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=ebeM6dJfMdlnnn3uE7Trs+i9nwGAU6sXHXH2aNfBlqU=; b=MZ6R6tcvuc4TYg1zsqCtBqUk30EUnD52ylA+q5gSY8Jrx7z9ryfRrLYgVfX4thJP40 +XQwlgpvr7yfhit6MqIxThTBKIiP0hsqh4FdZLiiC7uOWqkkGgqSOR3ilzRzi13LiRZG ffIiQCaaoOvjGZlKUpOAhx4noD2Ek6GnDL8LRKKp3hvYLEmTKAIGjsOQh+FIzntuCIAG PQcJHRL21XR+HgmxLfNPBabw3gJZGjrh8gjycyUaOi3zxLWEQs8CXnU9s1Oq0bsI7QtA 7WeJetNR4EPbk6w3t6bbd4YNc0UPPCUalhl64k60AdH3q3aZHbOxE3KBZ8zvqvwqSq8H TLPQ== 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=ebeM6dJfMdlnnn3uE7Trs+i9nwGAU6sXHXH2aNfBlqU=; b=rorwK9DBdrUM9CYtx0ZnsQngYGY3Bn2B7w/h1kyhtKwy53sjlaIbegimpBf33Y2nzl 4O38RF3T2Ux86v6zUINOBSYNUOgnprS/JQKBGFJOTxP0gaCP8Rp0vRC7vF5V3MKdQIby al8OaK1IfURbTkaKZmoSAKJulaA0Jd260hAi7n2OUN+7RZTG9pFUVfaXVuHDdeGXLkWT Pwa0rVKj0cI0tfi0Snsa96FVUWRGKDdJdUHiCazTP2Ck5cxgDkxZ7rTmdqnVkN4A7HMy 7JYrP0XwtAeRXmc71ZhS9h8M51XG4UJx7Dk4OYVOTkzu6wVoHhoUWkZV8phox04Imr4A LJFQ== X-Gm-Message-State: APf1xPA43mM7NH/msg0O33fYmvKeyUy3IRq0TyBtoBIRgsJbWIyZsXCS 8Np3EgDZrKm+T8qOQL6ZwB7QgQ== X-Google-Smtp-Source: AH8x227Qyk4DfUWN6VHa7z3sDOky82HrIhrLn/5bWexbHhBmxpqpl9t0Y/sFpn73kmDGROnHYopt2Q== X-Received: by 2002:a17:902:5a3:: with SMTP id f32-v6mr614018plf.48.1518650312898; Wed, 14 Feb 2018 15:18:32 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:32 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:07 -0800 Message-Id: <1518650290-31536-6-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: =?utf-8?q?Christopher_D=C3=ADaz_Riveros?= Subject: [ovs-dev] [PATCH 5/8] datapath: Remove unneeded semicolons 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 From: Christopher Díaz Riveros Upstream commit: commit 89290b831ec1a0b233fdc7aaad84acdf4ebbf6aa Author: Christopher Díaz Riveros Date: Wed Jan 17 16:10:28 2018 -0500 flow_netlink: Remove unneeded semicolons Trivial fix removes unneeded semicolons after if blocks. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Díaz Riveros Signed-off-by: David S. Miller Cc: Christopher Díaz Riveros Signed-off-by: Greg Rose --- datapath/flow_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 8eabc16..e2ccf91 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -2458,7 +2458,7 @@ static int validate_geneve_opts(struct sw_flow_key *key) option = (struct geneve_opt *)((u8 *)option + len); opts_len -= len; - }; + } key->tun_key.tun_flags |= crit_opt ? TUNNEL_CRIT_OPT : 0; @@ -2491,7 +2491,7 @@ static int validate_and_copy_set_tun(const struct nlattr *attr, case OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS: break; } - }; + } start = add_nested_action_start(sfa, OVS_ACTION_ATTR_SET, log); if (start < 0) From patchwork Wed Feb 14 23:18:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873571 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="UX3My+W6"; 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 3zhb4y6CDqz9t2l for ; Thu, 15 Feb 2018 10:21:22 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id D9151FCA; Wed, 14 Feb 2018 23:18:37 +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 B2C4DF8A for ; Wed, 14 Feb 2018 23:18: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 25ECD419 for ; Wed, 14 Feb 2018 23:18:36 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id f6so2775835pgs.10 for ; Wed, 14 Feb 2018 15:18:36 -0800 (PST) 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=+9Aq2Elo/gapD7trf8wqyn9ew75FEqK3U2ogtVZduwo=; b=UX3My+W6q1PZ6w/JJ1A7qmZ8QhbTlkM3qGbyGAb6ynC1aFOk9GXn8V/2aXenFQaWWC 6UYsNAnwa+pVAdSdUJwAlRlEPlpYTa+fWxCi1bWWfa0eojS2IPsCUxi5H5xCGJqnhC0E YYVsalhFqe+hYK375rEdxd1ikzfkMRZ/RHgk6ykgKSUv+eaorK1ez6qK9JJLWtjXuWiH 6ITtvCgMhNEvZzWVruK1rFQlcAGeGxVCpLZEEo+jXNhXsjeVw0ox7oI+ydCVtAddBtah Hse8VsPxc+YQgFOX4bVuf+iH7d58iynkk4KNjgLCCM/rZiqkiWI0vtrLo3YKnhq/AHdU URNQ== 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=+9Aq2Elo/gapD7trf8wqyn9ew75FEqK3U2ogtVZduwo=; b=RS59pVCKyscgbkrev32yVcQcfT/mrQaYfUmy/2tf8PG8lzKoQHwtBWHGhKpbUL67I0 9i8JYdsA5M4lLAlN8QuMkxh4H7aBg41eTrhLvgbT52eWuYSdaW9Sl9W1oIHhGnrc/hkO nG3CBCWNtWR2qJztl8L5jQDWwNEDUi4iumTgRF6cYaM2VQ82JsY6pRzJBMxDDq1Ue5a9 krrnfDai1Lbs/Yk2wq7ufeqrS0u9SV8UqbWrteqEw9nk8B22SGMIqoUOk3GSoBnVFnUz TXl8oOjpsBYVtNFmduTtIhtBRSTsdzbDwISA/IUF1vG0k/vEMbj6d5rq1jdYWrEGEYvG BNdQ== X-Gm-Message-State: APf1xPCBFyh05J+umiqkRi1YTCu2KA2EdLwdCfYDdmD4eYVRKjBG5Wdl FBVLRtpHhSwLIXMvqXt/iUMkaA== X-Google-Smtp-Source: AH8x224G9NRnwv9xDhYqsD7ZwtNA0NY3kycCfCMja50lHbY809lVnrStD4ENixs2FeUBeFovowuVkw== X-Received: by 10.98.87.195 with SMTP id i64mr679517pfj.34.1518650315247; Wed, 14 Feb 2018 15:18:35 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:34 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:08 -0800 Message-Id: <1518650290-31536-7-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 6/8] datapath: Remove padding from packet before L3+ conntrack processing X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Ed Swierk Upstream commit: commit 9382fe71c0058465e942a633869629929102843d Author: Ed Swierk Date: Wed Jan 31 18:48:02 2018 -0800 openvswitch: Remove padding from packet before L3+ conntrack processing IPv4 and IPv6 packets may arrive with lower-layer padding that is not included in the L3 length. For example, a short IPv4 packet may have up to 6 bytes of padding following the IP payload when received on an Ethernet device with a minimum packet length of 64 bytes. Higher-layer processing functions in netfilter (e.g. nf_ip_checksum(), and help() in nf_conntrack_ftp) assume skb->len reflects the length of the L3 header and payload, rather than referring back to ip_hdr->tot_len or ipv6_hdr->payload_len, and get confused by lower-layer padding. In the normal IPv4 receive path, ip_rcv() trims the packet to ip_hdr->tot_len before invoking netfilter hooks. In the IPv6 receive path, ip6_rcv() does the same using ipv6_hdr->payload_len. Similarly in the br_netfilter receive path, br_validate_ipv4() and br_validate_ipv6() trim the packet to the L3 length before invoking netfilter hooks. Currently in the OVS conntrack receive path, ovs_ct_execute() pulls the skb to the L3 header but does not trim it to the L3 length before calling nf_conntrack_in(NF_INET_PRE_ROUTING). When nf_conntrack_proto_tcp encounters a packet with lower-layer padding, nf_ip_checksum() fails causing a "nf_ct_tcp: bad TCP checksum" log message. While extra zero bytes don't affect the checksum, the length in the IP pseudoheader does. That length is based on skb->len, and without trimming, it doesn't match the length the sender used when computing the checksum. In ovs_ct_execute(), trim the skb to the L3 length before higher-layer processing. Signed-off-by: Ed Swierk Acked-by: Pravin B Shelar Signed-off-by: David S. Miller Cc: Ed Swierk Signed-off-by: Greg Rose --- datapath/conntrack.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index d58240b..e53b8e3 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1138,6 +1138,36 @@ static int ovs_ct_commit(struct net *net, struct sw_flow_key *key, return 0; } +/* Trim the skb to the length specified by the IP/IPv6 header, + * removing any trailing lower-layer padding. This prepares the skb + * for higher-layer processing that assumes skb->len excludes padding + * (such as nf_ip_checksum). The caller needs to pull the skb to the + * network header, and ensure ip_hdr/ipv6_hdr points to valid data. + */ +static int ovs_skb_network_trim(struct sk_buff *skb) +{ + unsigned int len; + int err; + + switch (skb->protocol) { + case htons(ETH_P_IP): + len = ntohs(ip_hdr(skb)->tot_len); + break; + case htons(ETH_P_IPV6): + len = sizeof(struct ipv6hdr) + + ntohs(ipv6_hdr(skb)->payload_len); + break; + default: + len = skb->len; + } + + err = pskb_trim_rcsum(skb, len); + if (err) + kfree_skb(skb); + + return err; +} + /* Returns 0 on success, -EINPROGRESS if 'skb' is stolen, or other nonzero * value if 'skb' is freed. */ @@ -1152,6 +1182,10 @@ int ovs_ct_execute(struct net *net, struct sk_buff *skb, nh_ofs = skb_network_offset(skb); skb_pull_rcsum(skb, nh_ofs); + err = ovs_skb_network_trim(skb); + if (err) + return err; + if (key->ip.frag != OVS_FRAG_TYPE_NONE) { err = handle_fragments(net, key, info->zone.id, skb); if (err) From patchwork Wed Feb 14 23:18:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873572 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="YGAx5Fte"; 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 3zhb5T54dkz9t2l for ; Thu, 15 Feb 2018 10:21:49 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BF182FD9; Wed, 14 Feb 2018 23:18:39 +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 2B688FD5 for ; Wed, 14 Feb 2018 23:18:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id EFDCF1C0 for ; Wed, 14 Feb 2018 23:18:37 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id f4so9398615plr.10 for ; Wed, 14 Feb 2018 15:18:37 -0800 (PST) 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=UZ0hv1cMFwrTUj+wDdDy4VTHQotomAuygaQYefdTXyo=; b=YGAx5FteRtBTNMQmvD1NTQ39NcBDOy2T69DiMt+YpKCxBFnkrkr7fFu+isilPym3xU +rEFp0kFmmWPQrypIim3BVeD+391f+SGovmOKTxtUZ3vX+q3hV3PXiD5OdrpFLgIxAAT qv/dNupZ/ksTdjLJNNpaE+DA/ysxjMMXk6HhmtJTC8sZ3y+QOW8sghSgukZfY6m7T5MH 1ycW0elXP0cHJuZ+UBqaGV8DaE91XTqGUMO6IUMDe+f+rqkexuS+Hs5bBvVSEbv5g3Rq ZRDdPrulndLTwleZMziH4UjreIqhagPnWTQYjgFtBTRIY1ROtJ+GNkMl3MAxQusjtnF4 uEWw== 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=UZ0hv1cMFwrTUj+wDdDy4VTHQotomAuygaQYefdTXyo=; b=IIPwYQtWXApdyAeiZaGm9nNhteRhkbqJRC6n0oTlOQm/JEtKdS1rvnwFKKUZFT8gfe 22Le5IUajhSzpPlRruev3tO71jPO01Y7JmV/q+BgvKQmptWmabZDvV//EdTfTBgVwPj2 cWq0nDtmDmCFWkca2fHWDgFiIFk3Hzq+SciNzHxs6Cfe12/FBJAY6GEog1c/b8boKFrc ljWIPBLBQqNHeX7ZIzHxCDmgzEeAlQQyT7ozqRExb5Ed2YNAmliH/vCn2t9Shv3EppkT SuQqOmwFkZKZ/3EOiJ9hKoBxbBbV1+sTk29FgWBJIe3kinR13qtTkilL8ld7HP3FouRs mB6Q== X-Gm-Message-State: APf1xPAqr71K15MzPz6AXlZa4gn/DJ+ncQm7UtrEl9kIesJ5tkDafOVt exHwyP1sxmhPvTSR77Vzqllgog== X-Google-Smtp-Source: AH8x227+GiDBufnt/GkqVUPzSjZ4Lc93POuAT20iCVSHPeJWxUJJpHObH6Bz+RL9jjemijeIcYBDVQ== X-Received: by 2002:a17:902:2904:: with SMTP id g4-v6mr600198plb.170.1518650317256; Wed, 14 Feb 2018 15:18:37 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:36 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:09 -0800 Message-Id: <1518650290-31536-8-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 7/8] acinclude: Enable building for Linux kernel 4.15 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 Signed-off-by: Greg Rose --- acinclude.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index c8cfbe1..b5f62cc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [ AC_MSG_RESULT([$kversion]) if test "$version" -ge 4; then - if test "$version" = 4 && test "$patchlevel" -le 14; then + if test "$version" = 4 && test "$patchlevel" -le 15; then : # Linux 4.x else - AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.14.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.15.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 Wed Feb 14 23:18:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 873573 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="lflxLE2f"; 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 3zhb672JmHz9t2l for ; Thu, 15 Feb 2018 10:22:23 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 07491FFE; Wed, 14 Feb 2018 23:18:42 +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 06008FF0 for ; Wed, 14 Feb 2018 23:18:40 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C99C2405 for ; Wed, 14 Feb 2018 23:18:39 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id 31so3891167ple.9 for ; Wed, 14 Feb 2018 15:18:39 -0800 (PST) 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=Z8okC0SjWrm48Sqj47dMsIvgF8gpdrzUCWyJARAs3Ig=; b=lflxLE2fS0q6iVclVkyOjXFJl/1MMkXVQixjIrT+Z3ouY+6StjcW6LLz/4ylh5Y/Pg wAhp9UKnIuDFpZicW1IvgUdTYTDDFbO6iVNbtfKojQGC7432Lt2d6DYmbo3jATpqs2oo GDrwo0EhzAa1jQdySAvj7anBVInJ+MYbm48qv9y++2kWUk+QPMFHhHT9X9g7APq3TffY fwCUCmDf8gqtR0K4b/6qSNYKE/olpHuX1LWrgd/M0GjxvgvpgG3UOCVEnFoaddQ8WX32 w+OrMZf6Qn9Vy6540W0KfaRBM1+69UcCyB7wsvwHtRMme5s+tf/LgT1jTn9YmFVg7Pey 0v3Q== 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=Z8okC0SjWrm48Sqj47dMsIvgF8gpdrzUCWyJARAs3Ig=; b=RauUMIZrGzKwe6QjdI8P/mu/pUKzl2nByxAcZ1qsFwuFjIVYbwa494BGu2UnuXqIcz RizjLIMDn5DNSv/RfoQUg2nHgU2e2vH9izNTvo5lHBJMNDMhWeg1XVwIWpr5SkF9R4v1 y+ICM+L+7F1AfsZ0zhX1e/qp15AcuXnr6d4i3Kq4Be8iN/UWVVCMk+Jq0K+HhgZO0WBs YELFXlHrSLSKCFdoPj16IyytAOpLW86MzuE7QatinxZGE4Ll/GWIIHyAfu1D40J48ltp fH03RhCMRsIy1MMIV4YC9CrMMuTRIR4EF2QcTABLPgSJ2TPXN1MYonZ0LJDMtYAS4iA8 wOMA== X-Gm-Message-State: APf1xPAXaOjHNAYeP3QmFwVW5SgWQBFS/ubULWYmIeus9IAtLqHDxQ3V gyUv9Ss8/pmqDjb9lWOVXSoQhQ== X-Google-Smtp-Source: AH8x227TYMN0lGLw8C9BXWmZ4iWqb5PVvTswHjp90RP+Icf5UBvsjVl3aCnalcymX9dJmesLhwwZIg== X-Received: by 2002:a17:902:6849:: with SMTP id f9-v6mr604913pln.113.1518650319077; Wed, 14 Feb 2018 15:18:39 -0800 (PST) Received: from gizo.domain (184-100-240-187.ptld.qwest.net. [184.100.240.187]) by smtp.gmail.com with ESMTPSA id v1sm34681912pfg.33.2018.02.14.15.18.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 15:18:38 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 14 Feb 2018 15:18:10 -0800 Message-Id: <1518650290-31536-9-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> References: <1518650290-31536-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 8/8] travis: Update Linux kernel test 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 Add newly supported 4.15 release and also update the kernel test list to the LTS list at www.kernel.org. Signed-off-by: Greg Rose --- .travis.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfd9b6f..ef907ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,14 +27,15 @@ sudo: false env: - OPTS="--disable-ssl" - - TESTSUITE=1 KERNEL=3.16.53 + - TESTSUITE=1 KERNEL=3.16.54 - TESTSUITE=1 OPTS="--enable-shared" - BUILD_ENV="-m32" OPTS="--disable-ssl" - - KERNEL=3.16.53 DPDK=1 - - KERNEL=3.16.53 DPDK=1 OPTS="--enable-shared" - - KERNEL=4.14.15 - - KERNEL=4.9.78 - - KERNEL=4.4.113 + - KERNEL=3.16.54 DPDK=1 + - KERNEL=3.16.54 DPDK=1 OPTS="--enable-shared" + - KERNEL=4.15.3 + - KERNEL=4.14.19 + - KERNEL=4.9.81 + - KERNEL=4.4.115 - KERNEL=4.1.49 - KERNEL=3.10.108 - TESTSUITE=1 LIBS=-ljemalloc