From nobody Thu Oct 31 16:01:32 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 4XfTJF14q1z5bx2R; Thu, 31 Oct 2024 16:01:33 +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 4XfTJD5fmgz4Sxd; Thu, 31 Oct 2024 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390492; 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=liS+S87AoROmJP4iRYWt1omEFQqtsGYTKw7He310eCg=; b=TD2+qldLpmLI3TD1g1898MchWHkBSRZxZc4NL0QmhTCiN87o6moaJjaNoy42O5y2jr33nS XNsYur19NGp0m5PoSwNlhPeYnmX0YGCLuUwTF09vDtFNGTqb2uC7i/yAPdnRzhrOV+jNHf cG9HmyDAIUlb5bSI+W8bpj8St/c55HsW/Lu7yM75nrwqalmC5YuS2dFn6e/9wzcmHKLdIX 0iADwBAKP8cAEgJyVjfl2aSK5M+tyAB6v2W6iyGThVEukZUeuEP1uF2yp4NbmyV+J5epFC /x+1LCrKh5Kuaajs2gEyEoS2j0IrJ0o/2rvkxcVaQDPNlKNm5QjB3MbyvzJcSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730390492; 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=liS+S87AoROmJP4iRYWt1omEFQqtsGYTKw7He310eCg=; b=MOEB37xSyv6IkJSOn3JDz52wnLYUxT9kFUD2zlC5GzCLD4+4xBTdFtDYxnoPt0dN9frON3 1bUf4nAHC8favGebAVSx7oPG7+TBRuoBSQhrse4ITP0FBiXRGTE/43949rIBKaqwx9Wb4u nRWe96JvKJq8tlwWZZNUlDZadEWLf/cgnVt2Mt9HOKjBCFuruNv+uMmcLPQgOfKwtfK0xo GVj4+sj3ZocCbO7NUXWh23H1meDSKL0v4Uuq7yH8eySp9YXDkNcyKge9lG0Wcm8A8U/GYr OZSCFVoUcKM6UlEtBUfGBumvg1mtKd/kbowADoDFgzFHESLFC+Psq+TMDlQiog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730390492; a=rsa-sha256; cv=none; b=Vq/5KY3nqPSjNWB3i+codNVtn9PmRVcLA06GYrF7vWy+i7OHEltmMo9oRqCOLY4TWMSdDd RdxI0AJSXl/o6tYZR2LnP2x3SnuukikIyBLFZMpjBn6rlpStuyiDkhsDUaKitwa/wsH2q5 OpIsZVTEZjiPWCB1k2xr44gG97T3YN4vKh1iTiy63Cj3YUsaA5M0gR9G4YxCSphNIG/WRJ kHpZEecm68+0offqGh/1E6g9DxFU6lrJjATZ5K93K6TEujW8uV1kHShtT3tk77nttlSm46 URGvDMFucVebAOwa7zXQ01dvCNcSgG7P+EVBMhA1WowhASf/M7D/FrRra+k6vA== 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 4XfTJD4w2SzjXL; Thu, 31 Oct 2024 16:01:32 +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 49VG1WEl070373; Thu, 31 Oct 2024 16:01:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VG1WdP070370; Thu, 31 Oct 2024 16:01:32 GMT (envelope-from git) Date: Thu, 31 Oct 2024 16:01:32 GMT Message-Id: <202410311601.49VG1WdP070370@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: cc489c17d2ac - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: cc489c17d2ac7b0a18b5dac8ed31d2fa2d7a06ed Auto-Submitted: auto-generated The branch stable/14 has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc489c17d2ac7b0a18b5dac8ed31d2fa2d7a06ed commit cc489c17d2ac7b0a18b5dac8ed31d2fa2d7a06ed Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-31 14:54:11 +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 20864d0d2df6..ab082fa1810f 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); }