Page MenuHomeFreeBSD

melifaro (Alexander V. Chernikov)
User

Projects

User Details

User Since
May 27 2014, 9:32 AM (233 w, 1 d)

Recent Activity

Aug 24 2018

melifaro added inline comments to D16887: Unbreak VLANs after r337943..
Aug 24 2018, 8:09 PM

Jul 7 2018

melifaro requested changes to D14802: fix malloc length in ip6_output.c:GET_PKTOPT_VAR.

Hi Jason,

Jul 7 2018, 2:36 PM

Jul 3 2018

melifaro added a comment to D14802: fix malloc length in ip6_output.c:GET_PKTOPT_VAR.

I was thinking of having something like the below one as a macro, moving the rest to the actual function.

Jul 3 2018, 6:49 PM

Jun 14 2018

melifaro accepted D15789: Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9).
Jun 14 2018, 10:12 PM

May 19 2018

melifaro added inline comments to D15488: If reading the routing table fails, retry up to 10 times.
May 19 2018, 4:36 PM

May 13 2018

melifaro added a reviewer for D15404: Add and use new RTF_CONNECTED flag to mark connected routes: network.
May 13 2018, 9:33 AM

May 9 2018

melifaro requested changes to D15355: lagg: Remove redundant rmlock.

Would you mind describe the proposed locking model somewhere in the file explicitly?
In particular, 1) what does _XLOCK or _SLOCK locks protect? 2) How does the sc_slowpath work? 3) What is "right" lock order?
It would be beneficial to describe some examples of problematic potential LORs as well.

May 9 2018, 7:48 PM

Apr 19 2018

melifaro accepted D15083: Use pointer to fake bpf_if structure after bpfdetach().
Apr 19 2018, 9:45 PM

Apr 8 2018

melifaro added a comment to D14802: fix malloc length in ip6_output.c:GET_PKTOPT_VAR.

@melifaro I'm thinking about how to make GET_PKTOPT_VAR a function or perhaps... how to make it much smaller and call a function for the bulk of the logic.

That would be great. The current looks a bit hard to grasp.

Apr 8 2018, 1:13 PM

Apr 5 2018

melifaro accepted D3567: ignore ICMP need frag with equal or larger MTU offer.
Apr 5 2018, 10:34 PM

Apr 1 2018

melifaro created P161 ng_bpf testing.
Apr 1 2018, 4:00 PM

Mar 31 2018

melifaro retitled D14920: Fix locking for the bpf TX path from Fix locking for the bpf TX path. The fix consistes of splitting bpfwrite() into smaller chunks, reordered to optimize locking access. Additionally, per-descriptor BPF lock was converted to rwlock. to Fix locking for the bpf TX path.
Mar 31 2018, 11:39 PM
melifaro created D14920: Fix locking for the bpf TX path.
Mar 31 2018, 8:28 PM
melifaro closed D9676: Fix memory leaks in route.
Mar 31 2018, 3:06 PM
melifaro committed rS331844: Fix memory leaks in route(8)..
Fix memory leaks in route(8).
Mar 31 2018, 3:06 PM
melifaro accepted D9676: Fix memory leaks in route.
Mar 31 2018, 3:03 PM
melifaro accepted D10318: Remove redundant checks of rtm_type in route_output().
Mar 31 2018, 2:56 PM

Mar 30 2018

melifaro accepted D14904: Remove a comment that suggests checking a non-pointer is non-NULL..
Mar 30 2018, 8:02 AM

Mar 25 2018

melifaro committed rS331530: Branch for bringing proper multipath to the networking stack..
Branch for bringing proper multipath to the networking stack.
Mar 25 2018, 9:16 AM

Mar 22 2018

melifaro added inline comments to D14619: refactor ip6_getpcbopt() for better locking and memory management.
Mar 22 2018, 11:58 PM
melifaro added inline comments to D14621: Fix a potential use after free in getsockopt() access to inp_options.
Mar 22 2018, 11:52 PM

Mar 20 2018

