Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp271834lqt; Mon, 18 Mar 2024 07:32:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiHpwTSG6fQ07iB2Yw+E4gsaTbzrvOk63Rwx3VOhDwvbH7q/3uW+pQhmHeAfdgAP5bWqCQG9DO6KWbVQx1H5JZgElMLgpaUpGzSGuHmA== X-Google-Smtp-Source: AGHT+IHOPFyJZcp8C1TXKCC+knEkT6VD1vOvPgrHwmqRCnWLBW81L/tX85deShkqfew+sUXACH6X X-Received: by 2002:a2e:98c2:0:b0:2d3:d9fd:568d with SMTP id s2-20020a2e98c2000000b002d3d9fd568dmr8202916ljj.8.1710772329905; Mon, 18 Mar 2024 07:32:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710772329; cv=pass; d=google.com; s=arc-20160816; b=xHt8LRGeX8Jp23TxpuiU9QOtlwOAvycpcl/7yKQCTe2eBE6vQJsvI/8KKeKwkNRKCS CuXYF972JM8/ftnJ/b6paoN0P6Vag9lk7y+oyrxj4vNG18LJyXk1VzEXHBd3mSsi4QNh ZEXad2GYKShItZGD96r1rQTjZj9xnBfwNBaZbjO2uhgQRqQyPqhd/DB4SvO0SdCv93nX Rw9MFx0zIpyHZC+3c3eEA531s9BlkjaMN9LKNKQMuDojtA2zJLPiRlmh1A/KENDvQVID JCq4MOvzxdX9jft5mzRFYxUzRuWV5rCpXvP0L3LYo6fa8y/9JFq7yyl9UHrObey8zcNr Cs8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+2IjUWm8Y+FHGzxhd2CLokwLJnMDbwWOQoeI56kVZVk=; fh=SVRNHM571WgfhsgYmjgXjOIMrO1aq9fhLcRYgtPEP4g=; b=QX8jXgD7xIz0PTi/GGhS32HxLX6oPfqD/qC53CVA7YYD0NZ0f2qMKYh4+3T3vo7++U GMpoxNexkRX/6c3SDN8d/DE+SXAg6Lih5CCXdNkcyB96RrW1SS/2Q/enjtC9mEbbOzgK uUC0QYfQmC5dPpL7FepBa/xzTRZK+xhn7Asy//zdaa0wzyGruM6OpBu6YEfjQgUy5aiM /0LjZGO08c8hjzL+trD9Ug5hqQtlFiqiWRk20L3v7F+qNOZnE3/1FnWdwYWbrYpV+GOi Mbc3/9IEHKMIDJVcu2bLd8LAR9QgKh2k6B6nuthSCGWtyx9QT4ou60RTDgovWj6o5myE 3Tyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X3I2yjax; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-106226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id en10-20020a056402528a00b005691a357d79si1189313edb.200.2024.03.18.07.32.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 07:32:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X3I2yjax; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-106226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9CDA11F2187F for ; Mon, 18 Mar 2024 14:32:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 843124F887; Mon, 18 Mar 2024 14:31:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="X3I2yjax" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 087874EB52 for ; Mon, 18 Mar 2024 14:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710772278; cv=none; b=piKVbGATCbCX1nVVUnVeiok1kCZaIE04/ukv3+fQli8mUJ3IWa0TqUAX3uYdxjvkvLeZgQqiT064oLGCHpIYAFWSpU0lj+TCjL9TGAtI1lzBqkwzE5zyh+7xttGG6B4/ieitJD5JoEUxiptlYuaNV7C+4a2ppe0vP9ZJBnr+xXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710772278; c=relaxed/simple; bh=LaiBiatT9yfAXlny6OpaPE+a748rWBhfxureBaGZ6yI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V6Wu7NQplpishCCj+57LxLGu1tvYsuaph251ArX8ScPECJcHZSADL8qzP2hBM6EHqogCCdSvrtziBM3oc8gBDdvG6jaGzOTRcFL1zhpExzSxP3NxeVEyNZF9r9+dXc7i8U62TliK7Jm3DH7UViTI+yQMiwyi49a4re/cHHLjZB0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=X3I2yjax; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710772276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+2IjUWm8Y+FHGzxhd2CLokwLJnMDbwWOQoeI56kVZVk=; b=X3I2yjaxB8/hi4vBJgsTzYZ/42+86Pug3k0ZdMPUS60W62JG/S2h41PdhV0WjhErgqjrH9 DigCE7avBSo27qI0+8Prey4M5/pCR6X3T+rdy4GSJXP4/N4surGGQX0/wU3oNh8byRVz94 u5sJMbVZSZLr7iKZdxF7Zthrl2RWNy8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-T6XcxlhaNFu_2qx0BPXUtA-1; Mon, 18 Mar 2024 10:31:11 -0400 X-MC-Unique: T6XcxlhaNFu_2qx0BPXUtA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F28753802130; Mon, 18 Mar 2024 14:31:10 +0000 (UTC) Received: from p1.luc.cera.cz (unknown [10.45.224.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99575112131D; Mon, 18 Mar 2024 14:31:09 +0000 (UTC) From: Ivan Vecera To: intel-wired-lan@lists.osuosl.org Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH iwl-next 3/7] i40e: Change argument of i40e_detect_recover_hung() Date: Mon, 18 Mar 2024 15:30:47 +0100 Message-ID: <20240318143058.287014-4-ivecera@redhat.com> In-Reply-To: <20240318143058.287014-1-ivecera@redhat.com> References: <20240318143058.287014-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 Commit 07d44190a389 ("i40e/i40evf: Detect and recover hung queue scenario") changes i40e_detect_recover_hung() argument type from i40e_pf* to i40e_vsi* to be shareable by both i40e and i40evf. Because the i40evf does not exist anymore and the function is exclusively used by i40e we can revert this change. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 10 ++++++---- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 7fed7fb69d4e..1ba28893f49e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -11274,7 +11274,7 @@ static void i40e_service_task(struct work_struct *work) return; if (!test_bit(__I40E_RECOVERY_MODE, pf->state)) { - i40e_detect_recover_hung(pf->vsi[pf->lan_vsi]); + i40e_detect_recover_hung(pf); i40e_sync_filters_subtask(pf); i40e_reset_subtask(pf); i40e_handle_mdd_event(pf); diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 1a12b732818e..e35a08de16b2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -860,13 +860,15 @@ u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw) /** * i40e_detect_recover_hung - Function to detect and recover hung_queues - * @vsi: pointer to vsi struct with tx queues + * @pf: pointer to PF struct * - * VSI has netdev and netdev has TX queues. This function is to check each of - * those TX queues if they are hung, trigger recovery by issuing SW interrupt. + * LAN VSI has netdev and netdev has TX queues. This function is to check + * each of those TX queues if they are hung, trigger recovery by issuing + * SW interrupt. **/ -void i40e_detect_recover_hung(struct i40e_vsi *vsi) +void i40e_detect_recover_hung(struct i40e_pf *pf) { + struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; struct i40e_ring *tx_ring = NULL; struct net_device *netdev; unsigned int i; diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h index 2cdc7de6301c..7c26c9a2bf65 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h @@ -470,7 +470,7 @@ void i40e_free_rx_resources(struct i40e_ring *rx_ring); int i40e_napi_poll(struct napi_struct *napi, int budget); void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector); u32 i40e_get_tx_pending(struct i40e_ring *ring, bool in_sw); -void i40e_detect_recover_hung(struct i40e_vsi *vsi); +void i40e_detect_recover_hung(struct i40e_pf *pf); int __i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size); bool __i40e_chk_linearize(struct sk_buff *skb); int i40e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames, -- 2.43.0