From nobody Thu Oct 31 16:00:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XfTGb0GLkz5bwVR; Thu, 31 Oct 2024 16:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfTGZ5R1jz4PDc; Thu, 31 Oct 2024 16:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+UDIuX/9nRKv8ZcGTXYZPh+QpR7d3hIi9DsKF9sH5PA=; b=gTG3wsTkZ2A3h8FfCqEO4q7hX4v+Z4mlmEA1bDiV3ArtEPpCmGNHkSQIEe1z0x7nvofBwm /3aHBL6Dh/KG61f3JkOg619HsUaGVnTotLfPUsXbsDFxV6bmOysIf4xzwhNyCkek+Ldiqa GcpbXGlYXyuSJD8U9mk75gMn5rozqDr0UyAqHMdGCU2yOSzYlDdiLPmfolaRRzM9OxaJv5 CDSUIXMQwFj9wmm+6U7+Lxi3babLJQB4PmCN9UCfeWpI4/2wcqECqh6UbBJFZ6U/MMOvrQ 7eBLaTCvHAEk3MoTcEBmvo6FD9Qri0lCKdsQV55fCeaw/OZE93tslt88z+Gm1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+UDIuX/9nRKv8ZcGTXYZPh+QpR7d3hIi9DsKF9sH5PA=; b=q/e7rdWA6NeKREUiIrpTcK6CSRwU3mqovyMB2hMmWB/YvLWifr74990bnSg001RykmBpZC HEwqQOrsK6CyoxpqFrEfMT+0igpVdILeETBOezGgWyzmR8T3H74SDe5/zDvgwtjdiJpn8q x0Z6kmRCnkxJlW3bT37P3qHz6JwR/UmyiU50Q4pLLB87LPhYE6EvSdMZJfKp0so7OYWCUR 3lkNKmgS+P4ndo8D1JimANYnYd9xJvkYIPT5qoVWbHCP5+nyg/QRJAMYdmy3u4fXfrvQu+ +n9Digksu29AbHxDur4aa2rQBwJ59WP15HB6mrAuSrE0su0qv01HcLug5MHZoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730390406; a=rsa-sha256; cv=none; b=NvqJUdSP5y4LR1ROF6TXpLQO37QESbUpqCZ6chckfE5CPsUzOtvZlTjvOSpy907gbSFSD7 PFT7L0Re0RnP5TnxSG4x5+DmIDEgNDteKptrCNn/gqzeJU4rxbDgjfmEOhFuEsAHLolXdb 6VtDL0bz7eD9zgCBxEwFhRVwax7I3X7Zyhdy2oIY70MxPDoHwleLjKP155TvZF25J7PHc5 wDHt8LiPMPsBBPPHqE13wHYuNIx5hEvgou56UOrj9h1Ew9Fq8FhQn3hkwlFSmPs4IsE/+/ jiM3p+imNF02p6Ow3Y+HILjuYLA9mSvc8WUDaQw2QbHob0rSNEOmL0zUaPvHzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XfTGZ4y6QzjV6; Thu, 31 Oct 2024 16:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VG06EV061014; Thu, 31 Oct 2024 16:00:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VG06Wc061010; Thu, 31 Oct 2024 16:00:06 GMT (envelope-from git) Date: Thu, 31 Oct 2024 16:00:06 GMT Message-Id: <202410311600.49VG06Wc061010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Osama Abboud Subject: git: 6219b3398435 - stable/13 - ena: Trigger reset when mbuf is NULL error happens List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osamaabb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6219b33984353e81a4acb4c487569203ed2d87b2 Auto-Submitted: auto-generated The branch stable/13 has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=6219b33984353e81a4acb4c487569203ed2d87b2 commit 6219b33984353e81a4acb4c487569203ed2d87b2 Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-31 14:55:20 +0000 ena: Trigger reset when mbuf is NULL error happens The mbuf is NULL issue happens when the device sends the driver a completion with a wrong request id. Trigger a reset whenever this happens. Approved by: cperciva (mentor) Sponsored by: Amazon, Inc. (cherry picked from commit da73e3a7d08c215a5d8530fea9a9730f8ac3709f) --- sys/dev/ena/ena_datapath.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/ena/ena_datapath.c b/sys/dev/ena/ena_datapath.c index 17a9c2c37f4d..90662cf9313b 100644 --- a/sys/dev/ena/ena_datapath.c +++ b/sys/dev/ena/ena_datapath.c @@ -434,7 +434,9 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs, req_id = ena_bufs[buf].req_id; rx_info = &rx_ring->rx_buffer_info[req_id]; if (unlikely(rx_info->mbuf == NULL)) { - ena_log(pdev, ERR, "NULL mbuf in rx_info"); + ena_log(pdev, ERR, "NULL mbuf in rx_info. qid %u req_id %u\n", + rx_ring->qid, req_id); + ena_trigger_reset(adapter, ENA_REGS_RESET_INV_RX_REQ_ID); return (NULL); } @@ -476,7 +478,8 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs, rx_info = &rx_ring->rx_buffer_info[req_id]; if (unlikely(rx_info->mbuf == NULL)) { - ena_log(pdev, ERR, "NULL mbuf in rx_info"); + ena_log(pdev, ERR, "NULL mbuf in rx_info. qid %u req_id %u\n", + rx_ring->qid, req_id); /* * If one of the required mbufs was not allocated yet, * we can break there. @@ -488,6 +491,7 @@ ena_rx_mbuf(struct ena_ring *rx_ring, struct ena_com_rx_buf_info *ena_bufs, * with hw ring. */ m_freem(mbuf); + ena_trigger_reset(adapter, ENA_REGS_RESET_INV_RX_REQ_ID); return (NULL); }