melifaro committed rS331275: Use count(9) api for the bpf(4) statistics..
Use count(9) api for the bpf(4) statistics.
Mar 20 2018, 10:57 PM
melifaro closed D14726: Convert bpf(9) counters to counter(9)..
Mar 20 2018, 10:57 PM

Mar 19 2018

melifaro added inline comments to D14621: Fix a potential use after free in getsockopt() access to inp_options.
Mar 19 2018, 12:11 PM

Mar 18 2018

melifaro accepted D14702: Allow to specify PCP on packets not belonging to any VLAN..

Thank you!

Mar 18 2018, 10:17 PM
melifaro added a comment to D14702: Allow to specify PCP on packets not belonging to any VLAN..
In D14702#309683, @kib wrote:
In D14702#309602, @kib wrote:

The feature is disabled by default, so I do not see it as critical or even important that some stuff would break when vid 0 encapsulation is enabled. The feature is added for the cases where it works.

That's the topic we see differently. The functionality indeed is not used by default, however the actual code complicates ether_output().

Indeed, it complicates the function because it adds the new feature.

Furthermore, I'm afraid that after someone actually tries to use this, the code will get more complicated. I'd really appreciate if you could change the ether_output() part to call the (inlined) function doing all of the business logic for handling pcp.

Can you explain more explicitly what do you want to change ? The only interpretation for your words which I was able to construct is that you want ether_8021q_frame() to become inlined in ether_output_frame(). Is it correct ?
If yes, I do not see much sense in it, because ether_8021q_frame() is only called for non-default path, and it really makes sense to keep ether_output_frame() short to not pollute icache.

No, not exactly.

Mar 18 2018, 7:53 PM
melifaro added a comment to D14702: Allow to specify PCP on packets not belonging to any VLAN..
In D14702#309602, @kib wrote:

Several questions.

  1. What was the driver of implementing interface-level pcp settings? For example, currently pcp can be set on per-mbuf basis for the "real" vlans, which can give more granular control on the outgoing traffic.

This is supported in the patch as well. If the scheduled mbuf has 8021Q tag attached, the pcp value from the tag is inserted into the VLAN frame tag.
If you look at the code, you will see that I extracted the fragment from vlan_trasnmit() to reuse in both places.

Ah, my bad. I haven't noticed the 8021q tag override part. In that case it's more like setting default pcp.

Personally it is a bit hard for me to see the benefits of having the same pcp applied to all packets from the host.
Typically this kind of configuration can be easily configured on the access switch and host is supposed to be able to do more fine-granular control.

I think that this is complimentary, and one method of manipulating pcp does not exclude the validity, and apparent usefulness, of another.
The patch was written because there are users who need this feature (I cannot say more).

What comes into my mind is having something like dscp-to-pcp map, which allows user to benefit from all existing dscp manipulation framework.
What do you think?

Perhaps yes, but this is out of scope of the change. If pcp is already assigned, it will be honored. The assignment should be managed by the layer above the place where the framing and transmit are performed.

  1. Have you performed interop testing for the non-routable protocols like lldp, stp, lacp, etc? Having seen some issues related to the routers/switches control plane forgetting to remove similar "dummy" headers, I'd recommend to perform validation with multiple vendors before committing this.

No, no interop testing was done. As an anecdote, I can say that my home switch filters the vid 0 packets outright. More, Mellanox driver has the flow table programmed to drop such packets as well, right now (the fix is already worked out).

The feature is disabled by default, so I do not see it as critical or even important that some stuff would break when vid 0 encapsulation is enabled. The feature is added for the cases where it works.

That's the topic we see differently. The functionality indeed is not used by default, however the actual code complicates ether_output(). Furthermore, I'm afraid that after someone actually tries to use this, the code will get more complicated. I'd really appreciate if you could change the ether_output() part to call the (inlined) function doing all of the business logic for handling pcp.

Mar 18 2018, 6:06 PM
melifaro added a comment to D14702: Allow to specify PCP on packets not belonging to any VLAN..

Several questions.

Mar 18 2018, 3:03 PM

Mar 17 2018

melifaro created D14726: Convert bpf(9) counters to counter(9)..
Mar 17 2018, 11:35 PM
melifaro committed rS331098: Fix outgoing TCP/UDP packet drop on arp/ndp entry expiration..
Fix outgoing TCP/UDP packet drop on arp/ndp entry expiration.
Mar 17 2018, 5:06 PM

Feb 15 2018

melifaro requested changes to D14385: Wrap a vlan's parent's if_output in a separate function..

The issue which this change is trying to solve is control plane issue. Dealing with it in the data path code seem to be a wrong approach. Additionally, it imposes significant performance penalties.
The better way of doing this is to have a "solver" function which is able to handle such cases. Calls to this function can be triggered by ifnet/lagg change events subscription.

Feb 15 2018, 6:33 PM

Feb 9 2018

melifaro accepted D14257: Update the MTU in affected routes when IPv6 RA changes the MTU.

I would like to commit this change and leave improvements in rt_updatemtu() for another day.

Sure, it's totally not the scope of this CR.

Feb 9 2018, 5:34 PM
melifaro added a comment to D14257: Update the MTU in affected routes when IPv6 RA changes the MTU.
In D14257#299355, @ae wrote:

Invoking of rt_updatemtu() looks right to me. But I don't like how rt_updatemtu() works.
Recently we found that in6_mtutimo() on systems with many IPv6 routes produces noticeable delay for packets processing.
It holds RIB_WLOCK while all routes are processed, and thus normal packets processing is blocked on RIB_RLOCK for this time.

There are other rt_foreach_fib() users as well. Probably we can change iteration logic the following way:

retry = 1
while (retry && retry_count < N) {
retry = 0
RADIX_RLOCK
generation = rnh_gen
foreach_route()
  if_match()
    if linked_list_add(route)
      refcount(route)
    else
     retry++; // allocation failure, retry
RADIX_RUNLOCK
Feb 9 2018, 10:28 AM

Feb 7 2018

melifaro accepted D14254: ICMPv6: fix redirects containing global addresses.
Feb 7 2018, 11:03 PM

Dec 1 2017

melifaro accepted D13286: ifconfig(8): Display extended compliance code for SFP transceivers.
Dec 1 2017, 7:11 AM

Mar 3 2017

melifaro accepted D9873: Fix ipfw tables related PR 217262 and 217292.
Mar 3 2017, 7:14 PM

Jan 26 2017

melifaro committed rP432479: Apply sysdep-bsd-sysio.h patch by default..
Apply sysdep-bsd-sysio.h patch by default.
Jan 26 2017, 10:04 AM

Jan 22 2017

melifaro committed rP432152: Update to 1.6.3..
Update to 1.6.3.
Jan 22 2017, 3:22 PM

Aug 30 2016

melifaro added a comment to D7695: Add GARP retransmit capability.

Could you please explain why this should be done in kernel?

Aug 30 2016, 10:12 AM

Aug 14 2016

melifaro committed rP420204: Finally, bump net/bird revision to account patches added in r420203..
Finally, bump net/bird revision to account patches added in r420203.
Aug 14 2016, 11:31 PM
melifaro committed rP420203: Fix net/bird r420176 update: really add bugfixes from git..
Fix net/bird r420176 update: really add bugfixes from git.
Aug 14 2016, 11:08 PM
melifaro committed rP420176: Update net/bird,net/bird6 to 1.6.0.
Update net/bird,net/bird6 to 1.6.0
Aug 14 2016, 6:25 AM

Jun 5 2016

melifaro committed rS301440: Fix 4-byte overflow in ipv6_writemask..
Fix 4-byte overflow in ipv6_writemask.
Jun 5 2016, 10:34 AM

Feb 10 2016

melifaro accepted D5240: sfxge: implement SIOCGI2C to read infromation from phy modules.

Great news, thanks for implementing that!

Feb 10 2016, 12:10 PM

Feb 2 2016

melifaro added a comment to D5163: MFC r272514 Switch ipfw to use rmlock for runtime locking..

Please take a look on -HEAD ipfw version.
Along with some architectural changes, there are several performance oriented ones: rmlock for fast path, per-cpu rule counters, more compact rule structure and faster tables.
It could be merged to 10 (in fact, we even run in on 9/ in several places)

Feb 2 2016, 5:10 AM

Jan 26 2016

melifaro requested changes to D1986: Teach lagg(4) to change MTU.

Sorry for taking that long.

Jan 26 2016, 7:04 AM

Jan 25 2016

melifaro committed rS294712: Convert TCP mtu checks to the new routing KPI..
Convert TCP mtu checks to the new routing KPI.
Jan 25 2016, 10:07 AM
melifaro committed rS294710: Fix flowtable part missed in r294706..
Fix flowtable part missed in r294706.
Jan 25 2016, 9:31 AM
melifaro committed rS294706: MFP r287070,r287073: split radix implementation and route table structure..
MFP r287070,r287073: split radix implementation and route table structure.
Jan 25 2016, 6:33 AM
melifaro committed rS294704: Remove unused radix_mpath definitions..
Remove unused radix_mpath definitions.
Jan 25 2016, 5:28 AM

Jan 21 2016

melifaro added a reviewer for D4962: Pass addresses instead of sockaddr for lltable lookup. Introduce new light-weight versions of lookup functions.: network.
Jan 21 2016, 11:42 PM
melifaro added a reviewer for D5009: Convert fastworwarding output path to the new routing KPI.: network.
Jan 21 2016, 11:42 PM
melifaro added a reviewer for D5010: Convert IPv6 forwarding to the new routing KPI.: network.
Jan 21 2016, 11:42 PM
melifaro committed rS294525: Fix panic on table/table entry delete. The panic could have happened.
Fix panic on table/table entry delete. The panic could have happened
Jan 21 2016, 6:21 PM
melifaro retitled D5010: Convert IPv6 forwarding to the new routing KPI. from to Convert IPv6 forwarding to the new routing KPI..
Jan 21 2016, 8:12 AM
melifaro retitled D5009: Convert fastworwarding output path to the new routing KPI. from to Convert fastworwarding output path to the new routing KPI..
Jan 21 2016, 8:09 AM

Jan 20 2016

melifaro committed rS294411: Fix rte refcount leak in ip6_forward()..
Fix rte refcount leak in ip6_forward().
Jan 20 2016, 11:25 AM

Jan 19 2016

melifaro added a comment to D1986: Teach lagg(4) to change MTU.

Sorry for the delay. Will try to review today/tomorrow.

Jan 19 2016, 11:22 AM

Jan 17 2016

melifaro retitled D4962: Pass addresses instead of sockaddr for lltable lookup. Introduce new light-weight versions of lookup functions. from to Pass addresses instead of sockaddr for lltable lookup. Introduce new light-weight versions of lookup functions..
Jan 17 2016, 8:20 AM
melifaro committed rS294203: MFC r288297 (userland part)..
MFC r288297 (userland part).
Jan 17 2016, 6:03 AM
melifaro committed rS294202: MFC r292831: Add SFF-8024 Extended Specification Compliance..
MFC r292831: Add SFF-8024 Extended Specification Compliance.
Jan 17 2016, 5:38 AM

Jan 16 2016

melifaro added a comment to D1986: Teach lagg(4) to change MTU.

Please allow me one more day to review the changes.

Jan 16 2016, 7:16 AM

Jan 15 2016

melifaro committed rS294089: Clean up original route path selection logic a bit..
Clean up original route path selection logic a bit.
Jan 15 2016, 1:47 PM
melifaro committed rS294084: Make nfscl_getmyip() use new routing KPI..
Make nfscl_getmyip() use new routing KPI.
Jan 15 2016, 9:05 AM

Jan 14 2016

melifaro committed rS294020: Fix panic in IP redirect. Panic was introduced in r293466..
Fix panic in IP redirect. Panic was introduced in r293466.
Jan 14 2016, 4:31 PM
melifaro committed rS293914: Make ng_netflow(9) use new routing KPI..
Make ng_netflow(9) use new routing KPI.
Jan 14 2016, 1:14 PM
melifaro committed rS293886: Remove now-unused wrappers for various routing functions..
Remove now-unused wrappers for various routing functions.
Jan 14 2016, 8:55 AM

Jan 13 2016

melifaro committed rS293829: Remove RTF_RNH_LOCKED support from rtalloc1_fib()..
Remove RTF_RNH_LOCKED support from rtalloc1_fib().
Jan 13 2016, 2:33 PM

Jan 11 2016

melifaro committed rS293657: Bring RADIX_MPATH support to new routing KPI to ease migration..
Bring RADIX_MPATH support to new routing KPI to ease migration.
Jan 11 2016, 8:45 AM
melifaro committed rS293656: Do not rewrite all ro_flags..
Do not rewrite all ro_flags.
Jan 11 2016, 8:00 AM

Jan 10 2016

melifaro committed rS293633: Split in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket()..
Split in6_selectsrc() into in6_selectsrc_addr() and in6_selectsrc_socket().
Jan 10 2016, 1:41 PM
melifaro committed rS293632: Do not hold ifaddr reference for the whole icmp6_reflect() exec time..
Do not hold ifaddr reference for the whole icmp6_reflect() exec time.
Jan 10 2016, 12:00 PM
melifaro committed rS293630: Initialize error value ta_lookup_kfib() by default to please compiler..
Initialize error value ta_lookup_kfib() by default to please compiler.
Jan 10 2016, 8:37 AM
melifaro committed rS293628: Convert ipfilter to the new routing KPI..
Convert ipfilter to the new routing KPI.
Jan 10 2016, 7:51 AM
melifaro closed D4764: Convert ipfilter to use new routing API. by committing rS293628: Convert ipfilter to the new routing KPI..
Jan 10 2016, 7:51 AM
melifaro committed rS293626: Make ipfw addr:kfib lookup algo use new routing KPI..
Make ipfw addr:kfib lookup algo use new routing KPI.
Jan 10 2016, 6:44 AM
melifaro committed rS293625: Use already pre-calculated number of entries instead of tc->count..
Use already pre-calculated number of entries instead of tc->count.
Jan 10 2016, 12:29 AM

Jan 9 2016

melifaro committed rS293611: Fix userland build broken by r293470..
Fix userland build broken by r293470.
Jan 9 2016, 6:42 PM
melifaro committed rS293544: Finish r275196: do not dereference rtentry in if_output() routines..
Finish r275196: do not dereference rtentry in if_output() routines.
Jan 9 2016, 4:34 PM
melifaro committed rS293471: Remove prefix check from in6_addroute()..
Remove prefix check from in6_addroute().
Jan 9 2016, 11:41 AM
melifaro committed rS293470: Remove sys/eventhandler.h from net/route.h.
Remove sys/eventhandler.h from net/route.h
Jan 9 2016, 9:35 AM
melifaro committed rS293466: (Temporarily) remove route_redirect_event eventhandler..
(Temporarily) remove route_redirect_event eventhandler.
Jan 9 2016, 6:26 AM
melifaro committed rS293465: Please Coverity by removing unneccessary check (rt_key() is always set)..
Please Coverity by removing unneccessary check (rt_key() is always set).
Jan 9 2016, 5:39 AM

Jan 8 2016

melifaro committed rS293424: Do more fine-grained locking in rtrequest1_fib()..
Do more fine-grained locking in rtrequest1_fib().
Jan 8 2016, 4:25 PM

Jan 7 2016

melifaro committed rS293315: Do not use 'struct route_in6' inside hash6_insert()..
Do not use 'struct route_in6' inside hash6_insert().
Jan 7 2016, 12:22 PM
melifaro committed rS293311: Convert pf(4) to the new routing API..
Convert pf(4) to the new routing API.
Jan 7 2016, 10:20 AM
melifaro closed D4763: Convert pf(4) to use new routing API. by committing rS293311: Convert pf(4) to the new routing API..
Jan 7 2016, 10:20 AM
melifaro updated the diff for D4763: Convert pf(4) to use new routing API..

Do pre-commit sync: fix NOINET case.

Jan 7 2016, 10:09 AM
melifaro added a comment to D4605: Properly stop timer before freeing link level entries for IPv4 and IPv6.

Ping - any reviewers active on this one?

sorry, will take a look today.

Jan 7 2016, 9:29 AM
melifaro committed rS293309: Convert cxgb/cxgbe to the new routing API..
Convert cxgb/cxgbe to the new routing API.
Jan 7 2016, 8:07 AM

Jan 5 2016

melifaro added a comment to D4794: Remove per-ifa outgoing packet accounting from ip[6]_output..
In D4794#101759, @bz wrote:

People had been asking for this for IPv4 and I did the patch but never committed it as the penalty was noticeable. We should not lose these features in favour of simplicity but make them perform well when designing things. Having had per-address counters has been very valuable in the last years for IPv6 to debug and account various things.

I've updated the patch.
IPv6 accounting for most common case (non-fragmented packets) should be slightly better (no ifa ref/unref cost). It is still costy, however, due to IF_ADDR_RLOCK() which is rwlock.
Sending frags is also accounted the same way which may degrade performance for that path.

Jan 5 2016, 1:18 PM
melifaro updated the diff for D4794: Remove per-ifa outgoing packet accounting from ip[6]_output..

Update IPv6 part (add precise accounting using newly-added in6_accountoifa()) per bz@ comments.

Jan 5 2016, 1:10 PM
melifaro added a comment to D4794: Remove per-ifa outgoing packet accounting from ip[6]_output..
In D4794#101759, @bz wrote:

This is a straight reject to the idea from my view. Sorry.
People had been asking for this for IPv4 and I did the patch but never committed it as the penalty was noticeable. We should not lose these features in favour of simplicity but make them perform well when designing things. Having had per-address counters has been very valuable in the last years for IPv6 to debug and account various things. And sorry, using a firewall is not a solution.

I thought it won't be easy but I had to start with something :)
Okay. So for IPv6 situation is not that complicated:
function like inc_ia6_countrers(ifp, addr, opackets, obytes) which internally finds appropriate ifa under ifaddr lock and increments pcpu counters under that lock, w/o the need to do heavy refcounting. It would both improve the performance and increase accuracy.

Jan 5 2016, 10:53 AM
melifaro updated D4794: Remove per-ifa outgoing packet accounting from ip[6]_output..
Jan 5 2016, 6:58 AM
melifaro retitled D4794: Remove per-ifa outgoing packet accounting from ip[6]_output. from to Remove per-ifa outgoing packet accounting from ip[6]_output..
Jan 5 2016, 6:51 AM

Jan 4 2016

melifaro committed rS293169: Finish r293098: make ip6_getpmtu() and ip6_getpmtu_ctl() use new routing API.
Finish r293098: make ip6_getpmtu() and ip6_getpmtu_ctl() use new routing API
Jan 4 2016, 6:32 PM
melifaro committed rS293167: Fix route lookup condition: do IPv6 route lookup for source based on.
Fix route lookup condition: do IPv6 route lookup for source based on
Jan 4 2016, 5:25 PM
melifaro committed rS293166: Maintain consistent behavior: make fib4_lookup_nh_ext() return.
Maintain consistent behavior: make fib4_lookup_nh_ext() return
Jan 4 2016, 5:23 PM
melifaro committed rS293159: Add rib_lookup_info() to provide API for retrieving individual route.
Add rib_lookup_info() to provide API for retrieving individual route
Jan 4 2016, 3:03 PM

Jan 3 2016

melifaro added reviewers for D4764: Convert ipfilter to use new routing API.: cy, network.
Jan 3 2016, 4:32 PM