Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2024 13:21:17 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Warner Losh <imp@freebsd.org>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: cafc839393db - main - ciss: Ignore data over/under run on RECEIVE_DIAGNOSTIC
Message-ID:  <CANCZdfqsdQHMcJpDTYz7N7g5hmUn1CZf_2opmmdphr5q9xx2wg@mail.gmail.com>
In-Reply-To: <ZxFicpOow5cPKCOT@kib.kiev.ua>
References:  <202410140540.49E5ep2I089300@gitrepo.freebsd.org> <ZxFicpOow5cPKCOT@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <kostikbel@gmai=
l.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=3Dcafc839393db5c5d8000fd086118b3c=
7b47e95c2
> >
> > commit cafc839393db5c5d8000fd086118b3c7b47e95c2
> > Author:     Peter Eriksson <pen@lysator.liu.se>
> > AuthorDate: 2024-10-14 04:01:33 +0000
> > Commit:     Warner Losh <imp@FreeBSD.org>
> > 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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Oct 17, 2024 at 1:16=E2=80=AF=
PM Konstantin Belousov &lt;<a href=3D"mailto:kostikbel@gmail.com">kostikbel=
@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">On Mon, Oct 14, 2024 at 05:40:51AM +0000, Warner Losh wrote:<br>
&gt; The branch main has been updated by imp:<br>
&gt; <br>
&gt; URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Dcafc839393db=
5c5d8000fd086118b3c7b47e95c2" rel=3D"noreferrer" target=3D"_blank">https://=
cgit.FreeBSD.org/src/commit/?id=3Dcafc839393db5c5d8000fd086118b3c7b47e95c2<=
/a><br>
&gt; <br>
&gt; commit cafc839393db5c5d8000fd086118b3c7b47e95c2<br>
&gt; Author:=C2=A0 =C2=A0 =C2=A0Peter Eriksson &lt;<a href=3D"mailto:pen@ly=
sator.liu.se" target=3D"_blank">pen@lysator.liu.se</a>&gt;<br>
&gt; AuthorDate: 2024-10-14 04:01:33 +0000<br>
&gt; Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org&gt;<br>
&gt; CommitDate: 2024-10-14 05:22:19 +0000<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0ciss: Ignore data over/under run on RECEIVE_DIAGNOS=
TIC<br>
&gt;=C2=A0 =C2=A0 =C2=A0<br>
&gt;=C2=A0 =C2=A0 =C2=A0This appears to be harmless, so ignore data over/un=
der run on<br>
&gt;=C2=A0 =C2=A0 =C2=A0diagnostics.<br>
&gt;=C2=A0 =C2=A0 =C2=A0<br>
&gt;=C2=A0 =C2=A0 =C2=A0PR: 246279<br>
&gt;=C2=A0 =C2=A0 =C2=A0Reviewed by: imp<br>
&gt;=C2=A0 =C2=A0 =C2=A0Tested by: Marek Zarychta<br>
&gt;=C2=A0 =C2=A0 =C2=A0Differential Revision: <a href=3D"https://reviews.f=
reebsd.org/D25155" rel=3D"noreferrer" target=3D"_blank">https://reviews.fre=
ebsd.org/D25155</a><br>
I am not sure what does the data overrun or underrun means in this<br>
context.=C2=A0 But ciss(4) is very unhappy with an IOMMU turned on.=C2=A0 I=
t<br>
is so broken with it handling of DMA that controller even does not<br>
attach, causing faults and timing out.<br></blockquote><div><br></div><div>=
That&#39;s a different problem. The under/overrun is technically correct,</=
div><div>but expected due to flaws in the firmware (I think) for certain tr=
ansfers</div><div>when you don&#39;t know the size a-priori. So all the dat=
a the driver</div><div>needs comes across, but the firmware knows it has mo=
re that it</div><div>dropped on the floor so reports this status (I believe=
, again, don&#39;t</div><div>have the hardware or the docs and puzzled this=
 out reading the code</div><div>doing the code review years ago, and haven&=
#39;t refreshed my memory</div><div>since then).</div><div>=C2=A0</div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex">
I did not tried to read the ciss code to see where the faults come<br>
from.<br></blockquote><div><br></div><div>Yea, I don&#39;t have the hardwar=
e, so can&#39;t help there. This was in</div><div>my backlog for people tha=
t do and have reported these patches</div><div>work for them, but the age o=
f the original ciss adapters suggest that</div><div>it predates IOMMU deplo=
yment, so mistakes in that area would not</div><div>surprise me.</div><div>=
<br></div><div>Warner</div></div></div>

--000000000000d9a0870624b11709--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqsdQHMcJpDTYz7N7g5hmUn1CZf_2opmmdphr5q9xx2wg>