Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp9981ybt; Tue, 23 Jun 2020 13:55:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycHVgW0eP1it6oeS5myVqLlouEjG649ei6Zf5yC4GkhpWCF6y+ZV2G443ke0xo/HgHtx4s X-Received: by 2002:a50:b8e3:: with SMTP id l90mr13256720ede.172.1592945734223; Tue, 23 Jun 2020 13:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592945734; cv=none; d=google.com; s=arc-20160816; b=LlRJAldkGXnDAECaDH80cshIFvPBJW+NIp68F8HZwL9U3VWtUNMT6yoo48BdOoVZIp dwMfpxTAXdNlfEdFeCuHPIBudjo/DjxXrGEtC6OD1zc/czEQ5+B+zAldorK7rfb7NW56 H4WAhzpUqqYaSXcR1+mXHKa11KRoAmoBFy3kD2fKnKzMh66jCYE+jNDMMgdNWoKwn37V 8FYXFnXALR7MKuX7uONgzMAWzsdvRytlnG3Ocz/5dLDNjV0KUCLD4sguJe6xuBfbQa9j 03SA7IzFqPfFoGRPPJHmCgoqMByu6dOSvIYIdgkm2BHDv9rl2t8pSiesNbf7g8obXdJO YN9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ktgpCuk3BNCusZDQoQ9C3KIj7Lfzdz2VW3VbGm4YGa4=; b=NvHtQckWj147Deognod8pabg4M/UBTjP+XurWM+VOwIBbtt250TyOTKTnBegI7RT0t yAwWuN91D2JeM6sLaNLSmpFvmjxpbVLEuZ49OQFhOUGEERmhIcV6zLvMiK/w6UUisobF DaNinYfI/jtjhJwc5vQg7Fnl7C1aS1k4poTnGyKjWFDpT4nGzsSgKw5pf2Tq45/+Uy+k A8bJoxglHTReePxTySde7robYtyB4eC5yRn95ljlhQR5G/x2kC/jsLrYMUPGCZaAwJlU Jof7Q5ss1+2EZiRTZX3kf/1OTl5O13KuX3W/U889/VhAXwl0LvD4jTJJJ78HzNZm5+2Y 3onQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Aehq64tz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si11955614eji.495.2020.06.23.13.55.11; Tue, 23 Jun 2020 13:55:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Aehq64tz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390829AbgFWUws (ORCPT + 99 others); Tue, 23 Jun 2020 16:52:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:45628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392359AbgFWUrR (ORCPT ); Tue, 23 Jun 2020 16:47:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB03321548; Tue, 23 Jun 2020 20:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945237; bh=KXNT2BGgxLyfWbI/dMW1t1lIfe+k9Gw1cvEYm9KvZbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aehq64tziRogofQ9ydJc7h7eva8uU+zec/v57Ziz9NmdJKY2oSk6IoOA+YhW1IwaH KeBQuTMMaKvn5UPyvZQFHFNGiuxNcxluukvRvMsFs0Kov2oGAZ8Er+VQEbsf+veOhk lH0ntjXwT4xg22chRyosms7q/h7/2BOuCv58U3wA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiri Benc , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 092/136] geneve: change from tx_error to tx_dropped on missing metadata Date: Tue, 23 Jun 2020 21:59:08 +0200 Message-Id: <20200623195308.293838166@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195303.601828702@linuxfoundation.org> References: <20200623195303.601828702@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Benc [ Upstream commit 9d149045b3c0e44c049cdbce8a64e19415290017 ] If the geneve interface is in collect_md (external) mode, it can't send any packets submitted directly to its net interface, as such packets won't have metadata attached. This is expected. However, the kernel itself sends some packets to the interface, most notably, IPv6 DAD, IPv6 multicast listener reports, etc. This is not wrong, as tunnel metadata can be specified in routing table (although technically, that has never worked for IPv6, but hopefully will be fixed eventually) and then the interface must correctly participate in IPv6 housekeeping. The problem is that any such attempt increases the tx_error counter. Just bringing up a geneve interface with IPv6 enabled is enough to see a number of tx_errors. That causes confusion among users, prompting them to find a network error where there is none. Change the counter used to tx_dropped. That better conveys the meaning (there's nothing wrong going on, just some packets are getting dropped) and hopefully will make admins panic less. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/geneve.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 6d3fa36b16160..3c9f8770f7e78 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -915,9 +915,10 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev) if (geneve->collect_md) { info = skb_tunnel_info(skb); if (unlikely(!info || !(info->mode & IP_TUNNEL_INFO_TX))) { - err = -EINVAL; netdev_dbg(dev, "no tunnel metadata\n"); - goto tx_error; + dev_kfree_skb(skb); + dev->stats.tx_dropped++; + return NETDEV_TX_OK; } } else { info = &geneve->info; @@ -934,7 +935,7 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev) if (likely(!err)) return NETDEV_TX_OK; -tx_error: + dev_kfree_skb(skb); if (err == -ELOOP) -- 2.25.1