Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects (6)

User Details

User Since
May 28 2014, 2:27 PM (618 w, 1 d)

Recent Activity

Yesterday

glebius requested changes to D56227: netstat(1): '-w': Print statistics along with banners, '-q' not to count banners.

Thanks a lot for noticing the problem. I didn't test, but it looks to me that the fix will regress the very first line of the output. It is now printed immediately and will consist of zeroes or very small values.

Thu, Apr 2, 9:34 PM
glebius added a comment to D56224: filesystems/gvfs: Add option to use fuser(1) in place of lsof(1).

Guido, thanks a lot for working on that!

Thu, Apr 2, 4:43 PM
glebius requested changes to D56145: tests/pf/nat: endpoint_independent: wait for tcpdump to start.

I already went through this in other test cases. A sleep for a second makes test slower to execute but still doesn't give a 100% protection against flakyness. When tests are executed in parallel on a slow machine you may still have a failure sometimes. Here is the solution I came to so far, poll until tcpdump(1)s are all blocked on "bpf" wait channel. See 38edf96b1787ce3d8c00e4466348dab891c7a9ea.

Thu, Apr 2, 4:30 PM
glebius added a comment to D56213: Fix lock order reversal tcpinp -> so_rcv in tcp_mss().

This is kTLS that violates the correct order. This is a known problem (at least to some of us).

Thu, Apr 2, 1:00 PM

Wed, Apr 1

glebius added inline comments to D55967: inpcb: retire the inpcb global list.
Wed, Apr 1, 3:50 PM
glebius added a comment to D56134: nd6: Remove anycast check in prelist_update.

I think the word ndp is a bit misleading. I read it this is a change for the userspace one usr.sbin/ndp. I'd prefer nd6_rtr: xxx or nd6: xxx, to indicate the change is for the kernel part.

Wed, Apr 1, 3:41 PM
glebius requested changes to D56213: Fix lock order reversal tcpinp -> so_rcv in tcp_mss().

That establishes lock order tcpinp ->so_rcv, which reverses the canonical so_rcv -> tcpinp order used elsewhere and triggers WITNESS.

Wed, Apr 1, 3:33 PM

Tue, Mar 31

glebius accepted D56205: netstat: Add -F support for -g.
Tue, Mar 31, 8:56 PM
glebius added a comment to D56191: route: Add route get for multipath routes with -o flag.

Do you plan to update the manual page when you got -o support for other modes?

Tue, Mar 31, 6:53 PM
glebius added inline comments to D56187: routing: Implement merge of nhgrp in new multipath route.
Tue, Mar 31, 6:30 PM
glebius accepted D56190: tests/netlink: Add nexthop group tests for multipath.
Tue, Mar 31, 5:43 PM
glebius committed rG407b1e498018: rss: make toeplitz.c standard part of the kernel (authored by glebius).
rss: make toeplitz.c standard part of the kernel
Tue, Mar 31, 4:51 PM
glebius requested review of D56186: inpcb: retire INP_DROPPED and in_pcbdrop().
Tue, Mar 31, 3:34 PM
glebius accepted D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME.

This looks better, thanks! Let's give Randall a chance to review. He added this setsockopt() to FreeBSD.

Tue, Mar 31, 3:31 PM
glebius added inline comments to D55904: hash(9): introduce hashalloc()/hashfree() KPI.
Tue, Mar 31, 3:27 PM
glebius requested review of D56177: tcp lro: use hashalloc(9).
Tue, Mar 31, 1:59 AM
glebius requested review of D56176: gif: use hashalloc(9).
Tue, Mar 31, 1:58 AM
glebius requested review of D56175: netinet: use hashalloc(9) for IP address hash.
Tue, Mar 31, 1:57 AM
glebius requested review of D56174: inpcb: use hashalloc(9).
Tue, Mar 31, 1:55 AM

Mon, Mar 30

glebius updated the diff for D55967: inpcb: retire the inpcb global list.

Up to date version.

Mon, Mar 30, 11:07 PM
glebius requested review of D56172: raw ip: move hash table manipulation to inpcb layer.
Mon, Mar 30, 11:03 PM
glebius added a reverting change for rG2589ec0f3657: pcb: Move an assignment into in_pcbdisconnect(): D56170: inpcb: move local address assignment out of in_pcbdisconnect().
Mon, Mar 30, 11:01 PM
glebius requested review of D56170: inpcb: move local address assignment out of in_pcbdisconnect().
Mon, Mar 30, 11:01 PM
glebius added a reverting change for D38362: pcb: Move an assignment into in_pcbdisconnect(): D56170: inpcb: move local address assignment out of in_pcbdisconnect().
Mon, Mar 30, 11:01 PM
glebius requested review of D56169: netinet6: remove INP_DROPPED checks from setsockopt(2).
Mon, Mar 30, 11:00 PM
glebius added a comment to D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME.

