Page MenuHomeFreeBSD

zlei (Zhenlei Huang)
User

Projects

User Details

User Since
Apr 1 2021, 3:21 AM (268 w, 3 d)

Recent Activity

Fri, May 22

zlei abandoned D42647: tcp: Prefer EINVAL in case function not found.
Fri, May 22, 12:06 PM
zlei added a comment to D57094: tests/net: Run all tests with execenv=jail and enable parallelism.

After @zlei work on VNET. I think it's better to remove is_exclusive=true.
Tested, LGTM

Fri, May 22, 10:49 AM
zlei added a comment to D57154: net: Fix handling of unmapped user pages in if_getgroup().

@glebius
Of course acquiring per-interface lock is better than global one and looks like in this case it is possible.

Yes, that is perfect.

Fri, May 22, 9:39 AM

Mon, May 18

zlei added inline comments to D56942: lagg: Handle a port count of zero.
Mon, May 18, 7:42 PM

Fri, May 15

zlei added inline comments to D56942: lagg: Handle a port count of zero.
Fri, May 15, 9:09 PM
zlei added a comment to D55203: svc_vc.c: Add support for an xp_extpg boolean.

Could you please take another look at this?
kib@ seems to think this is preferred to just
enabling it for all NICs.

I understand that it is only a "hint", since
routing can change at any time.
However, for an NFS server, routing is
unlikely to change without a NFS server
restart.

Fri, May 15, 8:55 PM
zlei requested review of D57023: lagg: Fix SIOCSLAGG ioctl.
Fri, May 15, 6:59 PM

Wed, May 13

zlei added inline comments to D56954: rtnetlink: Check for allocation failure in nlattr_get_multipath().
Wed, May 13, 3:25 AM

Tue, May 12

zlei added a comment to D56942: lagg: Handle a port count of zero.

Actually there are other sc members ( and other places sc->sc_count invoved ) not synchronized properly, I think on architectures with weak memory order they are easier to spot. Found that while I was working on PR 289017 .

Could you be more specific? I'm sure there are other problems, but this one is easy to trigger in practice.

Tue, May 12, 7:46 PM
zlei added inline comments to D56954: rtnetlink: Check for allocation failure in nlattr_get_multipath().
Tue, May 12, 10:14 AM
zlei added a comment to D56944: if_vxlan: Update *m0 after a pullup.

Emm, the if_vxlan(4) is not virtualized yet. @hrs attempted the first, me the second, and @kp the third. It is better to proceed to have tests for it.

Sorry, I don't quite follow what you're asking for?

Tue, May 12, 10:05 AM

Mon, May 11

zlei updated subscribers of D56944: if_vxlan: Update *m0 after a pullup.

Emm, the if_vxlan(4) is not virtualized yet. @hrs attempted the first, me the second, and @kp the third. It is better to proceed to have tests for it.

Mon, May 11, 4:32 PM
zlei accepted D56944: if_vxlan: Update *m0 after a pullup.

Oops ! My stupid mistake.

Mon, May 11, 4:17 PM
zlei added a comment to D56942: lagg: Handle a port count of zero.

Actually there are other sc members ( and other places sc->sc_count invoved ) not synchronized properly, I think on architectures with weak memory order they are easier to spot. Found that while I was working on PR 289017 .

Mon, May 11, 3:46 PM

Sun, May 10

zlei committed rGa08d321948ef: tests/carp: kill routed(8) before destroying interfaces (authored by glebius).
tests/carp: kill routed(8) before destroying interfaces
Sun, May 10, 6:28 AM
zlei committed rG1f8eae9a7a45: tests/carp: make a 0.2 second pause before configuring second jail (authored by glebius).
tests/carp: make a 0.2 second pause before configuring second jail
Sun, May 10, 6:28 AM
zlei committed rG19552d9749dd: tests/carp: make sleep interval in the wait loop smaller (authored by glebius).
tests/carp: make sleep interval in the wait loop smaller
Sun, May 10, 6:28 AM
zlei committed rGf956c425d4c6: tests/carp: Rework unicast_v4 (authored by zlei).
tests/carp: Rework unicast_v4
Sun, May 10, 6:27 AM
zlei added a comment to D55558: fix global demotion counter to VRRP advertisements.

