Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects (6)

User Details

User Since
May 28 2014, 2:27 PM (640 w, 6 d)

Recent Activity

Today

glebius added a comment to D59502: netinet: let the global netisr dispatch policy govern IP input.

Since proposed changes all happen under RSS, make Adrian the owner, but also subscribe other potentially interested parties.

Tue, Sep 8, 5:40 AM
glebius added reviewers for D59502: netinet: let the global netisr dispatch policy govern IP input: adrian, network, transport.
Tue, Sep 8, 5:40 AM
glebius added a comment to D59501: netinet: add SO_REUSEPORT_LB_CPU for receive-CPU socket affinity.

Pardon naive quick question, before reading deeper into the proposal: any downsides with proposed behavior? Can it be on by default for SO_REUSEPORT_LB?

Tue, Sep 8, 5:39 AM
glebius added reviewers for D59501: netinet: add SO_REUSEPORT_LB_CPU for receive-CPU socket affinity: network, transport.
Tue, Sep 8, 5:37 AM
glebius added reviewers for D59501: netinet: add SO_REUSEPORT_LB_CPU for receive-CPU socket affinity: markj, glebius, gallatin.
Tue, Sep 8, 5:37 AM
glebius added a comment to D59455: locks: provide a macro to extract lock_object from various lock types.

Any opinion if NOLOCK would be a better name than NULLLOCK?

Tue, Sep 8, 5:35 AM
glebius added inline comments to D59426: ipfw: refactor macros around m_pullup().
Tue, Sep 8, 5:34 AM
glebius added inline comments to D59328: iflib: Track queue datapath lifecycle.
Tue, Sep 8, 5:21 AM

Yesterday

glebius added inline comments to D59451: tcp: collect and report more statistics on the TCP host cache.
Mon, Sep 7, 8:24 PM
glebius added inline comments to D59435: ipfw: use typed pointers to access network protocols headers where possible.
Mon, Sep 7, 8:23 PM
glebius added inline comments to D59454: tcp: provide tcp_rttupdated() and call it periodically.
Mon, Sep 7, 8:18 PM
glebius updated the diff for D59495: buf_ring: use counter(9) for drops.

Rebase on new version of D59457.

Mon, Sep 7, 7:40 PM
glebius updated the diff for D59457: buf_ring: support different lock classes.
  • Keep br_lock in user mode.
Mon, Sep 7, 7:37 PM
glebius added inline comments to D59457: buf_ring: support different lock classes.
Mon, Sep 7, 7:26 PM
glebius requested review of D59495: buf_ring: use counter(9) for drops.
Mon, Sep 7, 7:17 PM
glebius added inline comments to D59457: buf_ring: support different lock classes.
Mon, Sep 7, 7:15 PM
glebius updated the diff for D59455: locks: provide a macro to extract lock_object from various lock types.
  • parenthesis
Mon, Sep 7, 7:12 PM
glebius closed D59325: tcp: fix TCPS_CLOSED state underleak in syncache_socket().
Mon, Sep 7, 7:11 PM
glebius committed rGb712bb84a7a7: tcp: fix TCPS_CLOSED state underleak in syncache_socket() (authored by glebius).
tcp: fix TCPS_CLOSED state underleak in syncache_socket()
Mon, Sep 7, 7:10 PM
glebius committed rG08cf9598bd90: inpcb: use new local address in in_pcbconnect() (authored by glebius).
inpcb: use new local address in in_pcbconnect()
Mon, Sep 7, 6:52 PM
glebius committed rG2e16d37e275f: tests/netinet: test case for a jail with 2 addresses (authored by glebius).
tests/netinet: test case for a jail with 2 addresses
Mon, Sep 7, 6:52 PM
glebius abandoned D59225: inpcb: relax recently added assertion.

Thanks to Nick for pointing out the problem, that I had a blind eye on.

