From nobody Thu Oct 17 19:21:17 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 4XTyPP67v3z5ZNl7 for ; Thu, 17 Oct 2024 19:21:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTyPP4L0Bz4b5N for ; Thu, 17 Oct 2024 19:21:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7db90a28cf6so1698086a12.0 for ; Thu, 17 Oct 2024 12:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1729192888; x=1729797688; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZN4chF7Ng6AZCQhU2y8dN7hp2lulgkX1NsBk8m+Rkkc=; b=u2MsWwuP81sKeyi5lbRwUStqwemvV56lYvYfi2NecgxQg/ppcYFBu8O9gbrCCN5GBx GIidRRoDaNRhM8FH1S3yLDJQXl5ryp/V/boejCBrBn9CeUrmibJP55Q6ZpW9MrUFCUjr wgnWpUPY1LiJuESonK13EEZcgIWyua664UoK7yn2Yhke5jZhl7i+HXaRYFs6sbKDooJ0 Sk1sInFttwqKSTvFCYLyCQ0qDDIb50FCxfmHDDfozjl6RFV7uzGX9FixkmJHNhfpzjR0 n3pTa1HLpT1+Z/0xfEcSMoVWpqdMaOebrpoyks1Ko38t6WP/6S5SRM2pn8xpfzDnf5PQ bfgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729192888; x=1729797688; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZN4chF7Ng6AZCQhU2y8dN7hp2lulgkX1NsBk8m+Rkkc=; b=Nb0/7l5DABMTaKBNnts66XzWXE31ecmo9935WzjPqjR1x/xD+jT3U2fqSw5ZMaszRl 0HtI3bgyH1HBCl03v8soy0u7tyB1S1rBR+iJgC78C2fj27nlL4D9QbXGk6RO8v0tlOWS FWa0Af5jQEWtq0M1EFzUNkNDwBAIfPm4vMzjyFY2S/Oui4mg16fOS3wLQWzUuqSQGoKE yHR0FcUdiQLuz6unycCH0pjlQW3XehrmicizOfngI4KjFvAtOdK3BpcK9HBHEP//toD0 Put96SagrjGAf45yoxhsn2lKphT24kpwwn5hW6gISBkr1FWgnd7WVD0i2SK3M58yp2fI gmwA== X-Forwarded-Encrypted: i=1; AJvYcCXjJmUKcNmT59kBzy5T6e6FRMY/pFdgcjwMaVhlN9tUq1WsWEErs6iXQH+UnU59N0Hhp3Dn+4gquHa7caB+alxGkHDS@freebsd.org X-Gm-Message-State: AOJu0YyPgsKacqf0Rb3aVog6Fx3aAiFCriDemc1/xlRsnMOfA+w89H2y HNK/10Cbaen+8o8PMFSUGuHpVDMs7W+G01CJrI/tbml6Gk8e/JUeFkEedDlUAS2nE+A+xKkWULF fsYXtb/wFkIdn9uHVCIRevN9Daj80IrGFk11zEQ== X-Google-Smtp-Source: AGHT+IENP8p+tmlEzdsEsJcxX9Gr3CyMB/JCXwq+dR0aeafvT261TsUqGWPszJkyeKLosvcHzlO5m7Mo8MOTAeolgfk= X-Received: by 2002:a05:6a21:3a44:b0:1d7:1288:8338 with SMTP id adf61e73a8af0-1d92b66689cmr356022637.8.1729192888205; Thu, 17 Oct 2024 12:21:28 -0700 (PDT) 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 References: <202410140540.49E5ep2I089300@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 17 Oct 2024 13:21:17 -0600 Message-ID: Subject: Re: git: cafc839393db - main - ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d9a0870624b11709" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XTyPP4L0Bz4b5N X-Spamd-Bar: ---- --000000000000d9a0870624b11709 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 17, 2024 at 1:16=E2=80=AFPM Konstantin Belousov wrote: > On Mon, Oct 14, 2024 at 05:40:51AM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dcafc839393db5c5d8000fd086118b3c= 7b47e95c2 > > > > commit cafc839393db5c5d8000fd086118b3c7b47e95c2 > > Author: Peter Eriksson > > AuthorDate: 2024-10-14 04:01:33 +0000 > > Commit: Warner Losh > > CommitDate: 2024-10-14 05:22:19 +0000 > > > > ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC > > > > This appears to be harmless, so ignore data over/under run on > > diagnostics. > > > > PR: 246279 > > Reviewed by: imp > > Tested by: Marek Zarychta > > Differential Revision: https://reviews.freebsd.org/D25155 > I am not sure what does the data overrun or underrun means in this > context. But ciss(4) is very unhappy with an IOMMU turned on. It > is so broken with it handling of DMA that controller even does not > attach, causing faults and timing out. > That's a different problem. The under/overrun is technically correct, but expected due to flaws in the firmware (I think) for certain transfers when you don't know the size a-priori. So all the data the driver needs comes across, but the firmware knows it has more that it dropped on the floor so reports this status (I believe, again, don't have the hardware or the docs and puzzled this out reading the code doing the code review years ago, and haven't refreshed my memory since then). > I did not tried to read the ciss code to see where the faults come > from. > Yea, I don't have the hardware, so can't help there. This was in my backlog for people that do and have reported these patches work for them, but the age of the original ciss adapters suggest that it predates IOMMU deployment, so mistakes in that area would not surprise me. Warner --000000000000d9a0870624b11709 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Oct 17, 2024 at 1:16=E2=80=AF= PM Konstantin Belousov <kostikbel= @gmail.com> wrote:
On Mon, Oct 14, 2024 at 05:40:51AM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3Dcafc839393db5c5d8000fd086118b3c7b47e95c2<= /a>
>
> commit cafc839393db5c5d8000fd086118b3c7b47e95c2
> Author:=C2=A0 =C2=A0 =C2=A0Peter Eriksson <
pen@lysator.liu.se>
> AuthorDate: 2024-10-14 04:01:33 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-10-14 05:22:19 +0000
>
>=C2=A0 =C2=A0 =C2=A0ciss: Ignore data over/under run on RECEIVE_DIAGNOS= TIC
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0This appears to be harmless, so ignore data over/un= der run on
>=C2=A0 =C2=A0 =C2=A0diagnostics.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0PR: 246279
>=C2=A0 =C2=A0 =C2=A0Reviewed by: imp
>=C2=A0 =C2=A0 =C2=A0Tested by: Marek Zarychta
>=C2=A0 =C2=A0 =C2=A0Differential Revision: https://reviews.fre= ebsd.org/D25155
I am not sure what does the data overrun or underrun means in this
context.=C2=A0 But ciss(4) is very unhappy with an IOMMU turned on.=C2=A0 I= t
is so broken with it handling of DMA that controller even does not
attach, causing faults and timing out.

= That's a different problem. The under/overrun is technically correct,
but expected due to flaws in the firmware (I think) for certain tr= ansfers
when you don't know the size a-priori. So all the dat= a the driver
needs comes across, but the firmware knows it has mo= re that it
dropped on the floor so reports this status (I believe= , again, don't
have the hardware or the docs and puzzled this= out reading the code
doing the code review years ago, and haven&= #39;t refreshed my memory
since then).
=C2=A0
I did not tried to read the ciss code to see where the faults come
from.

Yea, I don't have the hardwar= e, so can't help there. This was in
my backlog for people tha= t do and have reported these patches
work for them, but the age o= f the original ciss adapters suggest that
it predates IOMMU deplo= yment, so mistakes in that area would not
surprise me.
=
Warner
--000000000000d9a0870624b11709--