Page MenuHomeFreeBSD

dave_freedave.net (David Marker)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 3 2021, 2:16 PM (132 w, 5 d)

Recent Activity

Thu, Apr 4

dave_freedave.net updated the diff for D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

add asserts as suggested.

Thu, Apr 4, 4:58 PM
dave_freedave.net added inline comments to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..
Thu, Apr 4, 1:59 PM
dave_freedave.net updated the diff for D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

I removed the "black magic" I added of relying upon alloc_unr_specific to return -1 when a user requested uplink0.
What was there before is more obvious and reads almost like english:

if (linkNum == 0 && isUplink)
        return (EINVAL);

That says exactly why we return EINVAL. Also I still get benefit of initializing unr(9) to start at 1 in the code. No longer have to grab a number and make sure its at least 1 for uplink.

Thu, Apr 4, 1:55 PM
dave_freedave.net added inline comments to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..
Thu, Apr 4, 6:01 AM

Wed, Apr 3

dave_freedave.net added a comment to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

I'm not sure how to clear the comments as they are often on wrong line numbers now. Sorry about that.

Wed, Apr 3, 9:48 PM
dave_freedave.net updated the diff for D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

I have incorporated all the suggestions and uplink has a separate unr(9) now. Note the bhyve change is removed entirely as it is not necessary, you can still use peerhook=link with bhyve though for it to auto assign.

Wed, Apr 3, 9:46 PM
dave_freedave.net added a comment to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

I have to clean up my patch and figure out how to update (I'm new to this). I will be removing bhyve from this so apologies to all the bhyve folks that got tagged on this.

Wed, Apr 3, 9:16 PM
dave_freedave.net added a comment to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

Actually before I go move things to newhook can I ask do we have consensus that I should just have a separate unr(9) for uplink?
Also, the bhyve works without having it "figure out" it has an ng_bridge(4). You can pass "link" to it and it does the right thing. Given that should I pull bhyve change out so the patch is more focused on ng_bridge(4) which is my main concern?

Wed, Apr 3, 6:06 PM
dave_freedave.net added a comment to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

Now more fundamental question, that you probably have answer for, cause you did it the way you did: why can't we alloc_unr() and possible return EEXIST in the (almost) synchronous newhook method? Why do we postpone that to later connect method?

Wed, Apr 3, 5:58 PM
dave_freedave.net added a comment to D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..

My main objection is that backward compatibility is broken. We can no longer have uplink[N] and link[N] at the same time. This may break existing software.

I had the same concern and point this out in the bug report. I am still not sure why uplink0 was never allowed, but kept that restriction. uplink is for when you attach a real network interface, an ng_ether(4) and although netgraph makes just about anything possible, I wonder if anybody does have more than one uplink on an ng_bridge(4)?

Wed, Apr 3, 5:53 PM
dave_freedave.net updated the test plan for D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..
Wed, Apr 3, 2:29 PM
dave_freedave.net requested review of D44615: Allow ng_bridge to automatically assign [up]link numbers for connect messages..
Wed, Apr 3, 2:25 PM