Mon, Sep 7, 6:46 PM
glebius added inline comments to D59225: inpcb: relax recently added assertion.
Mon, Sep 7, 6:38 PM
glebius accepted D59465: hastd: Support short reads.

I have no objections on the change, although I would do it differently.

Mon, Sep 7, 5:46 PM
glebius added inline comments to D59457: buf_ring: support different lock classes.
Mon, Sep 7, 5:44 PM
glebius updated the diff for D59457: buf_ring: support different lock classes.
  • Use lk2lo() and NULLLOCK.
Mon, Sep 7, 5:38 PM
glebius updated the diff for D59456: callout: provide callout_init_lock().
  • Manual page fixes.
  • Use lk2lo().
Mon, Sep 7, 5:38 PM
glebius updated the diff for D59455: locks: provide a macro to extract lock_object from various lock types.

Hijack this revision to a completely different change. However, it is still
a prerequisite to D59456 and D59457. This is why this revision, not a new one.

Mon, Sep 7, 5:38 PM
glebius reclaimed D59455: locks: provide a macro to extract lock_object from various lock types.
Mon, Sep 7, 5:35 PM
glebius retitled D59455: locks: provide a macro to extract lock_object from various lock types from locks: provide transparent union for all lock classes to locks: provide a macro to extract lock_object from various lock types.
Mon, Sep 7, 5:35 PM
glebius committed rG4e45f4c76723: buf_ring: tiny style(9) fixup (authored by glebius).
buf_ring: tiny style(9) fixup
Mon, Sep 7, 4:59 PM
glebius added inline comments to D59457: buf_ring: support different lock classes.
Mon, Sep 7, 4:58 PM

Sun, Sep 6

glebius updated the diff for D59456: callout: provide callout_init_lock().

Remove mention of lock_object_t in the manual page.

Sun, Sep 6, 7:59 PM
glebius updated the diff for D59457: buf_ring: support different lock classes.
  • Use _Generic() instead of transparent union.
Sun, Sep 6, 7:56 PM
glebius updated the diff for D59456: callout: provide callout_init_lock().
  • Reduce amount of changes.
Sun, Sep 6, 6:40 PM
glebius abandoned D59455: locks: provide a macro to extract lock_object from various lock types.

D59456 refactored to use _Generic()

Sun, Sep 6, 6:36 PM
glebius updated the diff for D59456: callout: provide callout_init_lock().
  • Use _Generic() instead of transparent union
Sun, Sep 6, 6:35 PM
glebius added inline comments to D59465: hastd: Support short reads.
Sun, Sep 6, 6:23 PM
glebius added a comment to D59465: hastd: Support short reads.
In D59465#1364042, @des wrote:

You are completely misreading the problem. It is not about receiving descriptors, it is that the code relies on short reads and the only reason it ever worked is that MSG_WAITALL didn't always block until the entire request was satisfied. The very first read on a new connection (in proto_connection_recv()) asks for 127 bytes and gets 4.

Sun, Sep 6, 6:22 PM
glebius updated the diff for D59427: ipfw: cleanup !FreeBSD and !_KERNEL code.
  • Cover dummynet, too.
Sun, Sep 6, 4:37 PM
glebius added a comment to D59465: hastd: Support short reads.

I'm in favor of using MSG_WAITALL as it makes applications to do less work. Given that hastd protocol can predict when we are expecting to receive a descriptor, the patch like in D57511 seems a good solution for me. The problem I see in D57511 is that in the proto_descriptor_recv() the size of data is not checked, just asked to be > 0. It probably can be combined with your change that changes return values to ssize_t.

Sun, Sep 6, 4:17 PM
glebius added inline comments to D59465: hastd: Support short reads.
Sun, Sep 6, 4:10 PM
glebius committed rGe5bcf9883989: recv(2): update description of MSG_WAITALL (authored by glebius).
recv(2): update description of MSG_WAITALL
Sun, Sep 6, 4:04 PM
glebius added a comment to D59455: locks: provide a macro to extract lock_object from various lock types.