The code placement is ad-hoc. We already have a case for IPPROTO_TCP in the main switch and the new option handling should go there. This will require some extension of linux_to_bsd_tcp_sockopt() but the result would be cleaner code.

Mon, Mar 30, 10:54 PM
glebius added a reviewer for D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME: rrs.
Mon, Mar 30, 6:17 PM
glebius added a reviewer for D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME: transport.
Mon, Mar 30, 5:59 PM
glebius added a comment to D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
In D56113#1284599, @kp wrote:

I'm seeing panics with this patch ("panic: lock "pf_keyhash" 0xfffffe00e8dffff8 already initialized").
I believe the problem is that hashalloc() allocates unzero'd memory, and which leads to incorrect assertions on the lock, if LO_INITIALIZED happens to be set in lo_flags.

Mon, Mar 30, 3:33 PM

Sat, Mar 28

glebius updated the diff for D55971: inpcb: make in_pcbconnect() acquire the hash lock internally.

Rebased.

Sat, Mar 28, 9:18 PM
glebius added inline comments to D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
Sat, Mar 28, 7:01 PM
glebius updated the diff for D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
  • Extend to src-nodes and udp-endpoints hashes.
Sat, Mar 28, 7:00 PM
glebius retitled D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes from pf: use hashalloc(9) for key and id hashes to pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
Sat, Mar 28, 6:59 PM

Fri, Mar 27

glebius committed rG6cf1afeccd8a: newsyslog: check for rename failure during log rotation (authored by chris.longros_gmail.com).
newsyslog: check for rename failure during log rotation
Fri, Mar 27, 7:30 PM
glebius closed D56088: newsyslog: check for rename failure during log rotation.
Fri, Mar 27, 7:30 PM
glebius added inline comments to D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
Fri, Mar 27, 7:27 PM
glebius added a comment to D55904: hash(9): introduce hashalloc()/hashfree() KPI.

Ok, this is how it looks like for pf(4): https://reviews.freebsd.org/D56113 Running tests now, good so far.

Fri, Mar 27, 7:25 PM
glebius requested review of D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
Fri, Mar 27, 7:21 PM
glebius updated the diff for D55904: hash(9): introduce hashalloc()/hashfree() KPI.
  • make hashfree(9) like free(9) - digest NULL
  • use size_t for size, to allow enormous hash tables
  • augment lock flags with XXX_NEW when user didn't ask for M_ZERO
Fri, Mar 27, 7:18 PM
glebius added a comment to D55904: hash(9): introduce hashalloc()/hashfree() KPI.

Looking into that for a second time, I do not see a problem at all. When you enter pf_initialize() the V_pf_hashsize is already set. So just put the hashalloc_args on the stack of pf_initialize() and that's it.

Fri, Mar 27, 6:06 PM
glebius added a comment to D55904: hash(9): introduce hashalloc()/hashfree() KPI.

Thanks for feedback, Kristof! I don't think this is a common pattern. I think the cleanest way for pf would be to a wrapper function that has hashalloc_args on its stack and has size argument. It shall also return the allocated size. This will not spend data on bss for hashalloc_args. Lines of code wise it should be just 4 lines extra: 3 for the function header one for }.

Fri, Mar 27, 5:51 PM

Thu, Mar 26

glebius added a comment to D55966: inpcb: retire the inpcbinfo list lock.

The only user of in_pcbremhash() function is now only in_pcbdrop()
should we keep it?
IMHO, since the in_pcbdrop() is small enough, maybe we should expand the in_pcbremhash() and remove it entirely.

Thu, Mar 26, 6:05 PM
glebius added inline comments to D56088: newsyslog: check for rename failure during log rotation.
Thu, Mar 26, 1:48 AM
glebius added a comment to D56089: domain.9: Extend to describe protosw prototypes.

There are few things in the added text that, I hope, will disapper/change before 16.0-RELEASE. I would not document them at all to avoid any harvesting by LLMs and other robots. In the past reality I would be fine with documenting stuff as is and later changing it as the code changes. What do other people, especially doc committers think?

Thu, Mar 26, 1:42 AM

Wed, Mar 25

glebius accepted D56088: newsyslog: check for rename failure during log rotation.
Wed, Mar 25, 9:03 PM
glebius committed rGf6989880841b: tests/netinet: add raw:reconnect test (authored by glebius).
tests/netinet: add raw:reconnect test
Wed, Mar 25, 7:59 PM
glebius accepted D56069: ipfw: skip tests if required sysctl is not set.
Wed, Mar 25, 4:30 AM

Tue, Mar 24

