Page MenuHomeFreeBSD

netgraph/ng_bridge: Merge internal host entry structures.
ClosedPublic

Authored by donner on Feb 8 2021, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 3 2024, 4:15 AM
Unknown Object (File)
Jan 29 2024, 3:17 PM
Unknown Object (File)
Jan 21 2024, 3:55 AM
Unknown Object (File)
Dec 23 2023, 3:07 AM
Unknown Object (File)
Dec 17 2023, 4:44 AM
Unknown Object (File)
Dec 10 2023, 9:50 PM
Unknown Object (File)
Dec 7 2023, 9:46 AM
Unknown Object (File)
Nov 30 2023, 11:29 AM

Details

Summary

In a former version of ng_bridge(4) the exernal visible host entry
structure was a strict subset of the internal one. So internal view
was direct annotation of the external structure. This strict
inheritance was gone many versions ago. There is no need to
encapsulate a part of the internal represntation as a separate
structure.

This patch is a preparation to make the internal structure read only
in the data path in order to make ng_bridge(4) multithreaded.

Test Plan

No functional change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

donner requested review of this revision.Feb 8 2021, 9:17 PM
  • Get rid of "hent" instead of "host".
kp added inline comments.
sys/netgraph/ng_bridge.c
138

ETHER_ADDR_LEN

140

That tops out at 18 hours or so. Is that enough?
It may be better to use u_int32_t here.

  • Get rid of "hent" instead of "host".

This types of change just cause lots of noise in this review that makes it harder to see the real change.

  • Get rid of "hent" instead of "host".

This types of change just cause lots of noise in this review that makes it harder to see the real change.

That's why this change is a secondary modification.
Please choose the relevant part in the revision tab "History"

donner added inline comments.
sys/netgraph/ng_bridge.c
138

Yes, you are right. But not as as part of this change, please.
Fixing this old code is a long term project.

140

This is existing code and there is a code path to prevent an overflow of this value. There is no benefit in any longer time frame. The interesting interval is about 10 to 300 seconds. Anything longer is only for eye candy.

This revision is now accepted and ready to land.Feb 9 2021, 3:40 PM
This revision was automatically updated to reflect the committed changes.
donner marked 2 inline comments as done.
  • Get rid of "hent" instead of "host".

This types of change just cause lots of noise in this review that makes it harder to see the real change.

That's why this change is a secondary modification.
Please choose the relevant part in the revision tab "History"

I do not see what your saying, and what is committed is all of what appears here as a single commit, no seperation, and for that mater, not even a mention that you renamed hent -> host in the commit.

  • Get rid of "hent" instead of "host".

This types of change just cause lots of noise in this review that makes it harder to see the real change.

That's why this change is a secondary modification.
Please choose the relevant part in the revision tab "History"

I do not see what your saying, and what is committed is all of what appears here as a single commit, no seperation, and for that mater, not even a mention that you renamed hent -> host in the commit.

"hent" was the wrapper around "host". The natural name is "host", so I chosed this one as the survivor of the merge without additional mention.
The merge was done in two steps: 1) remove the inner (external visible) stucture "host", and then 2) rename the wrapper back to the common name.
For the purpose of review, I updated the review in two steps, do ease the job for the volunteer reviewers.

I'm sorry if this caused more trouble.

For the final commit, the steps are squashed and amended with the general reasoning of the change, without going to much into the details.