I can't see how _Generic() can do the same. AFAIK, _Generic() implies multiple different functions. My goal is the opposite - have single function that accepts arguments of different (but compatible) types.

Sun, Sep 6, 2:11 AM

Sat, Sep 5

glebius updated the diff for D59450: loopback: set MTU to IF_MAXMTU.
  • Use IF_MAXMTU.
Sat, Sep 5, 10:22 PM
glebius retitled D59450: loopback: set MTU to IF_MAXMTU from loopback: set MTU to IP_MAXPACKET to loopback: set MTU to IF_MAXMTU.
Sat, Sep 5, 10:22 PM
glebius added inline comments to D58803: route/fib_algo: Use refcount(9) for fib_lookup_module.
Sat, Sep 5, 10:17 PM
glebius added inline comments to D58290: inpcb: add single peer local port caching.
Sat, Sep 5, 9:07 PM
glebius updated the diff for D58290: inpcb: add single peer local port caching.
  • Provide cache linkage, so that obsolete cache holds a pointer to a new one.
Sat, Sep 5, 8:59 PM
glebius updated the diff for D58290: inpcb: add single peer local port caching.
  • Add sysctl to disable the feature.
Sat, Sep 5, 8:48 PM
glebius added a comment to D59450: loopback: set MTU to IF_MAXMTU.

I like the idea of increasing the MTU. Is there a reason why you select 0xffff? This is the maximum size of an IPv4 packet, but an IPv6 packet can have a size of 0xffff + 40. Why not use that value? Would it make sense to use a multiple of 4?

Sat, Sep 5, 7:45 PM
glebius added a comment to D59455: locks: provide a macro to extract lock_object from various lock types.
In D59455#1363642, @kib wrote:

I believe this directly breaks the aliasing rules for C.

Sat, Sep 5, 7:25 PM
glebius updated the diff for D59454: tcp: provide tcp_rttupdated() and call it periodically.
  • No local variable.
Sat, Sep 5, 7:08 PM
glebius updated the diff for D59453: tcp: use sparse initializer for host cache metrics.
  • No local variable at all.
Sat, Sep 5, 7:06 PM
glebius added inline comments to D59453: tcp: use sparse initializer for host cache metrics.
Sat, Sep 5, 6:42 PM
glebius committed rGf1fa2f7db121: amd64: initialize IPI scoreboard earlier (authored by glebius).
amd64: initialize IPI scoreboard earlier
Sat, Sep 5, 6:11 PM
glebius closed D58714: amd64: initialize IPI scoreboard earlier.
Sat, Sep 5, 6:11 PM
glebius closed D58829: random: don't collect entropy when scheduling software interrupt handlers.
Sat, Sep 5, 6:06 PM
glebius committed rGd13ee10b7714: random: don't collect entropy when scheduling software interrupt handlers (authored by glebius).
random: don't collect entropy when scheduling software interrupt handlers
Sat, Sep 5, 6:06 PM
glebius retitled D58829: random: don't collect entropy when scheduling software interrupt handlers from ithread: don't collect entropy in swi_sched() to random: don't collect entropy when scheduling software interrupt handlers.
Sat, Sep 5, 6:03 PM
glebius added a comment to D59457: buf_ring: support different lock classes.

@kp added you since it touches OpenVPN
@gallatin @kp note dependency on D59455

