Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3577660rdb; Wed, 13 Sep 2023 17:07:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGyljGvWHjF7A9mhNlqPbVqOF+m3kfbeTQAoFWM7gV24ciiWBcbJeexsUsBCK9Es3g+NSxO X-Received: by 2002:a05:6808:4c7:b0:3ac:96df:6cd2 with SMTP id a7-20020a05680804c700b003ac96df6cd2mr4324349oie.10.1694650039836; Wed, 13 Sep 2023 17:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694650039; cv=none; d=google.com; s=arc-20160816; b=rQ/db4+Ztv33JorLiwbk6NeH9LYmXo/Z8PXcTblKpEfBho8uotFEUVUblOiGI7o1mK /yqn0bvRNlVraWlxzIK/F+lFP3jejJTPxQQeB5fZMljjn1gMPEKVEiJLQC4KmiW6/Apd v5PGko/SfKQFDSx2ayCqZL+umlBjDH9v1GZIWiopaZU0a4Ae08xPvmv8cn/oWb6GNS3n IeNpuYTkz4etrhn+Fzs/cqrIBEcQzTidh6ii1uBdm2UiqYYzxoUN8K3yg3MI+KOhgdzx GgM3MEsYLBhDX8X3e2ofSAS/6UcAmcnJbVe8D9Uy/f8Clo5GAjnYw3RxDE6YGoVxlDHC X5yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=73c+KW0X05c3E/YhmAUdnMarM4+QB4h/km02Ae5jcAI=; fh=B1ijnQlC9uA+eeoNSXN2x0/PWt3kJd/KHkkT6xqpWg8=; b=c6SvPai5UEad4LABmq6U8AodhRWy2A0WmbbV0Ow8wKwEUdWkztcppCRKtlSB4M1uD9 cDUl//6OCqNoxIxe1F6FxFJv2j/EJHL8Uev/Qh8iPmJazo5MRSD+Wuny6x4w2krk9fIH gDgEvEZD/DQUZpqGoC1sDhk2yFSXXb5Aor+qCwZKXe1pUqqcy/tgLGMFblPRLbRPAO2p j2LCz/BXOE5hoQcDT82XEXbfOCMfM+ahgML0rlNa6caWnnWyt3MB+0C0H9MVFU5V5n3o looxYOY/DZetZGYseww9faXnzhWwmbxjH5LZCQq2oaF8x1qNtuY1+pZV5yTEhu5yyd3j wQRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Og9Si3tN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z6-20020aa78886000000b0068fbac77dd0si348601pfe.226.2023.09.13.17.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 17:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Og9Si3tN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9BD7F8131A84; Wed, 13 Sep 2023 03:56:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239888AbjIMK4g (ORCPT + 99 others); Wed, 13 Sep 2023 06:56:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239869AbjIMK43 (ORCPT ); Wed, 13 Sep 2023 06:56:29 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9625C1726; Wed, 13 Sep 2023 03:56:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694602585; x=1726138585; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=LYSnaNLcsO7YvbC0ChoMxE2UJxhRLP+HoojmUoNAyII=; b=Og9Si3tNCOmb7HU/LVzSGar/jP8Q1qI/6g5hJL62Kd0noNVMvRRrZoyj InnKKhUMAfEHzjsUhz7A3LhtHnmb1iYjb8095JxdZcqrPws/k1XbUR21n V8fzCGdpJHbcX3+Cs6SJqIfnbKHMY4JVajHD73zgyNsVpnaUjo1nXYO2v y4mzXiCA7ybwir6Cg1/b+UUjLlDm05JSiaJjHgIfGOaqRMoAW15Sck8mT iLA2HtbQUekQ7IfvIjjEB9spdKpanIhuowxiHQmfXJ+UIQkc0yBXBOVRa pVYnn7syNligFaZWEKdsKA5yP/2fWdf1Y5PWZIzaiO/eW/FcY27zoFC6I g==; X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="464996469" X-IronPort-AV: E=Sophos;i="6.02,143,1688454000"; d="scan'208";a="464996469" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 03:56:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="737453054" X-IronPort-AV: E=Sophos;i="6.02,143,1688454000"; d="scan'208";a="737453054" Received: from naamamex-mobl.ger.corp.intel.com (HELO [10.12.48.172]) ([10.12.48.172]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 03:56:19 -0700 Message-ID: <4f9e7d31-7c73-e5c1-b34c-3924c5d6b100@linux.intel.com> Date: Wed, 13 Sep 2023 13:56:10 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] igc: Fix infinite initialization loop with early XDP redirect Content-Language: en-US To: Vinicius Costa Gomes , intel-wired-lan@lists.osuosl.org Cc: Andre Guedes , netdev@vger.kernel.org, Jesse Brandeburg , Jithu Joseph , linux-kernel@vger.kernel.org, Ferenc Fejes , Eric Dumazet , Tony Nguyen , Jakub Kicinski , Paolo Abeni , "David S. Miller" , Vedang Patel References: <20230907003005.99481-1-vinicius.gomes@intel.com> From: "naamax.meir" In-Reply-To: <20230907003005.99481-1-vinicius.gomes@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 03:56:39 -0700 (PDT) On 9/7/2023 03:30, Vinicius Costa Gomes wrote: > 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. > > Previous code was relying that when __IGC_DOWN is cleared, the NIC is > ready to transmit as all the queues are ready, what happens is that > the carrier presence will only be signaled later, after the watchdog > workqueue has a chance to run. And during this interval (between > clearing __IGC_DOWN and the watchdog running) if any transmission > happens the timeout is emitted (detected by igc_tx_timeout()) which > causes the reset, with the potential for the inifite loop. > > 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 > Reviewed-by: Maciej Fijalkowski > --- > v1 -> v2: > - Added more information to the commit message (Maciej Fijalkowski) > > > drivers/net/ethernet/intel/igc/igc_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Tested-by: Naama Meir