glebius accepted D56067: tcp_usrreq: allocate tfo counter when required.
Tue, Mar 24, 9:51 PM
glebius committed rGcd05c88058b5: tests/netinet: add test for getsockname() on a disconnected TCP socket (authored by glebius).
tests/netinet: add test for getsockname() on a disconnected TCP socket
Tue, Mar 24, 9:26 PM
Herald added a reviewer for D38362: pcb: Move an assignment into in_pcbdisconnect(): pouria.

I'd like to revert this revision. I think the logic of clearing local address at the protocol level makes sense. It is feature of UDP, not of any protocol, that local address is cleared on disconnect. As you noted this code can be tracked down to pre-FreeBSD times.

Tue, Mar 24, 9:20 PM

Mon, Mar 23

glebius committed rG73f72ca08dbb: tcp: make TCP_TRK_TRACK_FLG_* flags visible to userland programs (authored by glebius).
tcp: make TCP_TRK_TRACK_FLG_* flags visible to userland programs
Mon, Mar 23, 9:56 PM
glebius accepted D56052: in6_mcast: Acquire ref to ifp and exit epoch earlier in sysctl.
Mon, Mar 23, 9:19 PM
glebius accepted D55998: bsnmpd: fix some memory leaks in mibII.
Mon, Mar 23, 8:17 PM
glebius accepted D56025: tcp: retire TF_SENTSYN.

Thanks a lot! Waiting for confirmation from @rrs

Mon, Mar 23, 4:42 AM

Sat, Mar 21

glebius updated the diff for D55967: inpcb: retire the inpcb global list.

Address review comments.

Sat, Mar 21, 6:05 AM
glebius added a comment to D55966: inpcb: retire the inpcbinfo list lock.

Probably the lock should be renamed to something more generic, not including "hash"?

Sat, Mar 21, 6:01 AM
glebius updated the diff for D55973: udp: make in_pcbbind_setup() acquire the hash lock internally.

Give up on SMR synchronization for the large function and for now just
push the lock down into in_pcb.c.

Sat, Mar 21, 3:38 AM
glebius retitled D55973: udp: make in_pcbbind_setup() acquire the hash lock internally from udp: in_pcbbind_setup() doesn't require hash write lock to udp: make in_pcbbind_setup() acquire the hash lock internally.
Sat, Mar 21, 3:36 AM
glebius added a comment to D55973: udp: make in_pcbbind_setup() acquire the hash lock internally.