Sat, Sep 5, 5:51 PM
glebius added reviewers for D59457: buf_ring: support different lock classes: gallatin, kp.
Sat, Sep 5, 5:51 PM
glebius requested review of D59457: buf_ring: support different lock classes.
Sat, Sep 5, 5:50 PM
glebius requested review of D59456: callout: provide callout_init_lock().
Sat, Sep 5, 5:50 PM
glebius requested review of D59455: locks: provide a macro to extract lock_object from various lock types.
Sat, Sep 5, 5:49 PM
glebius requested review of D59452: tcp: turn on TCP hostcache for socket buffer sizes.
Sat, Sep 5, 5:45 PM
glebius requested review of D59454: tcp: provide tcp_rttupdated() and call it periodically.
Sat, Sep 5, 5:45 PM
glebius requested review of D59453: tcp: use sparse initializer for host cache metrics.
Sat, Sep 5, 5:45 PM
glebius requested review of D59451: tcp: collect and report more statistics on the TCP host cache.
Sat, Sep 5, 5:44 PM
glebius requested review of D59450: loopback: set MTU to IF_MAXMTU.
Sat, Sep 5, 5:22 PM
glebius accepted D59384: tcp: remove redundant assignments.
Sat, Sep 5, 4:59 PM
glebius added a comment to D57511: hastd: fix fd passing over socketpair.
In D57511#1362362, @des wrote:

There might be a solution that doesn't require changing the internal API: don't use MSG_WAITALL. You will however have to think carefully about short read semantics.

Sat, Sep 5, 4:58 PM
glebius added a comment to D59387: net/if: Fix ifa memory leak during vnet removal.

I vaguely remember that December 2025 when I was refactoring the attach/detach of domains/interfaces 0d469d23715d690b863787ebfa51529e1f6a9092, I found out that there are at least 2 places where we free addresses and multicast addresses. And apparently we mishandle that as there is a leak left. And I left it for later. Maybe good time for another take on that mess.

Sat, Sep 5, 4:53 PM
glebius accepted D59392: nd6: Fix the array size in union nd_opts.
Sat, Sep 5, 4:47 PM
glebius added inline comments to D58803: route/fib_algo: Use refcount(9) for fib_lookup_module.
Sat, Sep 5, 4:37 PM

Fri, Sep 4

glebius added inline comments to D59426: ipfw: refactor macros around m_pullup().
Fri, Sep 4, 11:17 PM
glebius added a comment to D59435: ipfw: use typed pointers to access network protocols headers where possible.

Treat this as a suggestion. IMHO, this is more readable than the old version. If everybody disagrees with me, I'm fine with abandoning this.

Fri, Sep 4, 11:11 PM
glebius requested review of D59435: ipfw: use typed pointers to access network protocols headers where possible.
Fri, Sep 4, 11:10 PM
glebius requested review of D59427: ipfw: cleanup !FreeBSD and !_KERNEL code.
Fri, Sep 4, 9:57 PM
glebius added a comment to D59389: ipfw: pull up only the headers ipfw_chk() inspects.

Alternative https://reviews.freebsd.org/D59426 I will also see if the new PULLUP() can be used everywhere down below the function to easily get typed pointers with guaranteed memory length provided.

Fri, Sep 4, 9:25 PM
glebius requested review of D59426: ipfw: refactor macros around m_pullup().
Fri, Sep 4, 9:24 PM
glebius requested changes to D59390: ipfw tests: cover layer-2 filtering of unmapped mbufs.
Fri, Sep 4, 9:22 PM
glebius added a comment to D59389: ipfw: pull up only the headers ipfw_chk() inspects.

Ok, this mess mostly comes from me. While reviewing this patch I came to alternative that I will post soon.

Do you agree that I can abandon this revision?

Fri, Sep 4, 8:14 PM
glebius added a comment to D59389: ipfw: pull up only the headers ipfw_chk() inspects.

Ok, this mess mostly comes from me. While reviewing this patch I came to alternative that I will post soon.

Fri, Sep 4, 6:46 PM
glebius added reviewers for D59389: ipfw: pull up only the headers ipfw_chk() inspects: ae, lytboris_gmail.com.
Fri, Sep 4, 5:46 PM
glebius added a comment to D59387: net/if: Fix ifa memory leak during vnet removal.

P.S. Can't resist to put my standard sidenote here. This all is so complicated due to if_vmove() :)

