Page MenuHomeFreeBSD

zlei (Zhenlei Huang)
User

Projects

User Details

User Since
Apr 1 2021, 3:21 AM (262 w, 19 h)

Recent Activity

Yesterday

zlei updated the test plan for D56298: if_clone: Make ifnet_detach_sxlock opaque to consumers.
Wed, Apr 8, 4:26 AM
zlei updated the test plan for D56298: if_clone: Make ifnet_detach_sxlock opaque to consumers.
Wed, Apr 8, 3:19 AM
zlei requested review of D56298: if_clone: Make ifnet_detach_sxlock opaque to consumers.
Wed, Apr 8, 2:46 AM

Tue, Apr 7

zlei added inline comments to D54172: Add Support for Geneve (RFC8926).
Tue, Apr 7, 2:38 PM
zlei added a comment to D56288: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of ifnet_detach_sxlock.

This LGTM, but here's an idea: why not do it the other way around?

This is part of the cleanup.

Tue, Apr 7, 9:41 AM
zlei updated the summary of D56288: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of ifnet_detach_sxlock.
Tue, Apr 7, 9:34 AM
zlei added inline comments to D50899: tcp: count two previously ignored kinds of syncookie failures.
Tue, Apr 7, 9:26 AM
zlei added a comment to D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().

Landed D55875 after running extensive tests.

Tue, Apr 7, 4:48 AM
zlei updated the diff for D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().

Rebased on latest main.

Tue, Apr 7, 4:44 AM
zlei committed rG00d96da231d0: ifnet: Add some sanity checks (authored by zlei).
ifnet: Add some sanity checks
Tue, Apr 7, 4:35 AM
zlei closed D55875: ifnet: Add some sanity checks.
Tue, Apr 7, 4:35 AM
zlei requested review of D56288: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of ifnet_detach_sxlock.
Tue, Apr 7, 3:26 AM

Sat, Apr 4

zlei added inline comments to D56253: ip6_mroute: VNETify counters.
Sat, Apr 4, 3:37 PM
zlei accepted D56253: ip6_mroute: VNETify counters.

Looks good to me.

Sat, Apr 4, 3:09 PM

Fri, Apr 3

zlei updated the summary of D56228: nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options.
Fri, Apr 3, 2:14 AM

Thu, Apr 2

zlei accepted D56132: nd6: Change prelist_update() return type to void.
Thu, Apr 2, 5:30 PM
zlei added inline comments to D55631: axge: fix spurious link down from MII, frozen TX.
Thu, Apr 2, 5:21 PM · USB, network
zlei added inline comments to D49412: ifnet: Remove a redundant check for flag IFF_DYING from ifunit_ref().
Thu, Apr 2, 4:47 AM
zlei added a comment to D55875: ifnet: Add some sanity checks.

I'm not sure how these assertions will be beneficial if we have to add them to every function of the ifp [un]linking.
IMHO, KASSERT/MPASS are existing to verify programmatic assumptions.

Thu, Apr 2, 3:55 AM

Wed, Apr 1

zlei accepted D56134: nd6: Remove anycast check in prelist_update.

Looks sane to me.

Wed, Apr 1, 3:32 PM
zlei accepted D56202: route: Show weight of nexthop in multipath routes.
Wed, Apr 1, 3:18 PM
zlei accepted D56205: netstat: Add -F support for -g.

Looks good to me.

Wed, Apr 1, 3:09 PM
zlei added inline comments to D56202: route: Show weight of nexthop in multipath routes.
Wed, Apr 1, 3:19 AM
zlei added inline comments to D56205: netstat: Add -F support for -g.
Wed, Apr 1, 2:31 AM

Tue, Mar 31

zlei added a reviewer for D56191: route: Add route get for multipath routes with -o flag: melifaro.
Tue, Mar 31, 5:37 PM
zlei added inline comments to D55904: hash(9): introduce hashalloc()/hashfree() KPI.
Tue, Mar 31, 10:22 AM
zlei added a comment to D55631: axge: fix spurious link down from MII, frozen TX.

PS: I bought a USB adapter ( AX88179A ) but were not able to repeat ( with stress tests for about two days ).

Tue, Mar 31, 8:23 AM · USB, network

Mon, Mar 30

zlei committed rGee9456ce3753: ifnet: Fix races in if_vmove_reclaim() (authored by zlei).
ifnet: Fix races in if_vmove_reclaim()
Mon, Mar 30, 4:02 PM
zlei closed D55997: ifnet: Fix races in if_vmove_reclaim().
Mon, Mar 30, 4:02 PM
zlei accepted D56136: nd6: Remove goto and unused condition in prelist_update.

Looks good to me.

