From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D4C1243E9E; Thu, 18 Apr 2024 10:20:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BF8F40E09; Thu, 18 Apr 2024 10:20:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id DF5C940E09 for ; Thu, 18 Apr 2024 10:20:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713428440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tHSFOhY5PNwK4dm6qcVwa8bbDyveDuGNuRO+JJFO9p0=; b=FbuYtfyGo+IeZMJZBrhTo7gcJMQF97z7DdIOquZfTXtPiSpoLLccknG6TdMd84UuFD3XhT B0jCQ4N0ZTLAHoyXLHRlOWyjxCJ734tfPjciK9gsQhabrRop8hBFc3FXrqfviIOiTsKd/s MHYWjTGYlKHYn0cKYEPEp3Ooq7HaPd0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-583-n5I9iRnePlef1wqVCHstow-1; Thu, 18 Apr 2024 04:20:36 -0400 X-MC-Unique: n5I9iRnePlef1wqVCHstow-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 9E14080253A; Thu, 18 Apr 2024 08:20:36 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6290490EB; Thu, 18 Apr 2024 08:20:35 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@amd.com Subject: [PATCH v3 2/7] net/ice: enhance debug when HW fails to transmit Date: Thu, 18 Apr 2024 10:20:16 +0200 Message-ID: <20240418082023.1767998-3-david.marchand@redhat.com> In-Reply-To: <20240418082023.1767998-1-david.marchand@redhat.com> References: <20240405125039.897933-1-david.marchand@redhat.com> <20240418082023.1767998-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org At the moment, if the driver sets an incorrect Tx descriptor, the HW will raise a MDD event reported as: ice_interrupt_handler(): OICR: MDD event Add some debug info for this case. Signed-off-by: David Marchand --- Changes since v2: - dropped VF index from logs, --- drivers/net/ice/ice_ethdev.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 87385d2649..16a6caf555 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1455,6 +1455,20 @@ ice_interrupt_handler(void *param) "%d by TCLAN on TX queue %d PF# %d", event, queue, pf_num); } + + reg = ICE_READ_REG(hw, GL_MDET_TX_TDPU); + if (reg & GL_MDET_TX_TDPU_VALID_M) { + pf_num = (reg & GL_MDET_TX_TDPU_PF_NUM_M) >> + GL_MDET_TX_TDPU_PF_NUM_S; + event = (reg & GL_MDET_TX_TDPU_MAL_TYPE_M) >> + GL_MDET_TX_TDPU_MAL_TYPE_S; + queue = (reg & GL_MDET_TX_TDPU_QNUM_M) >> + GL_MDET_TX_TDPU_QNUM_S; + + PMD_DRV_LOG(WARNING, "Malicious Driver Detection event " + "%d by TDPU on TX queue %d PF# %d", + event, queue, pf_num); + } } done: /* Enable interrupt */ -- 2.44.0