From patchwork Fri May 11 11:56:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neelakantam Gaddam X-Patchwork-Id: 911951 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; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rCbhTdlg"; 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 40j7pr2M4Xz9s15 for ; Fri, 11 May 2018 21:56:19 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 1726ED6E; Fri, 11 May 2018 11:56:16 +0000 (UTC) X-Original-To: ovs-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 C5712D6B for ; Fri, 11 May 2018 11:56:14 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 441FE6A5 for ; Fri, 11 May 2018 11:56:14 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id j4-v6so2331140wme.1 for ; Fri, 11 May 2018 04:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=B7iHD89YHPwxglMFpETlgCFszYIb+mxOmZnQgqXWKOs=; b=rCbhTdlgluK/zfaqRH/D/YKpUjzdS0KwFaxHs/xJ74bnjNDtHfMZIoDHLdurUxFyTq NYGrinPP27e63ddPfPQBzrR2TmhtPVF0JAK8ykIOPan6n21AwSyma42hLCJVqFaWpywG kcDlmrQt71wP5kpg2x3qSctKZlC/pUXc204QJMVituzQXSObMV4V6hszL878NhulUuX+ 6BigzYqF7S5UW5pWMC5sdhpzj+XBHPjiapz52TDArObtyK4wkwLjgnFQwoc660XjipcL XmEjNE9OGaM/KRYLsd5YppBOuvnO9KeIxzkZN2uxjrXOVWtg+VmlxnJxowZ178QPVjlk pqKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=B7iHD89YHPwxglMFpETlgCFszYIb+mxOmZnQgqXWKOs=; b=a19eX2fEe1nJW1qD5+Tr9wYZ9ilH1HczZpcrB5JgUw/HcDkjtYKCXySYKSqvta0kL8 OttcjQEqlCXo7BfknWNshBxvCfyp401cON/8WZ/7TZhVgWU/kwq+qECwWSmncjdLXtwl +WVWc+u8cjQVLP7g5ZnZrhbHG4PopDocH8/aF59KLTf5vW+El8jpgvakQ0iLbI8Jul2V yGCrlbKLWz05FGd41Tm+Ee+LbFa++OrJkLzekJ7wy49pzcDCDcuCstb7BmFuahhf3MSq 3+2S4Uva3TtJhEFKEpRjhoWaGcPrBHQ2lrWmePMj39Mv2RNZisXLLRptNVnvrt2k2C56 mFJw== X-Gm-Message-State: ALKqPwcok3oMuuufiB1DdtEYFGal6RE/QDDj0ykdnTfmdNsZ67gWCpJ6 OZQLfZBJk3jVE+RpcXCATDOc2A6KLNk//YVNg8sTtVPF X-Google-Smtp-Source: AB8JxZqwAMSbep0usRhw09BBIN0SaukYPdocPmnREH17CPw/59FF6FobSpZlZFgkGIga1DdX17lk9mrY+hvl6WThrh0= X-Received: by 2002:a50:8fa5:: with SMTP id y34-v6mr7197992edy.290.1526039772539; Fri, 11 May 2018 04:56:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.153.6 with HTTP; Fri, 11 May 2018 04:56:12 -0700 (PDT) From: Neelakantam Gaddam Date: Fri, 11 May 2018 17:26:12 +0530 Message-ID: To: ovs-dev@openvswitch.org X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Content-Filtered-By: Mailman/MimeDel 2.1.12 Subject: [ovs-dev] [PATCH] compat: Fix for soft lockup issue with vxlan misconfiguration 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 This patch fixes the kernel soft lockup issue with vxlan configuration where the tunneled packet is sent on the same bridge where vxlan port is attached to. It detects the loop in vxlan xmit function and drops if loop is detected. dev->stats.collisions++; @@ -1174,7 +1175,8 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, goto tx_error; } - if (ndst->dev == dev) { + if ((ndst->dev == dev) || + (OVS_CB(skb)->input_vport->dev == ndst->dev)) { netdev_dbg(dev, "circular route to %pI6\n", &dst->sin6.sin6_addr); dst_release(ndst); --- a/datapath/linux/compat/vxlan.c +++ b/datapath/linux/compat/vxlan.c @@ -1115,7 +1115,8 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, goto tx_error; } - if (rt->dst.dev == dev) { + if ((rt->dst.dev == dev) || + (OVS_CB(skb)->input_vport->dev == rt->dst.dev)) { netdev_dbg(dev, "circular route to %pI4\n", &dst->sin.sin_addr.s_addr);