From nobody Tue Oct 15 17:43:11 2024 X-Original-To: dev-commits-src-main@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 4XShJw4RJKz5YlcL; Tue, 15 Oct 2024 17:43:12 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XShJw16Prz4ZGp; Tue, 15 Oct 2024 17:43:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014192; 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=a8HFHvQL6CaYAKrD9JZaOw+47tnC4QBecfrz5scraR4=; b=gufmZDdsRH1K+aewz9oghw5nVqJlU70idRE/e4Tesov1aREy5o5RU7a5pHSpaU4Sb9Xy6+ i6/hPwBx6Dp9vVLA7TE3jLIGxdYzPuAnBF/6QWiCtDTr24I6RF6e6bAba1m2oco6r7d7+g u0cx92R4T17uL+sF4bQOqmQWDAv0Ya7LV94D7Djq2r6h5+Yr4WuXcDQgPAEZRuHDXPGyU/ btH7qFBO063YlXUdXgp97cXxsxu4NdY+0YP7wbsyp+ee39OhGwBhLCFX2RvDoeLxVHREwK Uqh2rf3ma4hyV37imcYHXwSWev2bfR4l8xlKKWw95XQlxlcirnogmSnz/5OISQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729014192; 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=a8HFHvQL6CaYAKrD9JZaOw+47tnC4QBecfrz5scraR4=; b=sQaxPQF/d1QrEiQUXfMteQ4Yp8DfB11w89io1YU8YZeBc6Fw9FngCxZxEMrOz84dxwI1Q4 7B5TgOUtLZicsC8OQ3NdaOAeNARwdQSrWcEQDr3yRUzupLbgdiigF6kvlEVNP/OLLBBu6i SYpO2nO1cd6oJERYu/pTsqwhIFqnvCMIwd34IPJdfeDw5O+ZvKeplYm0hEOhqf2pJ+VazX nRYwAzFqnAoMaSKOwBiGi5QiJL4kvIodk8+k0vr/p+1pmpOHrE+gjKWXjFRcTwGLBeXpJg OIIH1IREjehnbPsW7ykAcL6+AYSiz0s3fm1iWtPW6TIyR6DupdcT7iCHNpPo+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729014192; a=rsa-sha256; cv=none; b=rULw7v/z9D7XV9AQ+LgR8HCwMPevt6nrSUDnU3l9GMlGehL0MKgnLHsqZr0JBZtml/0WEl Ftdm6OKKP7WICQMMZIFKBw2Ce5vOU65ro9eRbIrrEJYUhiT+sKc91zui9arvL04V8q8LZq 9PamnxMEgsCFdJPjxHrpwkU5qKQHB2kYNTs8IEWoEq+A7A7uCIDbt284OTVhUQ41RkiqZM TeGCBI0zBy62Sa/yRa8pt/4gaaLXVRAhvUuJtEwN8zJaxq/CkqBj2Mk3m/ikKMlq47UT7f pEgWtVhLwLw5Y6qAbWLN8qF9zCXHQ42t8+Gimlw0su+WPsPuc+E7xvXDtef5RQ== 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 4XShJw0kkHzX9T; Tue, 15 Oct 2024 17:43:12 +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 49FHhBcA062338; Tue, 15 Oct 2024 17:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FHhBEx062335; Tue, 15 Oct 2024 17:43:11 GMT (envelope-from git) Date: Tue, 15 Oct 2024 17:43:11 GMT Message-Id: <202410151743.49FHhBEx062335@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Osama Abboud Subject: git: da73e3a7d08c - main - ena: Trigger reset when mbuf is NULL error happens List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: da73e3a7d08c215a5d8530fea9a9730f8ac3709f Auto-Submitted: auto-generated The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=da73e3a7d08c215a5d8530fea9a9730f8ac3709f commit da73e3a7d08c215a5d8530fea9a9730f8ac3709f Author: Osama Abboud AuthorDate: 2024-08-07 06:24:20 +0000 Commit: Osama Abboud CommitDate: 2024-10-15 17:38:32 +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) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- 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); }