Mon, Mar 30, 3:41 PM
zlei added a comment to D54172: Add Support for Geneve (RFC8926).

I have not looked through the related RFC. So this quick review is not completed.

Mon, Mar 30, 5:45 AM

Sun, Mar 29

zlei added inline comments to D56129: nd6: Do not enter net_epoch under nd6_prelist_add.
Sun, Mar 29, 6:22 PM
zlei added inline comments to D56133: nd6: Ignore entire PI if violates RFC 4862 section 5.5.3.
Sun, Mar 29, 5:46 PM
zlei added inline comments to D56136: nd6: Remove goto and unused condition in prelist_update.
Sun, Mar 29, 5:41 PM
zlei added inline comments to D56132: nd6: Change prelist_update() return type to void.
Sun, Mar 29, 3:56 PM
zlei added inline comments to D56136: nd6: Remove goto and unused condition in prelist_update.
Sun, Mar 29, 3:27 PM

Wed, Mar 25

zlei accepted D56069: ipfw: skip tests if required sysctl is not set.

Reasonable !

Wed, Mar 25, 5:01 AM

Tue, Mar 24

zlei accepted D56052: in6_mcast: Acquire ref to ifp and exit epoch earlier in sysctl.

Looks good to me.

Tue, Mar 24, 2:04 AM

Mon, Mar 23

zlei accepted D55728: rge: handle interface flags changes.

I do not have hardware to test this change, but the code looks good to me.

Mon, Mar 23, 4:13 PM

Fri, Mar 20

zlei abandoned D55898: ifnet: if_vmove_reclaim(): Be more robust to check the src / dst vnet.
Fri, Mar 20, 6:56 PM
zlei requested review of D55997: ifnet: Fix races in if_vmove_reclaim().
Fri, Mar 20, 6:54 PM
zlei committed rG2265cf938ec3: ifnet: Fix decreasing the vnet interface count (authored by zlei).
ifnet: Fix decreasing the vnet interface count
Fri, Mar 20, 10:04 AM
zlei committed rG47339e4a9209: ifnet: Fix decreasing the vnet interface count (authored by zlei).
ifnet: Fix decreasing the vnet interface count
Fri, Mar 20, 10:03 AM
zlei committed rGfa5f0d95be25: amd64: Make start_all_aps() static (authored by zlei).
amd64: Make start_all_aps() static
Fri, Mar 20, 10:03 AM
zlei committed rGf521487cd935: amd64: Make start_all_aps() static (authored by zlei).
amd64: Make start_all_aps() static
Fri, Mar 20, 10:02 AM
zlei committed rG1b7687f053af: ifnet: Fix decreasing the vnet interface count (authored by zlei).
ifnet: Fix decreasing the vnet interface count
Fri, Mar 20, 10:02 AM
zlei added a comment to D55976: rge: add support for RTL8127ATF with SFP+ interface.

Tested with a copper interface and SFP+ with a DAC.
media: Ethernet autoselect (10Gbase-LR <full-duplex>)

Fri, Mar 20, 3:03 AM

Thu, Mar 19

zlei accepted D55935: bridge(4): Remove epoch_enter during destruction.

Looks good to me.

Thu, Mar 19, 3:24 PM

Tue, Mar 17

zlei added a comment to D55832: ifnet: if_vmove_(loan|reclaim): Refactor a bit the checking of src / dst vnet.

Superseded by D55880.

Tue, Mar 17, 4:57 PM
zlei requested review of D55898: ifnet: if_vmove_reclaim(): Be more robust to check the src / dst vnet.
Tue, Mar 17, 4:56 PM
zlei added a comment to D55887: tests: Remove inet6 jumbogram tests.

I have not looked into the tests. Since the Jumbogram feature has been removed in the inet6 stack, shall the relevant tests be updated to reflect the removal but not removing the tests ?

Could you please explain more?
Is there any other jumbogram tests that I missed or you mean renumbering the fragment tests?
If it's the latter, I don't like to mix that one with this change because it would affect the git blame result of all the other fragment tests.
I'll do that in a separate revision and then I can add that commit into .git-blame-ignore-revs to avoid its side-effects.

Tue, Mar 17, 9:49 AM
zlei added inline comments to D55876: if_bridge(4): don't sleep under epoch.
Tue, Mar 17, 9:33 AM
zlei added a comment to D55885: ndp: don't send unsolicited NA for multicast address.

The link-local check here is also redundant. You have already checked the scope of the address in nd6_grand_start(). So if the address is global one, it must not be a link-local one.

nd6_grand_start(struct ifaddr *ifa, uint32_t flags)
{
...
        /* Check if new address is global */
        if ((flags & ND6_QUEUE_FLAG_NEWGUA) != 0 &&
            in6_addrscope(IFA_IN6(ifa)) != IPV6_ADDR_SCOPE_GLOBAL)
                return;
...
}