Hi @oliver , I was about to MFC one fix to tests/sys/netinet/carp.sh and found this. Is stable/15 not affected by this issue ?

Sun, May 10, 5:30 AM

Sat, May 9

zlei committed rGad2fff6d6a4d: tests/carp: make a 0.2 second pause before configuring second jail (authored by glebius).
tests/carp: make a 0.2 second pause before configuring second jail
Sat, May 9, 6:53 PM
zlei committed rG89096d660ea8: tests/carp: kill routed(8) before destroying interfaces (authored by glebius).
tests/carp: kill routed(8) before destroying interfaces
Sat, May 9, 6:53 PM
zlei committed rG332485a47372: tests/carp: make sleep interval in the wait loop smaller (authored by glebius).
tests/carp: make sleep interval in the wait loop smaller
Sat, May 9, 6:53 PM
zlei committed rG107ef0c29503: tests/carp: Rework unicast_v4 (authored by zlei).
tests/carp: Rework unicast_v4
Sat, May 9, 6:53 PM
zlei updated subscribers of D55558: fix global demotion counter to VRRP advertisements.

Hi @oliver , I was about to MFC one fix to tests/sys/netinet/carp.sh and found this. Is stable/15 not affected by this issue ?

Sat, May 9, 4:26 PM

Thu, May 7

zlei added inline comments to D56497: virtio_p9fs: Fix kernel panic on module unload.
Thu, May 7, 10:02 AM
zlei added inline comments to D56497: virtio_p9fs: Fix kernel panic on module unload.
Thu, May 7, 8:39 AM

Wed, May 6

zlei added inline comments to D28530: Widen ifnet_detach_sxlock coverage.
Wed, May 6, 2:49 PM

Tue, May 5

zlei added a comment to D55229: nd6: Add support for Optimistic DAD (RFC 4429).

Spent some time reading the RFC. I'm not sure how useful the Optimistic DAD feature will be. Normal DAD can finish within seconds, is not that enough ?

Tue, May 5, 7:12 PM

Mon, May 4

zlei committed rG77b8bc06cf73: ifnet: if_detach(): Fix races with vmove operations (authored by zlei).
ifnet: if_detach(): Fix races with vmove operations
Mon, May 4, 4:52 PM
zlei committed rG33da0a256bfc: tests/netgraph: Add a test for races between if_detach() and vnet_if_return() (authored by zlei).
tests/netgraph: Add a test for races between if_detach() and vnet_if_return()
Mon, May 4, 4:52 PM
zlei committed rG320805add13d: tests/net/if_clone_test: Add a test for races between if_detach() and… (authored by zlei).
tests/net/if_clone_test: Add a test for races between if_detach() and…
Mon, May 4, 4:52 PM
zlei committed rG9598f7277a1b: if_clone: Make ifnet_detach_sxlock opaque to consumers (authored by zlei).
if_clone: Make ifnet_detach_sxlock opaque to consumers
Mon, May 4, 4:51 PM
zlei committed rG328598079b56: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl() (authored by zlei).
ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()
Mon, May 4, 4:51 PM
zlei committed rGe7063f1d8b5d: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of… (authored by zlei).
ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of…
Mon, May 4, 4:51 PM
zlei committed rGb1dc0bc2cc86: ifnet: Add some sanity checks (authored by zlei).
ifnet: Add some sanity checks
Mon, May 4, 4:51 PM
zlei committed rGf7145eff8172: ifnet: Fix races in if_vmove_reclaim() (authored by zlei).
ifnet: Fix races in if_vmove_reclaim()
Mon, May 4, 4:51 PM
zlei committed rGbc73c7f61912: ifnet: Remove unreachable code (authored by zlei).
ifnet: Remove unreachable code
Mon, May 4, 4:51 PM
zlei accepted D56778: if_vlan: Use the exclusive lock everywhere.

Indeed the net stack lacks proper ioctl locks. I found that while diagnosing PR 292993 and some attaching / detaching issues. Also some drivers have comments about that. I think normally users do not generate concurrent ioctls, so the issue is merely noticed. For parallel tests that is easy to spot.

Mon, May 4, 6:20 AM

Sun, May 3

zlei added a comment to D56761: tests/carp: Rework unicast_v4.

