Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4972675rwl; Mon, 3 Apr 2023 12:20:39 -0700 (PDT) X-Google-Smtp-Source: AKy350adJFeKUJmOHYKka52Y5x7XaH2aBbFZiP+55fAT4etf6uPkH0I+q8KIt0BeUThAUHh5BRDF X-Received: by 2002:a17:90a:51c5:b0:234:d1c:f112 with SMTP id u63-20020a17090a51c500b002340d1cf112mr121524pjh.0.1680549639671; Mon, 03 Apr 2023 12:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680549639; cv=none; d=google.com; s=arc-20160816; b=FxhcuzE/kTu0xtu6T2Oz1z3Z60a5CRLneSzJoS1h7UZfadFlzl9TQw9sSA11uYGmW5 P1a+qmk/NViS35BM62k7YmdhYqPsTfe9pRGpv3HUOd2/dYh+jyERavEuYuvafFq5Vu6s tKnOpwIEnOZOlPl7GnalUUSLbJpBYCBrd6xFLSItcoEaZHQdnAU1aOuPTpteKG55H9ao jXGu9bcR2FVo09USgzuVPbbO4sVzlEvayErq6KbZebNgVmHftHpmL5c+bptrGjPq+fnV oCCPPRdXc1OtLJFuK+6FTXfYews/xZb0oTbtGaC+vZOqPg0XydIO5GZSZXW8O93xTHlf Bm6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Z7/RQchr8Pj95J+WgSXLoia0wI/6YDu223vZvB0HhXg=; b=PAoRqnEYTbZ6bdLtO3E8tEAWVHmkS/TqZpsGvqwKVKD994nMyXOjpxXdJ3IT91hr+b aM/TSg2lj8sMDgjPHfqQ/C2xR6hs/iNB5v12k3PLN0Qzookr7HGZ+0r/pjke30C5bvuo slAnCOuPmt649evilsDuCcGa75vZ17asEpijudezjJZ0Csw4l8iha6bIIk5U7WN1RYyA g2uP0iTetnGuBnXTDBEkpFQQvesFENYbmHUrHhG4wHQoMPTg8vgqia50y69/Qk0EcOGG FdL01RS4GMAoj88RTTwFxZ9cvr1/ozHPSAsvRq5seaOdWBNwVVYc8J3HFW2Q+9PB6xZt zX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N+v71Nge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a1709027d9600b001a1a737bc91si8476474plm.45.2023.04.03.12.20.26; Mon, 03 Apr 2023 12:20:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N+v71Nge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233393AbjDCSuP (ORCPT + 99 others); Mon, 3 Apr 2023 14:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbjDCSuO (ORCPT ); Mon, 3 Apr 2023 14:50:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B6A1BF3; Mon, 3 Apr 2023 11:50:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EE4F062806; Mon, 3 Apr 2023 18:50:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 255DBC433EF; Mon, 3 Apr 2023 18:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680547812; bh=XyIFsnMZxWnK7w6s6mNWxOXQhoe1Bgkk/2iMTtIrKvo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N+v71NgeY83lcIXTV1LJMHlfuNrVn+i5s3WfnP36VwskcR3MtdWhkapzo9usd1vvK y81qnoe5mgwlLhsRF+mON+8ypqyZ8WbhwRMZRDX0n7GsglVW/Rm9TqCX9ZZYI+xb47 JdScnjDrd4crZany4O9ydF7SGyW4EFOJ9VzIXOKGtKBS0mmpJ7HNiptISwrdy5OoE8 TaHFSHiTA2JBZHKvdGG57/DehkFIocazMQ2ONT/oFoXOu+wPxp9cTHQrTfL16iK5up MWk/hdXfD+WUUQSA+bFX4qoauggjnmXv6KfaDpxrbdjR2ZJ2mL++FSmxVOx0wh+tRp OL8oAqGEJG12Q== Date: Mon, 3 Apr 2023 11:50:11 -0700 From: Jakub Kicinski To: Felix =?UTF-8?B?SMO8dHRuZXI=?= Cc: "netdev@vger.kernel.org" , "dev@openvswitch.org" , "linux-kernel@vger.kernel.org" , Luca Czesla Subject: Re: [PATCH] net: openvswitch: fix race on port output Message-ID: <20230403115011.0d93298c@kernel.org> In-Reply-To: References: <20230331212514.7a9ee3d9@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Apr 2023 11:18:46 +0000 Felix H=C3=BCttner wrote: > On Sat, 1 Apr 2023 6:25:00 +0000 Jakub Kicinski wrote: > > On Fri, 31 Mar 2023 06:25:13 +0000 Felix H=C3=BCttner wrote: =20 > > > diff --git a/net/core/dev.c b/net/core/dev.c > > > index 253584777101..6628323b7bea 100644 > > > --- a/net/core/dev.c > > > +++ b/net/core/dev.c > > > @@ -3199,6 +3199,7 @@ static u16 skb_tx_hash(const struct net_device = *dev, > > > } > > > > > > if (skb_rx_queue_recorded(skb)) { > > > + BUG_ON(unlikely(qcount =3D=3D 0)); =20 > > > > DEBUG_NET_WARN_ON() > > =20 >=20 > However if this condition triggers we will be permanently stuck in the lo= op below. > From my understading this also means that future calls to `synchronize_ne= t` will never finish (as the packet never finishes processing). > So the user will quite probably need to restart his system. > I find DEBUG_NET_WARN_ON_ONCE to offer too little visiblity as CONFIG_DEB= UG_NET is not necessarily enabled per default. > I as the user would see it as helpful to have this information available = without additional config flags. > I would propose to use WARN_ON_ONCE skb_tx_hash() may get called a lot, we shouldn't slow it down on production systems just to catch buggy drivers, IMO.