Page MenuHomeFreeBSD

glebius (Gleb Smirnoff)
User

Projects (6)

User Details

User Since
May 28 2014, 2:27 PM (633 w, 4 d)

Recent Activity

Fri, Jul 17

glebius accepted D58305: net/if.c: Add fib-aware ifa_ifwithaddr().
Fri, Jul 17, 11:54 PM
glebius added inline comments to D58305: net/if.c: Add fib-aware ifa_ifwithaddr().
Fri, Jul 17, 4:41 PM
glebius added inline comments to D58305: net/if.c: Add fib-aware ifa_ifwithaddr().
Fri, Jul 17, 4:30 PM
glebius accepted D58305: net/if.c: Add fib-aware ifa_ifwithaddr().
Fri, Jul 17, 4:22 PM
glebius added inline comments to D58305: net/if.c: Add fib-aware ifa_ifwithaddr().
Fri, Jul 17, 4:21 PM
glebius updated the diff for D58290: inpcb: add single peer local port caching.
  • Don't forget to clear the bit on inpcb disconnect/free. Thanks, Vova!
Fri, Jul 17, 3:43 PM
glebius added a comment to D58281: bind(2): Lookup local address in current FIB if '*.bind_all_fibs' is active.

Thank you for the offer, but I was trying to avoid unnecessary churn if the same thing can be achieved with ifa_ifwithnet. If you have future uses for a fib-aware version of ifa_ifwithaddr() I can implement it as well.

Fri, Jul 17, 2:58 PM
glebius added a comment to D58290: inpcb: add single peer local port caching.

Some performance data. The test that pushes local port allocation to the corner run on CURRENT as base, then D58131 as unlock and then on D58131 and this revision combined as cache. Using virtual machine with 8 CPUs.

x base
+ unlock
* cache
+------------------------------------------------------------------------------+
|*                                                                             |
|*                                                                             |
|*                                                                             |
|*                                                                             |
|*                                                                             |
|*                                                                             |
|*    +                                                                        |
|*    ++                                                                       |
|*    ++                                                                       |
|*    +++++                     xx x    x x       xx          x  x            x|
|A    |A|                        |____________M__A______________|              |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10         14.44         36.24         21.28        22.525     7.2199696
+  10          2.39          4.14         2.835         3.021    0.59897041
Difference at 95.0% confidence
        -19.504 +/- 4.81339
        -86.5882% +/- 3.35841%
        (Student's t, pooled s = 5.12283)
*  10          0.14          0.21          0.14         0.147   0.022135944
Difference at 95.0% confidence
        -22.378 +/- 4.79693
        -99.3474% +/- 0.153552%
        (Student's t, pooled s = 5.10531)
Fri, Jul 17, 2:09 AM
glebius requested review of D58290: inpcb: add single peer local port caching.
Fri, Jul 17, 1:56 AM
glebius committed rG77a201b1705d: ministat: parse comma used as decimal delimiter (authored by glebius).
ministat: parse comma used as decimal delimiter
Fri, Jul 17, 1:42 AM
glebius committed rG56ac3351c61f: witness: fix operation without WITNESS_SKIPSPIN (authored by glebius).
witness: fix operation without WITNESS_SKIPSPIN
Fri, Jul 17, 1:41 AM

Thu, Jul 16

glebius requested changes to D58281: bind(2): Lookup local address in current FIB if '*.bind_all_fibs' is active.

IMHO, the check shall be located in in_pcbbind_avail() in the block that has the comment * Is the address a local IP address?. We need ifa_ifwithaddr() version that has fibnum argument. Many other functions in the ifa_if* family already have it. The IPv6 version is similar.

Thu, Jul 16, 4:42 PM
glebius added a comment to D58273: inpcb: declare struct in_conninfo as a single declaration.

The struct in_endpoints can also be anonymized easily, but that would highly likely affect something outside of FreeBSD. Another level of #define to be removed. Let me know what you think about this and I will dig deeper into this if we all agree.

Thu, Jul 16, 1:12 AM
glebius added a comment to D58273: inpcb: declare struct in_conninfo as a single declaration.

Note: union in_dependaddr can be anonymized after small cleanup of lbgroup code and siftr(4). This removes another level of of defines for both IPv6 and IPv4. This may need universe/exp-run, though.

Thu, Jul 16, 1:05 AM
glebius requested review of D58273: inpcb: declare struct in_conninfo as a single declaration.
Thu, Jul 16, 1:00 AM

Wed, Jul 15

glebius updated the diff for D58131: inpcb: take a pcbinfo database out from single lock.
  • Rebase. Should now apply to main.
Wed, Jul 15, 7:09 PM
glebius committed rG3abd3d3cf3f0: inpcb: return ENOMEM if bind(2) fails to allocate lbgroup (authored by glebius).
inpcb: return ENOMEM if bind(2) fails to allocate lbgroup
Wed, Jul 15, 7:09 PM
glebius committed rGca4eb3f3989b: inpcb: do not set INP_ANONPORT until successful operation (authored by glebius).
inpcb: do not set INP_ANONPORT until successful operation
Wed, Jul 15, 7:08 PM
glebius added inline comments to D58131: inpcb: take a pcbinfo database out from single lock.
Wed, Jul 15, 6:08 PM
glebius committed rG3ff24c76c140: inpcb: remove unneeded #ifdef INET || INET6 (authored by glebius).
inpcb: remove unneeded #ifdef INET || INET6
Wed, Jul 15, 2:18 AM
glebius added a comment to D58131: inpcb: take a pcbinfo database out from single lock.

I got another naive benchmark. It exercises situation when we create as much as possible connections from us to a single peer:port eventually running out of ports. This exercises the worst case of the cycle in in_pcb_lport_dest(), which at the end of the test is executed for 10^4 times to find a port. While the cycle itself is not optimized at all, on a virtual machine with 8 CPUs the test passes 6-7 times faster than before the change.

Wed, Jul 15, 1:50 AM

Tue, Jul 14

glebius closed D56706: tests/socket_afinet: make child_bind() return a full spectrum of results.

Committed 57cc01057bb21fec37fa4fb7416b4a1f29a211c0

Tue, Jul 14, 7:52 PM

Sun, Jul 12

glebius added a reviewer for D58189: mbuf: make m_unshare() allow unmapped mbufs: gallatin.
Sun, Jul 12, 4:54 PM
glebius accepted D58177: netinet6: use memcpy/memset/memcmp for consistency.

Thanks! Note that when doing such cleanups it is important to pay attention to the fact that bcopy(9) allows overlapping memory regions and memcpy(9) does not. In this particular patch everything looks fine.

Sun, Jul 12, 3:49 AM

Fri, Jul 10

glebius committed rGf0b8c514a18d: libalias: use htons() when converting from host to network (authored by Yusuke Ichiki <public@yusuke.pub>).
libalias: use htons() when converting from host to network
Fri, Jul 10, 6:14 PM
glebius committed rG3c8cc666a3d3: netinet6: Remove unused rip6_usrreqs declaration (authored by Yusuke Ichiki <public@yusuke.pub>).
netinet6: Remove unused rip6_usrreqs declaration
Fri, Jul 10, 5:50 PM
glebius accepted D57375: routing: Subscribe nhops to ifnet link events.
Fri, Jul 10, 5:41 PM

Thu, Jul 9

glebius added a comment to D58131: inpcb: take a pcbinfo database out from single lock.

I got naive microbenchmark. It allocates ncpu threads, and each threads creates n UDP sockets that are connect(2)-ed to a random valid address:port. In a test virtual machine with 8 CPUs and 10000 sockets per thread I got 6x-7x speedup. If the test is adjusted to close(2) sockets when 50% allocation is reached, so that both insertions and removals are exercised at the same time, the speedup is roughly the same. I didn't yet do any real tests on hardware, but benefits are clear.

Thu, Jul 9, 8:27 PM
glebius requested review of D58131: inpcb: take a pcbinfo database out from single lock.
Thu, Jul 9, 8:21 PM
glebius accepted D57389: routing: Replace unreachable nhops in nhgrp.

No objections left from me.

Thu, Jul 9, 6:01 PM
glebius added a comment to D57389: routing: Replace unreachable nhops in nhgrp.

Unfortunately, I can't test this or the other optimisations in a production environment. There are simply too many commits that would need to be cherry-picked manually, and not all of them can be cleanly MFC'd.
@pouria, I think it would be worthwhile to merge at least the most important of your improvements and fixes into stable/15. I don't know whether there would be consensus for that, and this is probably not the best place for such a discussion, but there is still plenty of time before the 15.2-RELEASE release. Having those changes in stable/15 would allow them to receive much broader testing in real-world deployments.

Thu, Jul 9, 6:00 PM
glebius added a comment to D57375: routing: Subscribe nhops to ifnet link events.

Let me suggest a better KPI for wlock iterator. Instead of adding a wrapper function, just add const bool wlock member to struct nhop_iter. In that case all you need is to set it true in the initializer. Use same function to start and stop the iterator.

Thu, Jul 9, 5:54 PM

Wed, Jul 8

glebius added a comment to D55887: tests: Remove inet6 jumbogram tests.

Didn't know about this one. Why didn't you push?

Wed, Jul 8, 7:31 PM
glebius updated the diff for D58114: tests/netinet6: remove test that uses Jumbo Payload Option.

+ ObsoleteFiles.inc

Wed, Jul 8, 5:48 PM
glebius requested review of D58114: tests/netinet6: remove test that uses Jumbo Payload Option.
Wed, Jul 8, 5:41 PM
glebius added a comment to D58096: netinet6: fix ND link-layer address option layout for IPoIB.

Can you please make the pad variables unsigned? (and while here the associated length variables as well)

Wed, Jul 8, 3:55 AM · network

Tue, Jul 7

glebius committed rG11bd6ade5dfd: linux: switch off interface name translation and schedule its removal (authored by glebius).
linux: switch off interface name translation and schedule its removal
Tue, Jul 7, 9:20 PM
glebius closed D57852: linux: switch off interface name translation and schedule its removal.
Tue, Jul 7, 9:20 PM
glebius committed rG6cfc526e7f91: acpi: fix instant panic in hest_attach() (authored by glebius).
acpi: fix instant panic in hest_attach()
Tue, Jul 7, 9:17 PM
glebius accepted D58021: pf: fix a crash on sendfile().
Tue, Jul 7, 4:57 PM
glebius accepted D58041: tests/sendfile_helper: support remote connection.
Tue, Jul 7, 4:56 PM
glebius accepted D58040: tests/sendfile: move the helper program to common.

Thanks!

Tue, Jul 7, 4:52 PM
glebius added a comment to D57986: inpcb: resort to wildcard hash lookup when checking for TCP port conflict.

I decided to put this change on hold for a while.

Tue, Jul 7, 4:46 PM
glebius added a comment to D56726: tcp: don't allocate inpcb port hash and relax bind(2) restrictions.

I decided to put this change on hold for a while.

Tue, Jul 7, 4:45 PM
glebius accepted D58035: sendfile: stop abusing kern_writev().
Tue, Jul 7, 4:43 PM
glebius requested review of D58088: tests/netinet/socket_afinet: add more tests to multibind.
Tue, Jul 7, 4:36 PM
glebius requested review of D58087: tests/netinet/socket_afinet: multibind second socket can be different.
Tue, Jul 7, 4:36 PM
glebius requested review of D58085: tests/netinet/socket_afinet: unroll multibind test into a table.
Tue, Jul 7, 4:36 PM
glebius committed rG1ea204b91909: inpcb: make net.inet.ip.portrange port number limiting sysctls unsigned (authored by glebius).
inpcb: make net.inet.ip.portrange port number limiting sysctls unsigned
Tue, Jul 7, 4:29 PM
glebius closed D57291: inpcb: make net.inet.ip.portrange port number limiting sysctls unsigned.
Tue, Jul 7, 4:29 PM
glebius committed rG3fdb1b6f10b3: netinet6: further refactor in6_pcbconnect() (authored by glebius).
netinet6: further refactor in6_pcbconnect()
Tue, Jul 7, 4:29 PM
glebius closed D57987: netinet6: further refactor in6_pcbconnect().
Tue, Jul 7, 4:28 PM

Mon, Jul 6

glebius abandoned D57961: inpcb: resort to wildcard hash lookup when checking for TCP port conflict.

Duplicate of D57986

Mon, Jul 6, 9:50 PM
glebius committed rGee5d87a3e2ca: raw ip: fix race of two connect(2) (authored by glebius).
raw ip: fix race of two connect(2)
Mon, Jul 6, 9:39 PM

Fri, Jul 3

glebius added inline comments to D56726: tcp: don't allocate inpcb port hash and relax bind(2) restrictions.
Fri, Jul 3, 11:16 PM
glebius accepted D58030: epoch: Fix epoch_drain_callbacks().
Fri, Jul 3, 10:00 PM
glebius accepted D58031: taskqueue: Avoid unbounded epoch read sections.

Yes, I was afraid of such problem when did this. Thanks for fixing!

Fri, Jul 3, 9:58 PM
glebius added a comment to D58021: pf: fix a crash on sendfile().

I understand the change to pf_route(), but I do not understand the change to pf_test(). Why the second one is required? pf(4) definitely can test (read IP/TCP level headers) of mbuf chains that have M_EXTPG later in paylod.

Fri, Jul 3, 7:30 PM
glebius added a reviewer for D58021: pf: fix a crash on sendfile(): gallatin.
Fri, Jul 3, 7:23 PM

Thu, Jul 2

glebius added inline comments to D57986: inpcb: resort to wildcard hash lookup when checking for TCP port conflict.
Thu, Jul 2, 3:44 PM
glebius added inline comments to D57986: inpcb: resort to wildcard hash lookup when checking for TCP port conflict.
Thu, Jul 2, 3:26 PM
glebius added a comment to D57988: tests: fix checksum computation.

I still can't understand :(

Thu, Jul 2, 3:24 PM

Wed, Jul 1

glebius accepted D57866: pf: revert netlink commands back to enum.
Wed, Jul 1, 2:44 PM
glebius accepted D57993: libsysdecode: Teach mktables to handle enums.

Thanks a lot! Didn't review the awk/sed code, since not an expert in it.

Wed, Jul 1, 2:43 PM
glebius added a comment to D57988: tests: fix checksum computation.

Cause we actually plan in the opposite direction: packets known to be valid (never went over a wire) shall not be checked.

Wed, Jul 1, 2:40 PM
glebius accepted D57988: tests: fix checksum computation.

Thanks! Stupid question: how did that happen that after Timo's change the loopback actually does check checksums?

Wed, Jul 1, 2:40 PM
glebius requested review of D57987: netinet6: further refactor in6_pcbconnect().
Wed, Jul 1, 5:54 AM
glebius requested review of D57986: inpcb: resort to wildcard hash lookup when checking for TCP port conflict.
Wed, Jul 1, 5:50 AM
glebius updated the diff for D56726: tcp: don't allocate inpcb port hash and relax bind(2) restrictions.
  • Add tunable to fallback to old behavior.
  • Adjust tests.
  • Document.
Wed, Jul 1, 5:50 AM
glebius committed rG07db0309378c: tests/socket_afinet: make multibind test more verbose on failure (authored by glebius).
tests/socket_afinet: make multibind test more verbose on failure
Wed, Jul 1, 5:49 AM
glebius committed rG51eb57406480: tests/netinet/socket_afinet: reduce tautology in test cases names (authored by glebius).
tests/netinet/socket_afinet: reduce tautology in test cases names
Wed, Jul 1, 5:49 AM
glebius committed rG0bc0b0c3f738: tests/socket_afinet: extend bind_connected_port_test to cover more cases (authored by glebius).
tests/socket_afinet: extend bind_connected_port_test to cover more cases
Wed, Jul 1, 5:49 AM
glebius committed rG57cc01057bb2: tests/socket_afinet: make child_bind() return a full spectre of results (authored by glebius).
tests/socket_afinet: make child_bind() return a full spectre of results
Wed, Jul 1, 5:49 AM
glebius closed D56727: tests/netinet/socket_afinet: reduce tautology in test cases names.
Wed, Jul 1, 5:49 AM
glebius closed D56707: tests/socket_afinet: extend bind_connected_port_test to cover more cases.
Wed, Jul 1, 5:49 AM
glebius committed rG6b75f8ff5e1b: inpcb: use correct mask in in6_pcblookup_lbgroup() (authored by glebius).
inpcb: use correct mask in in6_pcblookup_lbgroup()
Wed, Jul 1, 5:47 AM
glebius accepted D57967: unix: Fix a socket refcount leak in uipc_sendfile_wait().
Wed, Jul 1, 5:43 AM

Tue, Jun 30

glebius accepted D57915: libsysdecode: Fix shutdownhow table.
Tue, Jun 30, 11:57 PM
glebius abandoned D57865: libsysdecode: parse enums.
In D57865#1329350, @des wrote:

Most enums use names distinctive enough to handle with a regex just like we do for #defines. For the few cases where that doesn't work, we can use awk to limit the search to the lines between enum { and };. Give me a few days to come up with a poc, and please approve D57915 in the meantime.

EDIT: perhaps you forget that mktables doesn't need to know the value of each constant, it just needs the name.

Tue, Jun 30, 11:56 PM
glebius requested review of D57961: inpcb: resort to wildcard hash lookup when checking for TCP port conflict.
Tue, Jun 30, 2:08 AM

Mon, Jun 29

glebius committed rGbdd0c4d0a7fe: netinet6: cleanse safeguards against IFT_PFLOG (authored by glebius).
netinet6: cleanse safeguards against IFT_PFLOG
Mon, Jun 29, 8:21 PM
glebius committed rGf9a0147ee56e: protocols: remove IPPROTO_DIVERT (authored by glebius).
protocols: remove IPPROTO_DIVERT
Mon, Jun 29, 8:21 PM
glebius added a comment to D57865: libsysdecode: parse enums.

I don't want this library to dictate naming of enums all around. The whole idea of using text parser to parse C files is fragile. Clang delivers a proper solution. Hopefully gcc will catch up.

Mon, Jun 29, 12:39 AM

Sun, Jun 28

glebius requested changes to D57817: rack_bbr_common: uninitialized *ret_val in ctf_drop_checks().

Yes, patch as is doesn't improve anything. The comment above the function clearly marks the intent: the function checks if packet should be dropped and if so provides error code. It doesn't provide error code in case packet shouldn't be dropped.

Sun, Jun 28, 6:00 PM
glebius added a comment to D57915: libsysdecode: Fix shutdownhow table.

Can you please review my version instead? :) https://reviews.freebsd.org/D57865

Sun, Jun 28, 5:53 PM

Sat, Jun 27

glebius added inline comments to D57887: Fix some leaks in usr.sbin/bhyve/block_if.c.
Sat, Jun 27, 2:11 PM
glebius added a comment to D26755: Add hash table lookup for IPv6 raw sockets..

see ece716c5d34728a170f1dfe1b3389c267d6ddd1e

Sat, Jun 27, 6:06 AM
glebius added a reviewer for D26755: Add hash table lookup for IPv6 raw sockets.: glebius.
Sat, Jun 27, 5:37 AM
glebius added a comment to D26755: Add hash table lookup for IPv6 raw sockets..

Hi Neel,

Sat, Jun 27, 5:35 AM

Fri, Jun 26

glebius committed rG4d3cbeb7b407: ng_socket: plug node reference leak (authored by glebius).
ng_socket: plug node reference leak
Fri, Jun 26, 11:36 PM
glebius committed rG41bc52c89320: ng_socket: simplify protosw(9) methods (authored by glebius).
ng_socket: simplify protosw(9) methods
Fri, Jun 26, 11:36 PM
glebius accepted D57851: pflog: create bpf tapping points without ifnet(9).
Fri, Jun 26, 10:25 PM
glebius added inline comments to D57851: pflog: create bpf tapping points without ifnet(9).
Fri, Jun 26, 10:23 PM
glebius added inline comments to D57851: pflog: create bpf tapping points without ifnet(9).
Fri, Jun 26, 6:37 PM
glebius added inline comments to D57851: pflog: create bpf tapping points without ifnet(9).
Fri, Jun 26, 6:12 PM
glebius added a comment to D57851: pflog: create bpf tapping points without ifnet(9).
In D57851#1327098, @kp wrote:

Do you happen to know of a way to get an interface (struct ifnet) without AF_INET6? I used to use pflog0 for this, and now clearly can't any more. (The test for PR 288263 does that.)
Ideally I'd like to not remove the test, but without such an interface there's no point to it.

Fri, Jun 26, 6:04 PM
glebius updated the diff for D57865: libsysdecode: parse enums.
  • Pushed one to final version. Fixup.
Fri, Jun 26, 2:53 PM
glebius added a comment to D57851: pflog: create bpf tapping points without ifnet(9).

bpf_attach() uses M_WAITOK (that's why it doesn't fail). This lock should be sx(9). IMHO, it should be asserted both in call to pflog_create() and pflog_destroy(). The startup calls to pflog_create() should also acquire the lock, just for consistency.

Fri, Jun 26, 2:48 PM
glebius added a comment to D57866: pf: revert netlink commands back to enum.

Note that there is a parent revision!

Fri, Jun 26, 5:04 AM
glebius requested review of D57866: pf: revert netlink commands back to enum.
Fri, Jun 26, 5:03 AM