You're right! what a brain glitch!
Thank you!

Oh no, I reacted too fast, this shows I don't trust my own memory :)
This check only applies for new address event, not link-layer address change.

Tue, Mar 17, 9:24 AM
zlei added inline comments to D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().
Tue, Mar 17, 8:52 AM
zlei updated the diff for D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().

Removed the changes to comments.

Tue, Mar 17, 8:48 AM
zlei accepted D55885: ndp: don't send unsolicited NA for multicast address.

The link-local check here is also redundant. You have already checked the scope of the address in nd6_grand_start(). So if the address is global one, it must not be a link-local one.

Tue, Mar 17, 8:44 AM
zlei accepted D55876: if_bridge(4): don't sleep under epoch.
Tue, Mar 17, 7:56 AM
zlei added a comment to D55884: routing: remove ROUTE_MPATH compile option.

The ROUTE_MPATH still has subtle performance impact and the kernel built with this option has larger text size. I'd expect some people want to keep this option so they can disable it.

What is the performance impact? AFAIU, it is just array of fibs that by default has only one element.

Tue, Mar 17, 7:14 AM
zlei added inline comments to D55876: if_bridge(4): don't sleep under epoch.
Tue, Mar 17, 3:17 AM
zlei added a comment to D55887: tests: Remove inet6 jumbogram tests.

I have not looked into the tests. Since the Jumbogram feature has been removed in the inet6 stack, shall the relevant tests be updated to reflect the removal ?

Tue, Mar 17, 3:06 AM
zlei added a comment to D55884: routing: remove ROUTE_MPATH compile option.

I'm for reduce routing complexity, if it is possible to keep that option.

Tue, Mar 17, 3:00 AM
zlei added a comment to D55884: routing: remove ROUTE_MPATH compile option.

The ROUTE_MPATH still has subtle performance impact and the kernel built with this option has larger text size. I'd expect some people want to keep this option so they can disable it.

Tue, Mar 17, 2:57 AM
zlei added a comment to D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().

Correct me if I am wrong, but this seems to be two separate changes. Can this be split please?

Tue, Mar 17, 2:43 AM
zlei added inline comments to D55885: ndp: don't send unsolicited NA for multicast address.
Tue, Mar 17, 2:25 AM

Mon, Mar 16

zlei added inline comments to D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().
Mon, Mar 16, 6:43 PM
zlei abandoned D55832: ifnet: if_vmove_(loan|reclaim): Refactor a bit the checking of src / dst vnet.

Superseded by D55880.

Mon, Mar 16, 6:37 PM
zlei requested review of D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().
Mon, Mar 16, 6:32 PM
zlei committed rGe0731059af91: ifnet: Remove unreachable code (authored by zlei).
ifnet: Remove unreachable code
Mon, Mar 16, 5:04 PM
zlei closed D55828: ifnet: Remove unreachable code.
Mon, Mar 16, 5:04 PM
zlei closed D55873: ifnet: Fix decreasing the vnet interface count.
Mon, Mar 16, 4:24 PM
zlei committed rG8065ff63c0e5: ifnet: Fix decreasing the vnet interface count (authored by zlei).
ifnet: Fix decreasing the vnet interface count
Mon, Mar 16, 4:24 PM
zlei added inline comments to D55875: ifnet: Add some sanity checks.
Mon, Mar 16, 11:15 AM
zlei requested review of D55875: ifnet: Add some sanity checks.
Mon, Mar 16, 8:23 AM
zlei added a comment to D55682: ure: fix spurious link flaps from MII.

Apologies if I'm being impatient, but when does the patch go into the tree?

Mon, Mar 16, 4:42 AM · network, USB
zlei requested review of D55873: ifnet: Fix decreasing the vnet interface count.
Mon, Mar 16, 3:44 AM

Fri, Mar 13

zlei added a comment to D55828: ifnet: Remove unreachable code.

Ah, I have WIP to fix the race condition between if_detach() and if_vmove(). See PR 292993 .

Oh, I was working on that problem too.
I thought you had seen D55777 earlier, you're on the reviewers list.
I can release the PR and assign it to you to avoid duplicating effort, if you want.

Fri, Mar 13, 8:23 PM
zlei added inline comments to D55832: ifnet: if_vmove_(loan|reclaim): Refactor a bit the checking of src / dst vnet.
Fri, Mar 13, 8:20 PM

Thu, Mar 12

zlei added a comment to D55828: ifnet: Remove unreachable code.

I though that a bit, and I think no need for the assertions.

So your point is that as we see that ifioctl() already did this check the assertions are not needed, as we already know that they will never fire.