Thanks for working on this, Zhenlei!

IMHO, adding atf_check to purely configuration lines is not really important. In "a near bright future", I hope, we will be able to delete the configuration lines from the test bodies completely and declare test jails in some declarative manner instead of scripting.

Sun, May 3, 1:45 PM
zlei committed rG9137c66c2ea6: tests/carp: Rework unicast_v4 (authored by zlei).
tests/carp: Rework unicast_v4
Sun, May 3, 11:04 AM
zlei closed D56761: tests/carp: Rework unicast_v4.
Sun, May 3, 11:04 AM

Sat, May 2

zlei added a comment to D49158: ng_eiface(4) and ng_iface(4) should play better with vnet(9).

I vastly under appreciated that folks rely upon the ng_eiface not moving with the struct ifnet. Probably because I've been using them in jails for over a decade and only recently noticed myself.

I encountered that situation because I was exploring the ordering of ng_eiface creation, move to jail, and rename. The idea being I could have the same interface names in jails if I waited until after the move to rename them and therefore use the same config for dhcpcd. I was then surprised at what happened when an interface was renamed in a jail and then the jail was shut down. I then went off with the wrong assumption that it was missed, moving ng_eiface to the new vnet.

Sat, May 2, 6:34 PM · Jails, network
zlei added a comment to D56761: tests/carp: Rework unicast_v4.

It requires little effort on a single testcase. Let's keep moving.

Sat, May 2, 5:35 PM
zlei updated the diff for D56761: tests/carp: Rework unicast_v4.
  1. Added atf_check to config / setup steps.
  2. Minor style fix, if ... ; then
  3. Shortened the jail names to ${j}[one|two|three] to reduce the line width, and focus only on the different part of the jail name, should improve readability a bit.
  4. Prefer ifconfig -j , route -j , sysctl -j over jexec ifconfig / route / sysctl.
Sat, May 2, 5:26 PM

Fri, May 1

zlei added inline comments to D56761: tests/carp: Rework unicast_v4.
Fri, May 1, 9:18 PM
zlei added inline comments to D56761: tests/carp: Rework unicast_v4.
Fri, May 1, 9:06 PM
zlei added inline comments to D56761: tests/carp: Rework unicast_v4.
Fri, May 1, 8:55 PM
zlei added inline comments to D56761: tests/carp: Rework unicast_v4.
Fri, May 1, 8:48 PM
zlei updated the diff for D56761: tests/carp: Rework unicast_v4.

Removed redundant -s exit:0 to make the code easier to read.

Fri, May 1, 8:29 PM
zlei added inline comments to D56761: tests/carp: Rework unicast_v4.
Fri, May 1, 8:21 PM
zlei requested review of D56761: tests/carp: Rework unicast_v4.
Fri, May 1, 7:40 PM

Thu, Apr 30