I see :( Also, IMHO, such secure random machinery as chacha offers is an overkill when we select one port out of 65k.

Sat, Mar 21, 3:28 AM
glebius added a comment to D55973: udp: make in_pcbbind_setup() acquire the hash lock internally.

This is a bit branching of the initial topic, but I also found that arc4random() does mtx_lock() inside. And we use arc4random() when we select a random local port. So the entire function can't be put into SMR for that reason as well.

Sat, Mar 21, 2:35 AM

Fri, Mar 20

glebius added inline comments to D55973: udp: make in_pcbbind_setup() acquire the hash lock internally.
Fri, Mar 20, 9:02 PM
glebius updated the diff for D55661: inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets.

Use == 0 to check flags.

Fri, Mar 20, 8:27 PM
glebius added inline comments to D55904: hash(9): introduce hashalloc()/hashfree() KPI.
Fri, Mar 20, 5:29 PM
glebius closed D55965: tcp: remove extraneous code.
Fri, Mar 20, 4:56 PM
glebius committed rG03b7b779a805: tcp/rack: don't call call tcp_state_change() before tcp_close() (authored by glebius).
tcp/rack: don't call call tcp_state_change() before tcp_close()
Fri, Mar 20, 4:56 PM
glebius committed rG0798ad802350: tcp: remove extraneous code (authored by glebius).
tcp: remove extraneous code
Fri, Mar 20, 4:56 PM
glebius closed D55969: tcp/rack: don't call call tcp_state_change() before tcp_close().
Fri, Mar 20, 4:56 PM

Thu, Mar 19

glebius requested review of D55973: udp: make in_pcbbind_setup() acquire the hash lock internally.
Thu, Mar 19, 7:24 PM
glebius requested review of D55972: inpcb: make in6_pcbsetport() acquire the hash lock internally.
Thu, Mar 19, 7:23 PM
glebius requested review of D55971: inpcb: make in_pcbconnect() acquire the hash lock internally.
Thu, Mar 19, 7:23 PM
glebius requested review of D55970: inpcb: make in_pcbbind() acquire the hash lock internally.
Thu, Mar 19, 7:23 PM
glebius requested review of D55969: tcp/rack: don't call call tcp_state_change() before tcp_close().
Thu, Mar 19, 7:22 PM
glebius requested review of D55968: inpcb: make in_pcbdisconnect() acquire the hash lock internally.
Thu, Mar 19, 7:20 PM
glebius requested review of D55967: inpcb: retire the inpcb global list.
Thu, Mar 19, 7:20 PM
glebius requested review of D55966: inpcb: retire the inpcbinfo list lock.
Thu, Mar 19, 7:20 PM
glebius updated the diff for D55661: inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets.

Adjust comment placement per Mark's suggestion.

Thu, Mar 19, 7:18 PM
glebius requested review of D55965: tcp: remove extraneous code.
Thu, Mar 19, 7:09 PM
glebius accepted D55850: nd6: Fix delayed proxy address.

Code wise looks good to me. But I'm not protocol expert.

Thu, Mar 19, 5:58 PM
glebius accepted D55935: bridge(4): Remove epoch_enter during destruction.
Thu, Mar 19, 5:53 PM
glebius requested review of D55963: netinet6?: move struct ip6?_moptions definition to in6?_var.h.
Thu, Mar 19, 5:51 PM

Wed, Mar 18

glebius accepted D55905: ndp: Accept multiple queued ND for non-GRAND NAs.
Wed, Mar 18, 11:36 PM
glebius added inline comments to D55927: tests: Add grand link-layer event.
Wed, Mar 18, 10:59 PM
glebius added inline comments to D55927: tests: Add grand link-layer event.
Wed, Mar 18, 10:58 PM
glebius committed rG85cf26c6ee09: in_var.h: fixup comments that mention use by ifmcstat(8) (authored by glebius).
in_var.h: fixup comments that mention use by ifmcstat(8)
Wed, Mar 18, 9:12 PM
glebius committed rGad0e698e642e: ifmcstat: remove libkvm(3) code (authored by glebius).
ifmcstat: remove libkvm(3) code
Wed, Mar 18, 9:12 PM
glebius committed rGcc6672235c3b: tests/netinet/raw: fix ssize_t printf(3) format (authored by glebius).
tests/netinet/raw: fix ssize_t printf(3) format
Wed, Mar 18, 6:52 PM
glebius committed rGc1481c9f4a42: tests/netinet: provide test for raw_ip.c:rip_input() (authored by glebius).
tests/netinet: provide test for raw_ip.c:rip_input()
Wed, Mar 18, 5:41 PM
glebius updated the diff for D55904: hash(9): introduce hashalloc()/hashfree() KPI.

Some additions to the manual page.

Wed, Mar 18, 4:58 PM
glebius added reviewers for D55859: kyua: Add external setup and teardown mechanism: olivier, siva.
Wed, Mar 18, 4:34 PM
glebius added a comment to D55859: kyua: Add external setup and teardown mechanism.

Looks like the logic covers all imaginable cases. Of course as result it is a bit complex. But if properly documented should be fine.

Wed, Mar 18, 4:34 PM
glebius added a comment to D55905: ndp: Accept multiple queued ND for non-GRAND NAs.

I'd suggest to use more specific commit line, e.g. ndp: handle a case when two timers coalesce for the same ifa. Or something else that you can come up with. Just more specific than "make things better" :)

Wed, Mar 18, 12:13 AM
glebius added inline comments to D55905: ndp: Accept multiple queued ND for non-GRAND NAs.
Wed, Mar 18, 12:11 AM

Tue, Mar 17

glebius updated the diff for D55904: hash(9): introduce hashalloc()/hashfree() KPI.

Add sx(9) and rmlock(9) support.

Tue, Mar 17, 11:58 PM
glebius added a comment to D55904: hash(9): introduce hashalloc()/hashfree() KPI.
In D55904#1279057, @imp wrote:

Do you need to validate the enum value is know?

Tue, Mar 17, 10:47 PM
glebius added a comment to D55904: hash(9): introduce hashalloc()/hashfree() KPI.

I'll see if rmlock(9) and sx(9) can be added and update.

Tue, Mar 17, 10:24 PM
glebius updated the diff for D55904: hash(9): introduce hashalloc()/hashfree() KPI.

Last minute change before sharing of course had a small mistake :)

Tue, Mar 17, 7:48 PM
glebius added a reviewer for D55904: hash(9): introduce hashalloc()/hashfree() KPI: Doc Committers.
Tue, Mar 17, 7:27 PM
glebius added a reviewer for D55904: hash(9): introduce hashalloc()/hashfree() KPI: Src Committers.
Tue, Mar 17, 7:27 PM
glebius requested review of D55904: hash(9): introduce hashalloc()/hashfree() KPI.
Tue, Mar 17, 7:27 PM
glebius added a comment to D55876: if_bridge(4): don't sleep under epoch.

mbufs on any queue shall not need epoch.

Tue, Mar 17, 4:08 PM