Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2025 23:02:01 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Alexander Ziaee <ziaee@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 458ac2b6e445 - main - umb.4: Improve synposis, add netmap
Message-ID:  <65F7C538-6AF3-429B-AC08-541A7C7CA1D0@FreeBSD.org>
In-Reply-To: <E1up5xv-0005kE-9z@rmmprod07.runbox>
References:  <E1up5xv-0005kE-9z@rmmprod07.runbox>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_A0529DCA-96D6-4CB5-A525-0800EA98418A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On Aug 21, 2025, at 10:08 PM, Alexander Ziaee <ziaee@FreeBSD.org> =
wrote:
>=20
> On 2025-08-20 23:21 -04:00 EDT, "Zhenlei Huang" <zlei@FreeBSD.org =
<mailto:zlei@FreeBSD.org>> wrote:
>> Hi Alexander,
>>=20
>> I'd presume umb(4) does not depends on netmap. A quick search of =
DEV_NETMAP
>>=20
>> ```
>> #ifdef DEV_NETMAP
>> static void      umb_input(if_t , struct mbuf *);
>> #endif
>> ...
>> #ifdef DEV_NETMAP
>>        if_setinputfn(ifp, umb_input);
>> #endif
>> ```
>>=20
>> I think the #ifdef can be removed. I currently do not have that =
hardware so I'd appreciate if someone can test it.
>=20
> I didn't get that far myself, this commit was partially in response to =
comment 67 [0] on the original bug where a user got the driver working =
on FreeBSD 14 by adding `device netmap` to their kernconf, and it didn't =
work without that.
>=20
> Should we send this to khorben?
>=20
> [0] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263783#c67 =
<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263783#c67>;

I replied to PR 263783.=20

>=20
> Best,
> Alex
>=20
>>=20
>> Best regards,
>> Zhenlei
>>=20
>>> On Aug 21, 2025, at 9:50 AM, Alexander Ziaee <ziaee@FreeBSD.org> =
wrote:
>>>=20
>>> The branch main has been updated by ziaee:
>>>=20
>>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D458ac2b6e4452acc1a614352c8945ecc=
37667aa0
>>>=20
>>> commit 458ac2b6e4452acc1a614352c8945ecc37667aa0
>>> Author:     Alexander Ziaee <ziaee@FreeBSD.org>
>>> AuthorDate: 2025-08-20 14:45:08 +0000
>>> Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
>>> CommitDate: 2025-08-21 01:48:13 +0000
>>>=20
>>>   umb.4: Improve synposis, add netmap
>>>=20
>>>   Rewrite synopsis in a more consistent style, and add "device =
netmap",
>>>   In FreeBSD 15, netmap is included in =
GENERIC/{amd64,arm64,powerpc64},
>>>   but it still needs to be used in FreeBSD 14 or custom kernels =
which
>>>   don't include GENERIC.
>>>=20
>>>   MFC after:              umb does not mfc
>>>   Reviewed by:            gbe
>>>   Differential Revision:  https://reviews.freebsd.org/D51732
>>> ---
>>> share/man/man4/umb.4 | 28 ++++++++++++++--------------
>>> 1 file changed, 14 insertions(+), 14 deletions(-)
>>>=20
>>> diff --git a/share/man/man4/umb.4 b/share/man/man4/umb.4
>>> index 7ecc9a39c1ca..311a50faf8e7 100644
>>> --- a/share/man/man4/umb.4
>>> +++ b/share/man/man4/umb.4
>>> @@ -17,34 +17,34 @@
>>> .\"
>>> .\" $NetBSD: umb.4,v 1.4 2019/08/30 09:22:17 wiz Exp $
>>> .\"
>>> -.Dd May 11, 2025
>>> +.Dd August 4, 2025
>>> .Dt UMB 4
>>> .Os
>>> .Sh NAME
>>> .Nm umb
>>> .Nd USB Mobile Broadband Interface Model (MBIM) cellular modem =
driver
>>> .Sh SYNOPSIS
>>> -To compile this driver into the kernel,
>>> -place the following lines in your
>>> -kernel configuration file:
>>> -.Bd -ragged -offset indent
>>> +.Cd "device netmap"
>>> .Cd "device usb"
>>> .Cd "device umb"
>>> -.Ed
>>> .Pp
>>> -Alternatively, to load the driver as a
>>> -module at boot time, place the following line in
>>> +In
>>> .Xr loader.conf 5 :
>>> -.Bd -literal -offset indent
>>> -umb_load=3D"YES"
>>> -.Ed
>>> -.Pp
>>> -If neither of the above is done, the driver will automatically be =
loaded
>>> -by devd(8) when the device is connected.
>>> +.Cd umb_load=3D"YES"
>>> .Sh DESCRIPTION
>>> The
>>> .Nm
>>> driver provides support for USB MBIM devices.
>>> +If the appropriate hardware is detected,
>>> +the driver will be loaded automatically by
>>> +.Xr devmatch 8 .
>>> +To load the driver manually,
>>> +.Cm load
>>> +it in
>>> +.Xr loader.conf 5
>>> +or at the
>>> +.Xr loader 8
>>> +prompt.
>>> .Pp
>>> MBIM devices establish connections via cellular networks such as
>>> GPRS, UMTS, and LTE.