zlei committed rG5c4021ca0abe: ifnet: if_detach(): Fix races with vmove operations (authored by zlei).
ifnet: if_detach(): Fix races with vmove operations
Thu, Apr 30, 9:54 AM
zlei committed rG3a4c4d61ac2c: tests/netgraph: Add a test for races between if_detach() and vnet_if_return() (authored by zlei).
tests/netgraph: Add a test for races between if_detach() and vnet_if_return()
Thu, Apr 30, 9:54 AM
zlei committed rG696d1590697e: tests/net/if_clone_test: Add a test for races between if_detach() and… (authored by zlei).
tests/net/if_clone_test: Add a test for races between if_detach() and…
Thu, Apr 30, 9:54 AM
zlei committed rGc624e04a0bd0: if_clone: Make ifnet_detach_sxlock opaque to consumers (authored by zlei).
if_clone: Make ifnet_detach_sxlock opaque to consumers
Thu, Apr 30, 9:54 AM
zlei committed rG477c3ba36731: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl() (authored by zlei).
ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()
Thu, Apr 30, 9:54 AM
zlei committed rGccfc2d91304e: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of… (authored by zlei).
ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of…
Thu, Apr 30, 9:54 AM
zlei committed rG877fa4f2a2d3: ifnet: Add some sanity checks (authored by zlei).
ifnet: Add some sanity checks
Thu, Apr 30, 9:54 AM
zlei committed rGcef2f7b440ff: ifnet: Fix races in if_vmove_reclaim() (authored by zlei).
ifnet: Fix races in if_vmove_reclaim()
Thu, Apr 30, 9:54 AM
zlei committed rGa989b0fbc965: ifnet: Remove unreachable code (authored by zlei).
ifnet: Remove unreachable code
Thu, Apr 30, 9:54 AM
zlei committed rG6403ef5d2708: /bin/ps: Fix display of negative nice values on ARMv7/aarch64 (authored by jamie_catflap.org).
/bin/ps: Fix display of negative nice values on ARMv7/aarch64
Thu, Apr 30, 5:12 AM
zlei committed rGdcf54a11a0ef: geom_part: Restore the human readable format of size (authored by zlei).
geom_part: Restore the human readable format of size
Thu, Apr 30, 5:12 AM
zlei committed rGe7eef56c6982: /bin/ps: Fix display of negative nice values on ARMv7/aarch64 (authored by jamie_catflap.org).
/bin/ps: Fix display of negative nice values on ARMv7/aarch64
Thu, Apr 30, 5:07 AM
zlei committed rGd2bf940ec144: geom_part: Restore the human readable format of size (authored by zlei).
geom_part: Restore the human readable format of size
Thu, Apr 30, 5:07 AM
zlei committed rGd11419ed37a6: iflib: Add a missing CURVNET_RESTORE() in the error path (authored by Peter Ganzhorn <peter.ganzhorn@gmail.com>).
iflib: Add a missing CURVNET_RESTORE() in the error path
Thu, Apr 30, 5:07 AM

Wed, Apr 29

zlei added a comment to D56691: virtio_net: Set rx/tx busdma alignment to 1 byte.

How can alignment lead locking issues ? Not an expert on this, just out of curious.

The standard behaviour for busdma_bounce implementations is that bus_dmamap with alignment > 1 is marked as COULD_BOUNCE. Among other things this can cause a bounce zone to be allocated at bus_dmamap creation time. This causes further allocations without M_NOWAIT which triggers the locking issue.

Wed, Apr 29, 3:48 PM
zlei accepted D56614: kyua: Enable parallelism by default.

It appears some tests, for example tests/sys/mac/ipacl has side effect. The mac_ipacl module affects some tests running vnet jails when security.mac.ipacl.ipv4 is turned on.

Probably extra efforts is needed ( run tests those have side effects at last order and sequentially, or disable them temporally ) before change the default of kyua parallelism parameter.

Wed, Apr 29, 2:46 PM
zlei added a comment to D56691: virtio_net: Set rx/tx busdma alignment to 1 byte.

How can alignment lead locking issues ? Not an expert on this, just out of curious.

Wed, Apr 29, 1:19 PM
zlei added reviewers for D56614: kyua: Enable parallelism by default: siva, lwhsu.
Wed, Apr 29, 3:44 AM
zlei added a comment to D56614: kyua: Enable parallelism by default.

It appears some tests, for example tests/sys/mac/ipacl has side effect. The mac_ipacl module affects some tests running vnet jails when security.mac.ipacl.ipv4 is turned on.

Wed, Apr 29, 3:43 AM

Tue, Apr 28

zlei accepted D56694: libifconfig: Skip bridge VLAN config for span members.

Looks good to me.

Tue, Apr 28, 5:26 PM

Mon, Apr 27

zlei added inline comments to D56609: tests: Add a test for races between between if_detach() and vnet_if_return().
Mon, Apr 27, 7:26 PM
zlei committed rG0988abd52352: tests/netgraph: Add a test for races between if_detach() and vnet_if_return() (authored by zlei).
tests/netgraph: Add a test for races between if_detach() and vnet_if_return()
Mon, Apr 27, 7:21 PM
zlei committed rGafa4648b6a30: tests: Temporarily skip two testcases (authored by zlei).
tests: Temporarily skip two testcases
Mon, Apr 27, 7:21 PM
zlei committed rGf4be16983dea: tests/net/if_clone_test: Add a test for races between if_detach() and… (authored by zlei).
tests/net/if_clone_test: Add a test for races between if_detach() and…
Mon, Apr 27, 7:21 PM
zlei closed D56609: tests: Add a test for races between between if_detach() and vnet_if_return().
Mon, Apr 27, 7:21 PM
zlei closed D56606: tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim().
Mon, Apr 27, 7:21 PM

