Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects (6)

User Details

User Since
May 28 2014, 2:27 PM (620 w, 5 d)

Recent Activity

Yesterday

glebius accepted D56508: epoch: Don't idle CPUs when there's pending epoch work.

I'd love to see tests running faster, but I'm not expert to tell if we are going to have any side effects of this change.

Sun, Apr 19, 6:25 AM
glebius added a comment to D56508: epoch: Don't idle CPUs when there's pending epoch work.

IMHO, if everything in the network stack is coded properly, we don't need explicit epoch_drain_callbacks() anywhere and this KPI should disappear.

Sun, Apr 19, 6:24 AM

Sat, Apr 18

glebius added a comment to D56488: inpcb: remove always true condition in in_pcblookup_local().

I actually like "wild". The "unconnected" is already used for inpcbs that are not put into any hash, e.g. right after socket(2).

Sat, Apr 18, 7:00 PM
glebius added inline comments to D56501: pf: Use MTX_DUPOK to initialize hash chain mutexes.
Sat, Apr 18, 6:58 PM
glebius requested changes to D56501: pf: Use MTX_DUPOK to initialize hash chain mutexes.

I screwed up, but not on this hash. Looking at cd5ff4e841fb I see that I lost MTX_DUPOK on UDP endpoint hash.

Sat, Apr 18, 6:58 PM
glebius updated the diff for D56489: inpcb: remove port hash and relax port "stealing" constraint.
  • Fix the wild_okay case: either side being INADDR_ANY is okay
Sat, Apr 18, 6:52 PM
glebius closed D56186: inpcb: retire INP_DROPPED and in_pcbdrop().
Sat, Apr 18, 6:50 AM
glebius requested review of D56489: inpcb: remove port hash and relax port "stealing" constraint.
Sat, Apr 18, 1:23 AM
glebius requested review of D56488: inpcb: remove always true condition in in_pcblookup_local().
Sat, Apr 18, 1:22 AM

Fri, Apr 17

glebius updated the summary of D56482: inpcb: improve some internal function names.
Fri, Apr 17, 8:45 PM
glebius updated the diff for D56482: inpcb: improve some internal function names.
  • Cover the IPv6 counterpart, too, of course.
Fri, Apr 17, 8:44 PM
glebius added a comment to D56484: tcp: Allocate t_tcpreq_info on demand.

I'm not blocking your change. Just suggesting.

Fri, Apr 17, 8:35 PM
glebius accepted D56128: tests/netinet6: Add SLAAC and RA validation tests to ndp.

No objection, but I'm not ND expert. The test coding looks good.

Fri, Apr 17, 8:25 PM
glebius added a comment to D56484: tcp: Allocate t_tcpreq_info on demand.

Two options: 1) embed all of this in struct tcp_rack:

#ifdef TCP_REQUEST_TRK
        /* Response tracking addons. */
        uint8_t t_tcpreq_req;   /* Request count */
        uint8_t t_tcpreq_open;  /* Number of open range requests */
        uint8_t t_tcpreq_closed;        /* Number of closed range requests */
        uint32_t tcp_hybrid_start;      /* Num of times we started hybrid pacing */
        uint32_t tcp_hybrid_stop;       /* Num of times we stopped hybrid pacing */
        uint32_t tcp_hybrid_error;      /* Num of times we failed to start hybrid pacing */
        struct tcp_sendfile_track *t_tcpreq_info;
#endif

or 2) create a new structure that holds all of the above, lazily allocate it and have a pointer from struct tcp_rack to it.

Fri, Apr 17, 8:23 PM
glebius added a comment to D56484: tcp: Allocate t_tcpreq_info on demand.

Given this is purely a RACK feature, I would suggest to move it from generic struct tcpcb to struct tcp_rack.

Fri, Apr 17, 8:21 PM
glebius requested review of D56482: inpcb: improve some internal function names.
Fri, Apr 17, 7:36 PM
glebius accepted D56481: route: Use a better error number in sysctl_fibs().
Fri, Apr 17, 7:34 PM
glebius accepted D56473: route: Initialize V_rt_numfibs earlier during boot.

Thanks! Maybe provide an XXX comment that we intentionally (but why?) make non-default vnets to always have it set to 1? Make it a documented strangeness.

Fri, Apr 17, 7:34 PM
glebius added a comment to D56374: ifnet: if_detach(): Fix races with if_vmove().

They're not directly related to if_vmove(), but to the routines and bpf. For example there is still a little window for the data path to see a NULL if->if_bpf.

Fri, Apr 17, 7:05 PM
glebius committed rGd9e7dd4a19b8: carp: define CARP_AUTHLEN for carp_authlen field (authored by chris.longros_gmail.com).
carp: define CARP_AUTHLEN for carp_authlen field
Fri, Apr 17, 6:34 PM
glebius added a comment to D56473: route: Initialize V_rt_numfibs earlier during boot.

