From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF362CA1008 for ; Tue, 5 Sep 2023 21:38:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6C1EE60D76; Tue, 5 Sep 2023 21:38:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6C1EE60D76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1693949886; bh=dksekLTSqSv0uX3qqiTSnFG2GCecZQoXndKvOG+E4AY=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=DdFR9aNI2Q82Q5SxW0SxoynmDH/AsDNAcLeVbD5wSZKORd58cQ7ZMQp3wns0vCGiS VIc4mdJMSFdW/2g40JbtGqoaDdw18sXKY+WxB7zC/Y+h1wlEpR1Z+WpqqShurx/X4R jGGCZy1AVuk6BJ6BqxA7ybnuNNw4mrd4eJAYbSbrxUlVwGEE2ScP3sCMNph+Y+PGvG Vt3JpwMb849989rOWtf4/kv1EFiCu6dIO0HyBDPzFrCqbFAWv/r50NchCvC6yYXyLL qFY6yOeB29rD/vZh5VHeZI701OaZLBP9WsU6PxAmono2Q3uxW2CgtFbWrF9mVGp6PT blZnLA9NA8MSA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sk0UJYQdo7LA; Tue, 5 Sep 2023 21:38:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 8023A60DF4; Tue, 5 Sep 2023 21:38:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8023A60DF4 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1E4391BF2B4 for ; Tue, 5 Sep 2023 21:38:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E846B60DF4 for ; Tue, 5 Sep 2023 21:38:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E846B60DF4 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Iv9fGBt9uMtt for ; Tue, 5 Sep 2023 21:38:03 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by smtp3.osuosl.org (Postfix) with ESMTPS id D1A8E60D76 for ; Tue, 5 Sep 2023 21:38:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D1A8E60D76 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="443298017" X-IronPort-AV: E=Sophos;i="6.02,230,1688454000"; d="scan'208";a="443298017" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 14:38:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="864902564" X-IronPort-AV: E=Sophos;i="6.02,230,1688454000"; d="scan'208";a="864902564" Received: from vcostago-mobl3.jf.intel.com ([10.24.14.106]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 14:38:01 -0700 From: Vinicius Costa Gomes To: intel-wired-lan@lists.osuosl.org Date: Tue, 5 Sep 2023 14:37:52 -0700 Message-ID: <20230905213753.697461-1-vinicius.gomes@intel.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693949883; x=1725485883; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9apBiphN57rQ3aiF+Q7XIdDoQMMdkK/gnjUcFUrpp1Y=; b=Q5d+/0+7HmWHP0PEMBeHfOqsYHKs+dVgzuo48kwFk0D9j4ye3kGwHaxx DqhDJwExeTjsQ17VV/iyO48Hq06jwGMybyKtKAw319OQ3OQhRdquh9wk4 atTtDX7jOkoEwWbLm2ObZN8Sppd3pzezcJSvRa13xxa6GXNWGK5YSd3LF BlAGD14NNMMkyuZJ+U3G1ksnavxBQaM/IorBwuhjSmPfTDFNd/JqwDqmT NZOsIEkDz+0Q4QhS4UQSY8cMNioK2lZOY9sgayGyk/VFCfFBzjoAnnwwT tUyhetjxl7t4DtBxWBTuK5RdwBw//joZYC854LCkXSj4eWtOfGdi+aTSK w==; X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Q5d+/0+7 Subject: [Intel-wired-lan] [PATCH iwl-net v1] igc: Fix infinite initialization loop with early XDP redirect X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andre Guedes , Jithu Joseph , netdev@vger.kernel.org, Jesse Brandeburg , linux-kernel@vger.kernel.org, Ferenc Fejes , Eric Dumazet , Tony Nguyen , Jakub Kicinski , Paolo Abeni , "David S. Miller" , Vedang Patel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" When a XDP redirect happens before the link is ready, that transmission will not finish and will timeout, causing an adapter reset. If the redirects do not stop, the adapter will not stop resetting. Wait for the driver to signal that there's a carrier before allowing transmissions to proceed. Fixes: 4ff320361092 ("igc: Add support for XDP_REDIRECT action") Reported-by: Ferenc Fejes Closes: https://lore.kernel.org/netdev/0caf33cf6adb3a5bf137eeaa20e89b167c9986d5.camel@ericsson.com/ Signed-off-by: Vinicius Costa Gomes Tested-by: Ferenc Fejes --- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 293b45717683..98de34d0ce07 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -6491,7 +6491,7 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames, struct igc_ring *ring; int i, drops; - if (unlikely(test_bit(__IGC_DOWN, &adapter->state))) + if (unlikely(!netif_carrier_ok(dev))) return -ENETDOWN; if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK)) -- 2.41.0 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan