Page MenuHomeFreeBSD

melifaro (Alexander V. Chernikov)
User

Projects

User Details

User Since
May 27 2014, 9:32 AM (470 w, 2 d)

Recent Activity

Today

melifaro updated the summary of D40368: netlink: use netlink mbufs in the mbuf chains..
Thu, Jun 1, 8:15 AM
melifaro requested review of D40368: netlink: use netlink mbufs in the mbuf chains..
Thu, Jun 1, 8:14 AM
melifaro closed D40356: netlink: use custom uma zone for the mbuf storage.
Thu, Jun 1, 7:09 AM
melifaro committed rGd18715475071: netlink: use custom uma zone for the mbuf storage. (authored by melifaro).
netlink: use custom uma zone for the mbuf storage.
Thu, Jun 1, 7:09 AM

Yesterday

melifaro added a comment to D40348: netlink: retry mbuf allocation in different pool on failure.

I just experienced a similar scenario and complained to melifaro that netlink stopped working in that scenario. The ideal situation would be that netlink would just malloc memory, or use its own dedicated zone rather than mbufs.

Netlink by itself is opaque to underlying memory type (and uses plain malloc for linux app buffers / cases when the requested netlink message size is > 2k). I'd also prefer not to use mbufs at all, but that's the current way of interacting with socket buffers. To switch from that, one needs to implement routines like soreceive_generic, which is gigantic 500-line function. I'm looking into the alternative approaches, but for now let's try to get maximum from the current implementation

It is possible to provide an alternate allocator for mbufs. m_free() will invoke a custom destructor for M_EXT mbufs, so you can bypass the normal UMA zones used for network packets.

Ack. Thank you for the hint, I've created D40356, implementing this approach. It looks better than the current fix, so I'd prefer to land the new diff instead.

Wed, May 31, 6:05 PM
melifaro added reviewers for D40356: netlink: use custom uma zone for the mbuf storage: network, glebius, markj, adrian, gallatin.
Wed, May 31, 6:04 PM
melifaro requested review of D40356: netlink: use custom uma zone for the mbuf storage.
Wed, May 31, 6:03 PM
melifaro added a comment to D40348: netlink: retry mbuf allocation in different pool on failure.

I think having a separate dedicated allocator for netlink messages is the better call. Don't make your control plane reliant on your data plane's memory management.

Wed, May 31, 4:28 PM
melifaro added a comment to D40348: netlink: retry mbuf allocation in different pool on failure.

I just experienced a similar scenario and complained to melifaro that netlink stopped working in that scenario. The ideal situation would be that netlink would just malloc memory, or use its own dedicated zone rather than mbufs.

Netlink by itself is opaque to underlying memory type (and uses plain malloc for linux app buffers / cases when the requested netlink message size is > 2k). I'd also prefer not to use mbufs at all, but that's the current way of interacting with socket buffers. To switch from that, one needs to implement routines like soreceive_generic, which is gigantic 500-line function. I'm looking into the alternative approaches, but for now let's try to get maximum from the current implementation

Wed, May 31, 4:14 PM
melifaro added inline comments to D40102: pfsync: Transport over IPv6 Unicast support.
Wed, May 31, 2:58 PM
melifaro added reviewers for D40348: netlink: retry mbuf allocation in different pool on failure: network, gallatin, glebius.
Wed, May 31, 2:41 PM
melifaro requested review of D40348: netlink: retry mbuf allocation in different pool on failure.
Wed, May 31, 2:40 PM
melifaro committed rG4e9a97de01a5: netlink: fix ifconfig P2P inet ADDR ADDR netmask 255.255.255.255 addition (authored by melifaro).
netlink: fix ifconfig P2P inet ADDR ADDR netmask 255.255.255.255 addition
Wed, May 31, 10:39 AM

Tue, May 30

melifaro added a comment to D40256: netinet*: Fix redirects for connections from localhost.

No concerns from my side.

Tue, May 30, 12:32 PM
melifaro added inline comments to D40332: ifnet: consistently call hooks when the interface gets up..
Tue, May 30, 12:26 PM
melifaro added a comment to D40317: carp: add a 'SUPPRESS' state.

In other words: this patch cannot go in as-is (or at least not until the IFF_UP issues are addressed).

I ran into that when using netlink to configure interfaces. I guess we need to issue an eventhandler contification if some of interface flags were changed. I’ll take a look at that

I've raised D40332 to address lack of notifications to carp and the rest of the system.

Tue, May 30, 12:18 PM
melifaro added reviewers for D40332: ifnet: consistently call hooks when the interface gets up.: network, kp.
Tue, May 30, 12:17 PM
melifaro requested review of D40332: ifnet: consistently call hooks when the interface gets up..
Tue, May 30, 12:16 PM
melifaro retitled D40331: netlink: dump interface capabilities with other interface data from netlink: add support for getting ifcaps to netlink: dump interface capabilities with other interface data.
Tue, May 30, 10:58 AM
melifaro requested review of D40331: netlink: dump interface capabilities with other interface data.
Tue, May 30, 10:47 AM
melifaro added inline comments to D40330: genl: add new command to list genetlink(4).
Tue, May 30, 10:30 AM
melifaro accepted D40330: genl: add new command to list genetlink(4).

Wow, that's nice!
LGTM, though I'd suggest trying to add structured output from day one. I managed to convert ndp(8) ( D35677 ), so if you could consider looking into that option, that would be awesome!

Tue, May 30, 10:25 AM

Mon, May 29

melifaro added a comment to D40317: carp: add a 'SUPPRESS' state.
In D40317#917957, @kp wrote:

There's a rather annoying bug left in this. If we add a carp address on an interface that's down (i.e. IFF_UP is not set) the interface will come up during this, but remain in SUPPRESS state.

That's because the SIOCSIFADDR ioctl is passed to ether_ioctl(), which sets IFF_UP in ifp->if_flags directly, without any event handling. Ordinarily we'd call if_up(), which gives carp a chance to react to the interface coming up. That's not the case here, so it stays in SUPPRESS.

Initial attempts to fix this, by replacing ifp->if_flags |= IFF_UP in ether_ioctl() with if_up(ifp) resulted in ifconfig: ioctl (SIOCAIFADDR): File exists when trying to set an address on the interface. There's clearly an order of operations problem around this, but I don't fully understand it.

In other words: this patch cannot go in as-is (or at least not until the IFF_UP issues are addressed).

I ran into that when using netlink to configure interfaces. I guess we need to issue an eventhandler contification if some of interface flags were changed. I’ll take a look at that

Mon, May 29, 3:58 PM

Sat, May 27

melifaro updated the summary of D40303: ifconfig: fix warnings #2.
Sat, May 27, 2:12 PM
melifaro requested review of D40303: ifconfig: fix warnings #2.
Sat, May 27, 2:12 PM
melifaro committed rGc90901245e9c: netlink: update rta_multipath conditions in arp/ndp after 656a39c1a062 (authored by melifaro).
netlink: update rta_multipath conditions in arp/ndp after 656a39c1a062
Sat, May 27, 1:27 PM
melifaro updated the summary of D40301: ifconfig: fix comparison in printmimo().
Sat, May 27, 12:43 PM
melifaro requested review of D40301: ifconfig: fix comparison in printmimo().
Sat, May 27, 12:40 PM
melifaro committed rG30376771fc79: netlink: fix build (authored by melifaro).
netlink: fix build
Sat, May 27, 12:30 PM
melifaro committed rG7ee6b0f125a0: netlink: add snl(3) support for listing genetlink multicast groups (authored by melifaro).
netlink: add snl(3) support for listing genetlink multicast groups
Sat, May 27, 11:15 AM
melifaro committed rG656a39c1a062: netlink: use newly-added snl(3) array parsing for handling multipath (authored by melifaro).
netlink: use newly-added snl(3) array parsing for handling multipath
Sat, May 27, 11:15 AM
melifaro committed rG5f19f790b392: netlink: add snl(3) support for parsing unknown-size arrays (authored by melifaro).
netlink: add snl(3) support for parsing unknown-size arrays
Sat, May 27, 11:14 AM
melifaro closed D40282: netlink: add support for parsing arrays of objects.
Sat, May 27, 11:14 AM
melifaro committed rG99ea21744b9f: netlink: fix bulding with NOINET6 (authored by melifaro).
netlink: fix bulding with NOINET6
Sat, May 27, 10:47 AM
melifaro committed rGdfc15e761b84: netlink: call IPv6 hook after the ifaddr operation when ifp is brought (authored by melifaro).
netlink: call IPv6 hook after the ifaddr operation when ifp is brought
Sat, May 27, 10:45 AM

Fri, May 26

melifaro resigned from D40236: Fix NULL deref in ip_output during route change.

I'm afraid I won't be able to review this in the foreseeable future. I think I completely forgot pre-nexthop routing logic.

Fri, May 26, 3:04 PM
melifaro added a comment to D39865: cxgbe: use new cloners KPI..

Ping :-)
I'd love to get rid of if_clone_advanced() before 14 and cxgbe is the only remaining user :-)

Fri, May 26, 2:44 PM
melifaro added a comment to D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..

I would like to try to have another iteration of the discussion :-)

Fri, May 26, 2:08 PM
melifaro accepted D40256: netinet*: Fix redirects for connections from localhost.
Fri, May 26, 1:59 PM
melifaro added reviewers for D40282: netlink: add support for parsing arrays of objects: network, bapt.
Fri, May 26, 1:02 PM
melifaro requested review of D40282: netlink: add support for parsing arrays of objects.
Fri, May 26, 1:01 PM

Thu, May 25

melifaro committed rG6d204407ec6e: ifconfig: fix ifconfig IFX inet[6] ADDR -alias (authored by melifaro).
ifconfig: fix ifconfig IFX inet[6] ADDR -alias
Thu, May 25, 3:04 PM
melifaro added a comment to D40256: netinet*: Fix redirects for connections from localhost.

Also: I guess, there should be another change that enables use of this hook in pf?

Thu, May 25, 1:00 PM
melifaro accepted D40256: netinet*: Fix redirects for connections from localhost.

LGTM!
I'd be nice to add the new hook to pfil(9) for consistency.

Thu, May 25, 12:59 PM
melifaro committed rG4bf44dd73bc0: ifconfig: switch IPv4/IPv6 address manipulations to Netlink. (authored by melifaro).
ifconfig: switch IPv4/IPv6 address manipulations to Netlink.
Thu, May 25, 12:23 PM
melifaro added inline comments to D35755: netinet6: make IPv6 fragment TTL per-VNET configurable..
Thu, May 25, 8:57 AM
melifaro updated the diff for D35755: netinet6: make IPv6 fragment TTL per-VNET configurable..

Update to latest HEAD & address comments

Thu, May 25, 8:55 AM

Wed, May 24

melifaro added a comment to D40259: pfctl: Add missing state parameters in DIOCGETSTATESV2.

Not insisting, but maybe it's a good time to look at D38888 once again? :-)

Wed, May 24, 9:13 PM
melifaro added inline comments to D40256: netinet*: Fix redirects for connections from localhost.
Wed, May 24, 4:23 PM
melifaro added inline comments to D40256: netinet*: Fix redirects for connections from localhost.
Wed, May 24, 3:43 PM
melifaro added a reviewer for D40256: netinet*: Fix redirects for connections from localhost: glebius.
Wed, May 24, 3:42 PM
melifaro added reviewers for D40256: netinet*: Fix redirects for connections from localhost: network, ae.
Wed, May 24, 3:37 PM
melifaro committed rG12cfa3c1bd56: ifconfig: fix interface address ordering with Netlink. (authored by melifaro).
ifconfig: fix interface address ordering with Netlink.
Wed, May 24, 3:35 PM
melifaro committed rG6e3a9d7f2c8d: ifconfig: introduce `ifconfig_context` to store current global state. (authored by melifaro).
ifconfig: introduce `ifconfig_context` to store current global state.
Wed, May 24, 10:41 AM
melifaro committed rG44cd85d42e5d: ifconfig: cleanup warnings #1 (authored by melifaro).
ifconfig: cleanup warnings #1
Wed, May 24, 10:41 AM
melifaro closed D40239: ifconfig: introduce `ifconfig_context` to store current global state..
Wed, May 24, 10:41 AM
melifaro closed D40238: ifconfig: cleanup warnings #1.
Wed, May 24, 10:40 AM

Tue, May 23

melifaro updated the test plan for D40239: ifconfig: introduce `ifconfig_context` to store current global state..
Tue, May 23, 7:46 PM
melifaro added inline comments to D40239: ifconfig: introduce `ifconfig_context` to store current global state..
Tue, May 23, 7:42 PM
melifaro updated the diff for D40239: ifconfig: introduce `ifconfig_context` to store current global state..

Address comments.

Tue, May 23, 7:41 PM
melifaro accepted D40213: Teach ifconfig to attach and run itself in a jail..
Tue, May 23, 7:34 PM
melifaro added reviewers for D40239: ifconfig: introduce `ifconfig_context` to store current global state.: network, kp, bz.
Tue, May 23, 5:10 PM
melifaro updated the summary of D40238: ifconfig: cleanup warnings #1.
Tue, May 23, 5:09 PM
melifaro requested review of D40239: ifconfig: introduce `ifconfig_context` to store current global state..
Tue, May 23, 5:07 PM
melifaro requested review of D40238: ifconfig: cleanup warnings #1.
Tue, May 23, 5:06 PM

Mon, May 22

melifaro added a comment to D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..
In D40183#915476, @jhb wrote:

I feel like the worst offenders are really when you have to #ifdef for both for LINT-NOIP. Another tact we might consider is just axeing LINT-NOIP. I can see some value in LINT-NOINET so an INET6-only kernel remains clean, but I see less value in LINT-NOIP and I feel like more of the cost is for that config.

Typically, yes, it's the worst. However, unused functions also play a notable role. Re LINT-NOIP - I ran into some folks doing builds for embedded systems & complaining when it's broken.

I think rather than using evil greps in the build glue, I'd rather just add explicit lines to LINT-NO* that adjust the warnings FWIW if we want to consider doing this.

Thank you for the feedback!
There are tons of these greps in the kern.pre.mk so I assumed that's known acceptable evil :-) I don't have any opinion about the implementation.
I started with the explicit lines in LINT*, actually, but ran into a problem with extending CONF_CFLAGS. I'll retry tomorrow and publish the updated diff if I get it working.

The problem with the explicit lines in LINT that I see is that the actual folks who use noinet(6) combinations don’t use LINT configs. So, by doing changes on the LINT level we’ll remove useless reporting on the ci side. The actual users will still have to change their configs..
Thoughts?

Mon, May 22, 9:50 PM
melifaro added a comment to D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..
In D40183#915476, @jhb wrote:

I feel like the worst offenders are really when you have to #ifdef for both for LINT-NOIP. Another tact we might consider is just axeing LINT-NOIP. I can see some value in LINT-NOINET so an INET6-only kernel remains clean, but I see less value in LINT-NOIP and I feel like more of the cost is for that config.

Typically, yes, it's the worst. However, unused functions also play a notable role. Re LINT-NOIP - I ran into some folks doing builds for embedded systems & complaining when it's broken.

I think rather than using evil greps in the build glue, I'd rather just add explicit lines to LINT-NO* that adjust the warnings FWIW if we want to consider doing this.

Thank you for the feedback!
There are tons of these greps in the kern.pre.mk so I assumed that's known acceptable evil :-) I don't have any opinion about the implementation.
I started with the explicit lines in LINT*, actually, but ran into a problem with extending CONF_CFLAGS. I'll retry tomorrow and publish the updated diff if I get it working.

Mon, May 22, 9:00 PM
melifaro added a reverting change for rG5b8ce85e1a72: ifconfig: Fix the build: rG454d72ec4098: Revert "ifconfig: Fix the build".
Mon, May 22, 3:20 PM
melifaro added a reverting change for rG54418f79fd29: ifconfig: switch IPv4/IPv6 address manipulations to Netlink: rG26056fa8d348: Revert "ifconfig: switch IPv4/IPv6 address manipulations to Netlink".
Mon, May 22, 3:19 PM
melifaro committed rG26056fa8d348: Revert "ifconfig: switch IPv4/IPv6 address manipulations to Netlink" (authored by melifaro).
Revert "ifconfig: switch IPv4/IPv6 address manipulations to Netlink"
Mon, May 22, 3:19 PM
melifaro committed rG454d72ec4098: Revert "ifconfig: Fix the build" (authored by melifaro).
Revert "ifconfig: Fix the build"
Mon, May 22, 3:19 PM
melifaro added a reverting change for D40182: ifconfig: switch IPv4/IPv6 address manipulations to Netlink: rG26056fa8d348: Revert "ifconfig: switch IPv4/IPv6 address manipulations to Netlink".
Mon, May 22, 3:19 PM
melifaro added a comment to D40207: ifconfig(8): Fix prototype for warn_nomask().
In D40207#915290, @otis wrote:
In D40207#915288, @otis wrote:

It's not OK, because the build was fixed, although:

root@b14:~ # ifconfig vtnet0 inet 100.64.0.14/24
Bus error (core dumped)

I'll investigate whether this is only my problem (although this box is pretty vanilla -CURRENT).

Hm. is this amd64?

Yes, amd64, clean build from today's afternoon (CEST).

Any chance you're in IRC/slack/any other IM and can debug with me?
If not, I'll disable Netlink switch and we'll figure it out offline.
For me, ifconfig works and passes all tests.

Mon, May 22, 2:55 PM
melifaro added a comment to D40207: ifconfig(8): Fix prototype for warn_nomask().
In D40207#915288, @otis wrote:

It's not OK, because the build was fixed, although:

root@b14:~ # ifconfig vtnet0 inet 100.64.0.14/24
Bus error (core dumped)

I'll investigate whether this is only my problem (although this box is pretty vanilla -CURRENT).

Mon, May 22, 2:49 PM
melifaro accepted D40207: ifconfig(8): Fix prototype for warn_nomask().