--Apple-Mail=_A0529DCA-96D6-4CB5-A525-0800EA98418A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Aug 21, 2025, at 10:08 PM, Alexander Ziaee &lt;<a =
href=3D"mailto:ziaee@FreeBSD.org" class=3D"">ziaee@FreeBSD.org</a>&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><meta =
charset=3D"UTF-8" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">On 2025-08-20 23:21 -04:00 EDT, "Zhenlei Huang" &lt;</span><a =
href=3D"mailto:zlei@FreeBSD.org" style=3D"font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; orphans: auto; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px;" class=3D"">zlei@FreeBSD.org</a><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">&gt; =
wrote:</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><blockquote type=3D"cite" style=3D"font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D"">Hi =
Alexander,<br class=3D""><br class=3D"">I'd presume umb(4) does not =
depends on netmap. A quick search of DEV_NETMAP<br class=3D""><br =
class=3D"">```<br class=3D"">#ifdef DEV_NETMAP<br class=3D"">static void =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;umb_input(if_t , struct mbuf *);<br =
class=3D"">#endif<br class=3D"">...<br class=3D"">#ifdef DEV_NETMAP<br =
class=3D"">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if_setinputfn(ifp, =
umb_input);<br class=3D"">#endif<br class=3D"">```<br class=3D""><br =
class=3D"">I think the #ifdef can be removed. I currently do not have =
that hardware so I'd appreciate if someone can test it.<br =
class=3D""></blockquote><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">I didn't get that far myself, this commit was partially in =
response to comment 67 [0] on the original bug where a user got the =
driver working on FreeBSD 14 by adding `device netmap` to their =
kernconf, and it didn't work without that.</span><br style=3D"caret-color:=
 rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">Should we send this to khorben?</span><br style=3D"caret-color:=
 rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">[0]<span class=3D"Apple-converted-space">&nbsp;</span></span><a=
 href=3D"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263783#c67" =