IMHO, every use of IS_DEFAULT_VNET() is a mark of incorrect code :) Ideally the function shall be split into two: one for SYSINIT() and other for VNET_SYSINIT().

Why, what's the advantage?

Fri, Apr 17, 5:58 PM
glebius added a comment to D56473: route: Initialize V_rt_numfibs earlier during boot.

To be more verbose, in this particular case, an equivalent but better change would be:

// at line 86
VNET_DEFINE(uint32_t, _rt_numfibs) = 1;
...
static void
vnet_rtnumfibs_init(const void *unused __unused)
{
        int num_rtables_base;
Fri, Apr 17, 5:51 PM
glebius added a comment to D56473: route: Initialize V_rt_numfibs earlier during boot.

IMHO, every use of IS_DEFAULT_VNET() is a mark of incorrect code :) Ideally the function shall be split into two: one for SYSINIT() and other for VNET_SYSINIT().

Fri, Apr 17, 5:41 PM
glebius accepted D56237: ping6: treat setsockopt failures as fatal.

I don't think it is possible to reproduce that. The program always passes correct optval to a correct socket. The flag enabling setsockopt() shall never fail in the kernel. Treat that more as a stylistic change. It might be useful for FreeBSD-derived projects, e.g. if Mac OS X refreshes their ping(1) with our ping, as they already did in the past, and their kernel may fail at these setsockopts.

Fri, Apr 17, 5:37 PM
glebius added a comment to D56390: pf: only allow a subset of netlink calls when securelevel is set.

Sorry, the unconditional check was a wrong suggestion. The correct one is:

if (cmd->cmd_securelevel > 0 && securelevel_gt(nlp_get_cred(nlp), cmd->cmd_securelevel)) {
Fri, Apr 17, 5:28 PM

Thu, Apr 16

glebius added a comment to D56155: siftr: replace macro constants with debug friendly enums.

No, this is not the right way to use enums.

Thu, Apr 16, 11:19 PM

Wed, Apr 15

glebius accepted D56420: tcp lro: fix vnet handling.
Wed, Apr 15, 8:21 PM
glebius added a comment to D56390: pf: only allow a subset of netlink calls when securelevel is set.

The previous version (modulo the mistake) looked better. What's the point in the additional bool? All existing declarations rely on sparse initialization, so would have .cmd_securelevel = 0 always. If you add cmd_securelevel_set, it would be .cmd_securelevel_set = false. Thus, checking .cmd_securelevel_set for being true has no difference to checking .cmd_securelevel to be positive. I'd suggest to just do the securelevel_gt() check unconditionally.

Wed, Apr 15, 5:11 PM

Tue, Apr 14

glebius committed rG6b00c652db7f: inpcb: make in6_pcbdisconnect() just like in_pcbdisconnect() (authored by glebius).
inpcb: make in6_pcbdisconnect() just like in_pcbdisconnect()
Tue, Apr 14, 11:25 PM
glebius added a comment to D56399: bpf: fix setting read timeout on ppc64.

But my test machine panics now right after booting when running ntp. Need to work around that first.

Tue, Apr 14, 11:24 PM
glebius requested changes to D56390: pf: only allow a subset of netlink calls when securelevel is set.
Tue, Apr 14, 7:42 PM
glebius committed rG76b90c1d31b9: inpcb: remove last use of relic u_quad_t (authored by glebius).
inpcb: remove last use of relic u_quad_t
Tue, Apr 14, 4:06 PM
glebius committed rG9b76228006d8: inpcb: retire inp_vnet (authored by glebius).
inpcb: retire inp_vnet
Tue, Apr 14, 4:06 PM

Mon, Apr 13

glebius added a comment to D56374: ifnet: if_detach(): Fix races with if_vmove().

I have WIP to overhaul the if_attach() and if_detach(). But that is a longer task and I think a workaround shall fit right now.

Mon, Apr 13, 2:12 PM

Sun, Apr 12

glebius committed rG151a1eab3b78: tcp: fix !INVARIANTS build (authored by glebius).
tcp: fix !INVARIANTS build
Sun, Apr 12, 9:46 PM
glebius committed rG411c28b6caa4: hash(9): fix my stupid off-by-one (authored by glebius).
hash(9): fix my stupid off-by-one
Sun, Apr 12, 9:11 PM
glebius accepted D56335: route(8): Add metric argument.
Sun, Apr 12, 7:51 PM
glebius accepted D56326: route(8): Show metric value in monitor route.
Sun, Apr 12, 7:51 PM
glebius accepted D56325: route(8): Show metric value in get route.
Sun, Apr 12, 7:50 PM
glebius accepted D56323: netlink: Add RTA_PRIORITY support (metric).
Sun, Apr 12, 7:41 PM
glebius added inline comments to D56322: routing: Add support for route metric.
Sun, Apr 12, 7:39 PM
glebius accepted D56246: route.8: Describe weight modifier.

IMHO, the description is good enough and clear. Later, native-speakers-doc-committers can improve.

Sun, Apr 12, 7:35 PM
glebius accepted D56216: tests/netinet6: Add route information option test.
Sun, Apr 12, 7:33 PM
glebius resigned from D56207: nd6: Add router address and DHCPv6-PD flags in PIO headers.

Not an expert. Looks good code wise.

Sun, Apr 12, 7:31 PM
glebius accepted D56191: route: Add route get for multipath routes with -o flag.
Sun, Apr 12, 7:29 PM
glebius resigned from D56133: nd6: Ignore entire PI if violates RFC 4862 section 5.5.3.

Not an expert in the area.

Sun, Apr 12, 7:23 PM
glebius added inline comments to D56128: tests/netinet6: Add SLAAC and RA validation tests to ndp.
Sun, Apr 12, 7:22 PM
glebius added a reverting change for rG2589ec0f3657: pcb: Move an assignment into in_pcbdisconnect(): rGedece33b38eb: inpcb: move local address assignment out of in_pcbdisconnect().
Sun, Apr 12, 6:37 PM
glebius committed rG1d0ea3dfb9cb: raw ip: remove extra argument to rip_dodisconnect() (authored by glebius).
raw ip: remove extra argument to rip_dodisconnect()
Sun, Apr 12, 6:36 PM
glebius committed rGedece33b38eb: inpcb: move local address assignment out of in_pcbdisconnect() (authored by glebius).
inpcb: move local address assignment out of in_pcbdisconnect()
Sun, Apr 12, 6:36 PM
glebius committed rGece716c5d347: raw ip: move hash table manipulation to inpcb layer (authored by glebius).
raw ip: move hash table manipulation to inpcb layer
Sun, Apr 12, 6:36 PM
glebius committed rGacb79b56b1eb: udp: make in_pcbbind_setup() acquire the hash lock internally (authored by glebius).
udp: make in_pcbbind_setup() acquire the hash lock internally
Sun, Apr 12, 6:36 PM
glebius committed rGd7c409174d25: inpcb: make in6_pcbsetport() acquire the hash lock internally (authored by glebius).
inpcb: make in6_pcbsetport() acquire the hash lock internally
Sun, Apr 12, 6:36 PM
glebius closed D56172: raw ip: move hash table manipulation to inpcb layer.
Sun, Apr 12, 6:36 PM
glebius closed D56170: inpcb: move local address assignment out of in_pcbdisconnect().
Sun, Apr 12, 6:36 PM
glebius committed rG2c48736c55c2: inpcb: make in_pcbconnect() acquire the hash lock internally (authored by glebius).
inpcb: make in_pcbconnect() acquire the hash lock internally
Sun, Apr 12, 6:36 PM
glebius added a reverting change for D38362: pcb: Move an assignment into in_pcbdisconnect(): rGedece33b38eb: inpcb: move local address assignment out of in_pcbdisconnect().
Sun, Apr 12, 6:36 PM
glebius committed rG8b4d0bec4311: inpcb: make in_pcbbind() acquire the hash lock internally (authored by glebius).
inpcb: make in_pcbbind() acquire the hash lock internally
Sun, Apr 12, 6:36 PM
glebius committed rG40dbb06fa73c: inpcb: retire INP_DROPPED and in_pcbdrop() (authored by glebius).
inpcb: retire INP_DROPPED and in_pcbdrop()
Sun, Apr 12, 6:36 PM
glebius closed D55973: udp: make in_pcbbind_setup() acquire the hash lock internally.
Sun, Apr 12, 6:36 PM
glebius committed rGce283e115b02: netinet6: remove INP_DROPPED checks from setsockopt(2) (authored by glebius).
netinet6: remove INP_DROPPED checks from setsockopt(2)
Sun, Apr 12, 6:36 PM
glebius closed D55971: inpcb: make in_pcbconnect() acquire the hash lock internally.
Sun, Apr 12, 6:36 PM
glebius closed D55972: inpcb: make in6_pcbsetport() acquire the hash lock internally.
Sun, Apr 12, 6:36 PM
glebius closed D55970: inpcb: make in_pcbbind() acquire the hash lock internally.
Sun, Apr 12, 6:36 PM
glebius committed rG0ba87ded9d07: inpcb: make in_pcbdisconnect() acquire the hash lock internally (authored by glebius).
inpcb: make in_pcbdisconnect() acquire the hash lock internally
Sun, Apr 12, 6:36 PM
glebius closed D56169: netinet6: remove INP_DROPPED checks from setsockopt(2).
Sun, Apr 12, 6:36 PM
glebius committed rGac5b9628002c: inpcb: retire the inpcb global list (authored by glebius).
inpcb: retire the inpcb global list
Sun, Apr 12, 6:36 PM
glebius closed D55968: inpcb: make in_pcbdisconnect() acquire the hash lock internally.
Sun, Apr 12, 6:36 PM
glebius committed rG2cfe62664ab7: inpcb: retire the inpcbinfo list lock (authored by glebius).
inpcb: retire the inpcbinfo list lock
Sun, Apr 12, 6:36 PM
glebius committed rG202370905f11: inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets (authored by glebius).
inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets
Sun, Apr 12, 6:36 PM
glebius closed D55967: inpcb: retire the inpcb global list.
Sun, Apr 12, 6:36 PM
glebius closed D55966: inpcb: retire the inpcbinfo list lock.
Sun, Apr 12, 6:36 PM
glebius closed D55661: inpcb: apply smr_advance(9)/smr_wait(9) trick only to reusable sockets.
Sun, Apr 12, 6:35 PM
glebius added inline comments to D55970: inpcb: make in_pcbbind() acquire the hash lock internally.
Sun, Apr 12, 6:25 PM
glebius committed rGcd5ff4e841fb: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes (authored by glebius).
pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes
Sun, Apr 12, 5:40 PM
glebius committed rG9992eb435829: gif: use hashalloc(9) (authored by glebius).
gif: use hashalloc(9)
Sun, Apr 12, 5:40 PM
glebius committed rG87ef3067acbd: tcp lro: use hashalloc(9) (authored by glebius).
tcp lro: use hashalloc(9)
Sun, Apr 12, 5:40 PM
glebius closed D56113: pf: use hashalloc(9) for key, id, src-node and udp-endpoint hashes.
Sun, Apr 12, 5:40 PM
glebius committed rGadba114dfbfb: netinet: use hashalloc(9) for IP address hash (authored by glebius).
netinet: use hashalloc(9) for IP address hash
Sun, Apr 12, 5:40 PM
glebius committed rGabf68d1cf025: hash(9): introduce hashalloc()/hashfree() KPI (authored by glebius).
hash(9): introduce hashalloc()/hashfree() KPI
Sun, Apr 12, 5:40 PM
glebius closed D56177: tcp lro: use hashalloc(9).
Sun, Apr 12, 5:40 PM
glebius closed D56176: gif: use hashalloc(9).
Sun, Apr 12, 5:40 PM
glebius committed rG8e1513dc6738: inpcb: use hashalloc(9) (authored by glebius).
inpcb: use hashalloc(9)
Sun, Apr 12, 5:40 PM
glebius closed D56175: netinet: use hashalloc(9) for IP address hash.
Sun, Apr 12, 5:40 PM
glebius closed D56174: inpcb: use hashalloc(9).
Sun, Apr 12, 5:40 PM
glebius closed D55904: hash(9): introduce hashalloc()/hashfree() KPI.
Sun, Apr 12, 5:40 PM
glebius added a comment to D55963: netinet6?: move struct ip6?_moptions definition to in6?_var.h.

@bms any objections on this change?

Sun, Apr 12, 3:33 PM
glebius updated subscribers of D55967: inpcb: retire the inpcb global list.
Sun, Apr 12, 3:31 PM
glebius accepted D56356: loopback: Account for packet drops.

Whoa. This also needs to be merged to all stable/X.

Sun, Apr 12, 2:40 PM

Fri, Apr 10

glebius added a comment to D50899: tcp: count two previously ignored kinds of syncookie failures.

We can fix nestat(1) to ignore ENOMEM on sysctl(3):

Fri, Apr 10, 3:50 PM
glebius resigned from D55880: ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl().

I have no objection to this change. And thanks for splitting the unrelated part into a separate change.

Fri, Apr 10, 3:43 PM
glebius accepted D56145: tests/pf/nat: endpoint_independent: wait for tcpdump to start.
Fri, Apr 10, 3:37 PM

Fri, Apr 3

glebius accepted D56227: netstat(1): '-w': Banners to appear before a new statistics line, not after.

Thanks!

Fri, Apr 3, 3:33 PM
glebius accepted D56233: ip_carp: define CARP_AUTHLEN for carp_authlen field.

Thanks for the change!

Fri, Apr 3, 3:31 PM

Thu, Apr 2

glebius requested changes to D56227: netstat(1): '-w': Banners to appear before a new statistics line, not after.

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