Whoops. How did I miss that?

Mon, May 22, 2:43 PM
melifaro committed rG54418f79fd29: ifconfig: switch IPv4/IPv6 address manipulations to Netlink (authored by melifaro).
ifconfig: switch IPv4/IPv6 address manipulations to Netlink
Mon, May 22, 1:47 PM
melifaro closed D40182: ifconfig: switch IPv4/IPv6 address manipulations to Netlink.
Mon, May 22, 1:47 PM
melifaro committed rG050815ae7f9d: netlink: call IPv6 hook when adding IPv4 addresses. (authored by melifaro).
netlink: call IPv6 hook when adding IPv4 addresses.
Mon, May 22, 1:45 PM

Sun, May 21

melifaro committed rG63ad5ce7335b: ifconfig: simplify ifconfig() by factoring out ifa add/del logic (authored by melifaro).
ifconfig: simplify ifconfig() by factoring out ifa add/del logic
Sun, May 21, 9:43 AM
melifaro closed D40180: ifconfig: simplify ifconfig() by factoring out ifa add/del logic.
Sun, May 21, 9:43 AM
melifaro committed rG197bff385e2c: ifconfig: split argument parsing (authored by melifaro).
ifconfig: split argument parsing
Sun, May 21, 9:43 AM
melifaro closed D40179: ifconfig: split argument parsing.
Sun, May 21, 9:43 AM
melifaro added inline comments to D40180: ifconfig: simplify ifconfig() by factoring out ifa add/del logic.
Sun, May 21, 9:42 AM

Sat, May 20

melifaro added a comment to D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..

Good example happening right now - ac6dd012590e01f6a5fef490d52ffb4a6ca97798 and c98146ae229cc60834bfbecc229f2f7725e458d0 wouldn't be required with this change in place.

Sat, May 20, 6:35 PM
melifaro added a reviewer for D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel.: jhb.
Sat, May 20, 6:33 PM
melifaro added a comment to D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..
In D40183#914803, @imp wrote:

I'm not sure I like this... I'm not a fan of disabling warnings since it could hide other issues that creep in...

I don't like disabling warning either - they help maintain the code at better shape. Here we don't disable warnings for GENERIC (and any other config which has INET and INET6 compiled) so we should get all benefits provided by the current set of warnings.
Not failing on unused-variable, unused-but-set-variable and unused-function happens only for the NOINET[6]/NOIP code (otherwise it'll be caught in GENERIC). I don't see any issues that could come from having these 3 flags enabled. Maybe I'm missing something - so happy to discuss the concerning examples & address them.

Sat, May 20, 4:19 PM
melifaro updated the diff for D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..

Cleanup.

Sat, May 20, 4:12 PM
melifaro updated the summary of D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..
Sat, May 20, 2:56 PM
melifaro requested review of D40183: build: Reduce the cost of supporting NO<INET|INET6|IP>* variants of the kernel..
Sat, May 20, 2:54 PM
melifaro added a reviewer for D40182: ifconfig: switch IPv4/IPv6 address manipulations to Netlink: network.
Sat, May 20, 11:54 AM
melifaro requested review of D40182: ifconfig: switch IPv4/IPv6 address manipulations to Netlink.
Sat, May 20, 11:53 AM
melifaro updated the summary of D40180: ifconfig: simplify ifconfig() by factoring out ifa add/del logic.
Sat, May 20, 11:24 AM
melifaro requested review of D40180: ifconfig: simplify ifconfig() by factoring out ifa add/del logic.
Sat, May 20, 11:23 AM
melifaro updated the summary of D40179: ifconfig: split argument parsing.
Sat, May 20, 11:19 AM
melifaro requested review of D40179: ifconfig: split argument parsing.
Sat, May 20, 11:17 AM
melifaro committed rG7eee0eaf1602: netlink: automatically generate broadcast for IPv4 ifa if not set. (authored by melifaro).
netlink: automatically generate broadcast for IPv4 ifa if not set.
Sat, May 20, 10:43 AM
melifaro committed rGa72b78905a3d: ifconfig: simplify carp vhid setup. (authored by melifaro).
ifconfig: simplify carp vhid setup.
Sat, May 20, 9:50 AM
melifaro closed D40160: ifconfig: simplify carp vhid setup..
Sat, May 20, 9:50 AM

Fri, May 19

melifaro updated the summary of D40160: ifconfig: simplify carp vhid setup..
Fri, May 19, 10:23 AM
melifaro requested review of D40160: ifconfig: simplify carp vhid setup..
Fri, May 19, 10:23 AM