Sun, Apr 26

zlei added inline comments to D56536: init: build dynamically.
Sun, Apr 26, 6:46 PM
zlei added a comment to D56536: init: build dynamically.

Tested with init_path=/bin/init set in the boot loader, the change to sh(1) looks good to me.

Sun, Apr 26, 6:29 AM
zlei accepted D56536: init: build dynamically.

Tested with dynamically linked init(8). The change to init(8) looks good to me.

Sun, Apr 26, 5:49 AM

Sat, Apr 25

zlei closed D56374: ifnet: if_detach(): Fix races with if_vmove().
Sat, Apr 25, 7:58 PM
zlei committed rGba7f47d47dc1: ifnet: if_detach(): Fix races with vmove operations (authored by zlei).
ifnet: if_detach(): Fix races with vmove operations
Sat, Apr 25, 7:58 PM
zlei added inline comments to D56536: init: build dynamically.
Sat, Apr 25, 6:53 PM
zlei added inline comments to D56536: init: build dynamically.
Sat, Apr 25, 6:44 PM
zlei added a comment to D54752: ifconfig: Use strlcpy() instead of strncpy() for interface name copy.
In D54752#1296854, @des wrote:

The commit message says “no functional change intended” but there is one: strncpy() zero-fills the unused portion of the buffer, strlcpy() does not, so this leaves ifr partly uninitialized. It probably doesn't matter in this direction, but I don't see this addressed anywhere in the review.

Sat, Apr 25, 9:18 AM

Apr 24 2026

zlei added inline comments to D56536: init: build dynamically.
Apr 24 2026, 8:31 AM
zlei added a comment to D56564: offload: Compute and insert checksums as late as possible.

I'd suggest to add links to the discussing about defer calculating the checksum. I believe I saw that before, but I can not find it now.

Apr 24 2026, 8:01 AM
zlei accepted D56579: lacp: fix link state with multiple aggregators.

Looks good to me.

Apr 24 2026, 7:23 AM
zlei added a reviewer for D54992: kern: better hierarchical jail semantics for ALLOW_UNPRIV_PARENT_TAMPER: olce.
Apr 24 2026, 6:37 AM
zlei added a comment to D54992: kern: better hierarchical jail semantics for ALLOW_UNPRIV_PARENT_TAMPER.

Not familiar with the ucred part, but the concept looks good to me. I'm adding @olce ( I think he is familiar with ucred) for this.

Apr 24 2026, 6:36 AM

Apr 23 2026

zlei added inline comments to D56609: tests: Add a test for races between between if_detach() and vnet_if_return().
Apr 23 2026, 9:13 PM
zlei added a comment to D56374: ifnet: if_detach(): Fix races with if_vmove().

Hi @kp @glebius , I added two tests , see D56606 and D56609 .

Apr 23 2026, 9:04 PM
zlei requested review of D56609: tests: Add a test for races between between if_detach() and vnet_if_return().
Apr 23 2026, 8:58 PM
zlei added inline comments to D56606: tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim().
Apr 23 2026, 6:57 PM
zlei requested review of D56606: tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim().
Apr 23 2026, 6:55 PM

Apr 22 2026

zlei committed rG588bb16e7bb8: jail: fix crash with startup commands on a jail without name (authored by glebius).
jail: fix crash with startup commands on a jail without name
Apr 22 2026, 4:02 PM
zlei added a comment to D51502: jail: consistently populate the KP_JID and KP_NAME parameters.

I was writing tests and found

Apr 22 2026, 10:17 AM
zlei added a comment to D45913: netinet6: fix parent lle locking.
In D45913#1292483, @mjg wrote:
Apr 22 2026, 6:31 AM

Apr 20 2026

zlei added a comment to D56514: geom_part: Restore the human readable format of size.

@js Thanks for the quick view !

Apr 20 2026, 5:24 PM
zlei committed rG0d16792c6e98: geom_part: Restore the human readable format of size (authored by zlei).
geom_part: Restore the human readable format of size
Apr 20 2026, 5:03 PM