Thu, Mar 12, 7:17 PM
zlei added a comment to D55828: ifnet: Remove unreachable code.

I though that a bit, and I think no need for the assertions.

So your point is that as we see that ifioctl() already did this check the assertions are not needed, as we already know that they will never fire. But that's the point of assertions - to put them so that they never fire :) Assertions also act as documentation.

I'm not insisting on assertions, just suggesting. My longer term plan is to get rid of if_vmove anyway.

Thu, Mar 12, 6:49 PM
zlei added a comment to D55828: ifnet: Remove unreachable code.

The current logic of checking the src / dst vnet is a bit confusing. Refactor them a little. See D55832 .

Thu, Mar 12, 6:44 PM
zlei requested review of D55832: ifnet: if_vmove_(loan|reclaim): Refactor a bit the checking of src / dst vnet.
Thu, Mar 12, 6:41 PM
zlei added a comment to D55828: ifnet: Remove unreachable code.

I'd suggest to add assertions that VNET is not shutting down.

Thu, Mar 12, 6:11 PM
zlei added a comment to D55828: ifnet: Remove unreachable code.

This makes sense in if_vmove_reclaim, where the vnet comes from the held prison.

Thu, Mar 12, 5:55 PM
zlei added a comment to D55828: ifnet: Remove unreachable code.

I think I read the code carefully. Please do not hesitate to correct me if I missed anything important.

Thu, Mar 12, 3:25 PM
zlei requested review of D55828: ifnet: Remove unreachable code.
Thu, Mar 12, 3:23 PM
zlei committed rG5f0ab9d9e965: amd64: Make start_all_aps() static (authored by zlei).
amd64: Make start_all_aps() static
Thu, Mar 12, 4:26 AM
zlei closed D55668: amd64: Make start_all_aps() static.
Thu, Mar 12, 4:26 AM

Mar 5 2026

zlei added a comment to D55668: amd64: Make start_all_aps() static.

I'm almost certainly that leaving start_all_aps() public visible was unintended. Post to review for sure.

Mar 5 2026, 2:57 PM
zlei requested review of D55668: amd64: Make start_all_aps() static.
Mar 5 2026, 2:54 PM
zlei committed rGec22c4022ddb: vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned (authored by zlei).
vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned
Mar 5 2026, 11:14 AM
zlei committed rGbaee504b868b: vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned (authored by zlei).
vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned
Mar 5 2026, 11:05 AM
zlei committed rG973d607b284b: vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned (authored by zlei).
vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned
Mar 5 2026, 10:53 AM

Mar 3 2026

zlei added a comment to D49076: tests: carp: Update unicast_v4 to catch PR 284872.

The git change made me crazy while I revisit this after one year -:)

Mar 3 2026, 1:55 AM

Mar 1 2026

zlei added a comment to D53484: Remove RIP and RIPng.
In D53484#1272094, @ivy wrote:
In D53484#1270635, @bms wrote:

It's not strictly necessary, but extra karma if you do. It looks like @cy is tracking that as ports/net/freebsd-routed anyway.

well, i don't care about this code or RIP in general and i have no idea who Vernon Schryver is or what sort of diffs we might want to upstream, so i don't really want to be responsible for this. if someone else would like to take on that task, the code will still be available in our git history (and in the port, as you mentioned).

I wouldn't rule out RIP/RIPng entirely, as there may still be "sticking plaster" situations where they are required

people who still require RIP can use a modern implementation, such as in the ports net/bird3 or net/frr10. as far as i'm aware these both work well on FreeBSD and have good implementations of both RIP and RIPng.

i personally don't think anyone should be using RIP anymore, but if they want to, they can continue to do so; we just don't want to support this in src anymore.

Mar 1 2026, 4:02 PM

Feb 28 2026

zlei added a comment to D55593: netinet6: Fix memory leak on auto_linklocal.

@pouria

MFC to: stable/15

Feb 28 2026, 5:45 PM
zlei added a reviewer for D55593: netinet6: Fix memory leak on auto_linklocal: melifaro.
Feb 28 2026, 5:43 PM
zlei added inline comments to D55593: netinet6: Fix memory leak on auto_linklocal.
Feb 28 2026, 5:42 PM
zlei accepted D55593: netinet6: Fix memory leak on auto_linklocal.

Looks good to me.

Feb 28 2026, 5:34 PM
zlei added a comment to D55593: netinet6: Fix memory leak on auto_linklocal.

I'd rather prefer this, to ease my brain ;)

Feb 28 2026, 5:27 PM
zlei committed rG32beb3ae71cb: vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned (authored by zlei).
vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned
Feb 28 2026, 11:37 AM