Fri, Sep 4, 5:23 PM
glebius added a comment to D59387: net/if: Fix ifa memory leak during vnet removal.

You definitely found the problem, but the fix doesn't seem correct. There is asymmetry in allocation/freeing. It could close the leak at some configurations without regressions, of course. But IMHO not at all configurations.

Fri, Sep 4, 5:22 PM

Thu, Sep 3

glebius added a comment to D57511: hastd: fix fd passing over socketpair.

I added Dag-Erling as he recently committed to hastd.

Thu, Sep 3, 8:43 PM
glebius added a reviewer for D57511: hastd: fix fd passing over socketpair: des.
Thu, Sep 3, 8:42 PM

Wed, Sep 2

glebius requested review of D59325: tcp: fix TCPS_CLOSED state underleak in syncache_socket().
Wed, Sep 2, 9:25 PM
glebius accepted D59294: iflib: Do not hold the ifnet lock across registration.

I'm also hitting deadlock on boot on one of my desktops. And this patch helps. And of course it makes things correct.

Wed, Sep 2, 7:43 PM

Tue, Sep 1

glebius added a comment to D59294: iflib: Do not hold the ifnet lock across registration.

I'd be happy if you go back to original version of this revision. Sorry for incorrectly reading the file and not understanding that both uses of IFNET_WLOCK were actually connected and both originating from the netmap change.

Tue, Sep 1, 7:24 PM
glebius added a comment to D59294: iflib: Do not hold the ifnet lock across registration.

Did the original version of this review removed use of IFNET_WLOCK completely? If I understand phabricator correct, that would be URL https://reviews.freebsd.org/D59294?id=185524 I also would prefer this.

Tue, Sep 1, 3:06 PM

Mon, Aug 31

glebius added a comment to D59289: ifnet: Traverse interface groups under the network epoch.

Please refactor the fe00ca2f88718 and I will see if anything can be done to e0e12405285b6. If successful with the latter, I will move the lock to if.c and that will prevent LLMs to produce this kind of problem again.

Mon, Aug 31, 11:15 PM
glebius added a reviewer for D59289: ifnet: Traverse interface groups under the network epoch: network.
Mon, Aug 31, 11:13 PM
glebius added a comment to D59289: ifnet: Traverse interface groups under the network epoch.

Mkay. We were actually already 100% correct on this lock until in 2022 in e0e12405285b6 vmaffione@ abused it for the first time. That wasn't noticed, since that was specific to netmap and due to me not keeping eye on changes close back in 2022. And very recently you pushed some LLM generated code in fe00ca2f88718 that introduced more IFNET_WLOCK() into iflib.c. Most likely you are stepping on the latter.

Mon, Aug 31, 11:04 PM
glebius requested changes to D59289: ifnet: Traverse interface groups under the network epoch.

It is a problem of iflib. Drivers shall not use IFNET_WLOCK(). Ideally the lock should be private to net/if.c, in reality some other files in the network stack use it, but not drivers. iflib violates that, and it seems to be a pretty recent thing.

Mon, Aug 31, 10:44 PM
glebius added a comment to D59204: iflib: Require sustained demand for TX watchdog.

I've been running with this patch for 4 days. Not watchdog timeouts observed.

Mon, Aug 31, 7:23 PM

Thu, Aug 27

glebius requested review of D59225: inpcb: relax recently added assertion.
Thu, Aug 27, 4:16 PM

Tue, Aug 25

glebius added a comment to D59018: socket: Restore handling of IPPROTO_DIVERT.

All binaries. As I tried to explain on the lists a while back, a python script like:

with socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_DIVERT) as fd:
    fd.bind(('0.0.0.0', 8000))
    r = fd.recvfrom(8192)
    ...
    fd.sendto(r[0], r[1])

does not work properly without this change. Changing the socket domain to PF_DIVERT does not fix the problem, because python does not know which sockaddr to use for recvfrom in that case.

Tue, Aug 25, 6:46 PM