style=3D"font-family: Menlo-Regular; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: =
0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" =
class=3D"">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263783#c67<=
/a><br style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""></div></blockquote><div><br class=3D""></div><div>I =
replied to PR 263783.&nbsp;</div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D""><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">Best,</span><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">Alex</span><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><br style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><blockquote type=3D"cite" =
style=3D"font-family: Menlo-Regular; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: =
0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><br class=3D"">Best regards,<br =
class=3D"">Zhenlei<br class=3D""><br class=3D""><blockquote type=3D"cite" =
class=3D"">On Aug 21, 2025, at 9:50 AM, Alexander Ziaee &lt;<a =
href=3D"mailto:ziaee@FreeBSD.org" class=3D"">ziaee@FreeBSD.org</a>&gt; =
wrote:<br class=3D""><br class=3D"">The branch main has been updated by =
ziaee:<br class=3D""><br class=3D"">URL: <a =
href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D458ac2b6e4452acc1a614352=
c8945ecc37667aa0" =
class=3D"">https://cgit.FreeBSD.org/src/commit/?id=3D458ac2b6e4452acc1a614=
352c8945ecc37667aa0</a><br class=3D""><br class=3D"">commit =
458ac2b6e4452acc1a614352c8945ecc37667aa0<br class=3D"">Author: =
&nbsp;&nbsp;&nbsp;&nbsp;Alexander Ziaee &lt;<a =
href=3D"mailto:ziaee@FreeBSD.org" class=3D"">ziaee@FreeBSD.org</a>&gt;<br =
class=3D"">AuthorDate: 2025-08-20 14:45:08 +0000<br class=3D"">Commit: =
&nbsp;&nbsp;&nbsp;&nbsp;Alexander Ziaee &lt;<a =
href=3D"mailto:ziaee@FreeBSD.org" class=3D"">ziaee@FreeBSD.org</a>&gt;<br =
class=3D"">CommitDate: 2025-08-21 01:48:13 +0000<br class=3D""><br =
class=3D"">&nbsp;&nbsp;umb.4: Improve synposis, add netmap<br =
class=3D""><br class=3D"">&nbsp;&nbsp;Rewrite synopsis in a more =
consistent style, and add "device netmap",<br class=3D"">&nbsp;&nbsp;In =
FreeBSD 15, netmap is included in GENERIC/{amd64,arm64,powerpc64},<br =
class=3D"">&nbsp;&nbsp;but it still needs to be used in FreeBSD 14 or =
custom kernels which<br class=3D"">&nbsp;&nbsp;don't include GENERIC.<br =
class=3D""><br class=3D"">&nbsp;&nbsp;MFC after: =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;umb does not mfc<br class=3D"">&nbsp;&nbsp;Reviewed by: =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gbe<br =
class=3D"">&nbsp;&nbsp;Differential Revision: &nbsp;<a =
href=3D"https://reviews.freebsd.org/D51732" =
class=3D"">https://reviews.freebsd.org/D51732</a><br class=3D"">---<br =
class=3D"">share/man/man4/umb.4 | 28 ++++++++++++++--------------<br =
class=3D"">1 file changed, 14 insertions(+), 14 deletions(-)<br =
class=3D""><br class=3D"">diff --git a/share/man/man4/umb.4 =
b/share/man/man4/umb.4<br class=3D"">index 7ecc9a39c1ca..311a50faf8e7 =
100644<br class=3D"">--- a/share/man/man4/umb.4<br class=3D"">+++ =
b/share/man/man4/umb.4<br class=3D"">@@ -17,34 +17,34 @@<br =
class=3D"">.\"<br class=3D"">.\" $NetBSD: umb.4,v 1.4 2019/08/30 =
09:22:17 wiz Exp $<br class=3D"">.\"<br class=3D"">-.Dd May 11, 2025<br =
class=3D"">+.Dd August 4, 2025<br class=3D"">.Dt UMB 4<br =
class=3D"">.Os<br class=3D"">.Sh NAME<br class=3D"">.Nm umb<br =
class=3D"">.Nd USB Mobile Broadband Interface Model (MBIM) cellular =
modem driver<br class=3D"">.Sh SYNOPSIS<br class=3D"">-To compile this =
driver into the kernel,<br class=3D"">-place the following lines in =
your<br class=3D"">-kernel configuration file:<br class=3D"">-.Bd =
-ragged -offset indent<br class=3D"">+.Cd "device netmap"<br =
class=3D"">.Cd "device usb"<br class=3D"">.Cd "device umb"<br =
class=3D"">-.Ed<br class=3D"">.Pp<br class=3D"">-Alternatively, to load =
the driver as a<br class=3D"">-module at boot time, place the following =
line in<br class=3D"">+In<br class=3D"">.Xr loader.conf 5 :<br =
class=3D"">-.Bd -literal -offset indent<br class=3D"">-umb_load=3D"YES"<br=
 class=3D"">-.Ed<br class=3D"">-.Pp<br class=3D"">-If neither of the =
above is done, the driver will automatically be loaded<br class=3D"">-by =
devd(8) when the device is connected.<br class=3D"">+.Cd =
umb_load=3D"YES"<br class=3D"">.Sh DESCRIPTION<br class=3D"">The<br =
class=3D"">.Nm<br class=3D"">driver provides support for USB MBIM =
devices.<br class=3D"">+If the appropriate hardware is detected,<br =
class=3D"">+the driver will be loaded automatically by<br class=3D"">+.Xr =
devmatch 8 .<br class=3D"">+To load the driver manually,<br =
class=3D"">+.Cm load<br class=3D"">+it in<br class=3D"">+.Xr loader.conf =
5<br class=3D"">+or at the<br class=3D"">+.Xr loader 8<br =
class=3D"">+prompt.<br class=3D"">.Pp<br class=3D"">MBIM devices =
establish connections via cellular networks such as<br class=3D"">GPRS, =
UMTS, and LTE.</blockquote></blockquote></div></blockquote></div><br =
class=3D""><div class=3D"">
<div><br class=3D""></div>

</div>
<br class=3D""></body></html>=

--Apple-Mail=_A0529DCA-96D6-4CB5-A525-0800EA98418A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?65F7C538-6AF3-429B-AC08-541A7C7CA1D0>