gatekeeper: rewrite initialization of network interfaces#688
Merged
AltraMayor merged 9 commits intov1.2.0-devfrom May 24, 2024
Merged
gatekeeper: rewrite initialization of network interfaces#688AltraMayor merged 9 commits intov1.2.0-devfrom
AltraMayor merged 9 commits intov1.2.0-devfrom
Conversation
4cf4833 to
53fabfb
Compare
AltraMayor
commented
May 15, 2024
Owner
Author
AltraMayor
left a comment
There was a problem hiding this comment.
lib/net: handle bonded interfaces as any other
AltraMayor
commented
May 15, 2024
Owner
Author
AltraMayor
left a comment
There was a problem hiding this comment.
lib/net: report the MAC addresses of all interfaces
AltraMayor
commented
May 15, 2024
Owner
Author
AltraMayor
left a comment
There was a problem hiding this comment.
lib/net: monitor state of the links
AltraMayor
commented
May 15, 2024
Owner
Author
AltraMayor
left a comment
There was a problem hiding this comment.
sol: require parameter req_channel_bw_mbps
AltraMayor
commented
May 16, 2024
Owner
Author
AltraMayor
left a comment
There was a problem hiding this comment.
sol: require parameter req_channel_bw_mbps
Replace the example in the description of the patch with the following because it better represents the problem:
For example, Gatekeeper servers typically operate in networks with higher speeds (e.g., 40Gbps) than the protected destination (e.g., 10Gbps).
The original version of the bonding driver required applications to directly set many parameters of the members of a bonded interface. Since this is no longer the case, this commit simplifies the initialization code by leveraging the new interface.
This commit implements the workaround discussed in issue #686.
By default, bonded interfaces load balance the outgoing packets by hashing only the MAC addresses. This commit changes this hash to include the source and destination addresses of IPv4 and IPv6 headers as well.
Knowing the MAC addresses of all interfaces is useful to diagnose issues in production; especially issues related to bonded interfaces. Not only are the primary MAC addresses of the interfaces reported, but also the secondary MAC addresses of the interfaces.
Waiting for links to come up is no longer helpful in the current version of DPDK.
Having log entries reporting changes in the state of the links eases diagnoses in production. This commit adds these log entries through the Link State Change (LSC) interuption that most NICs support. The information that a given NIC does not support the LSC interuption is logged, but its link state is not monitored. Since the callbacks of interuptions run in threads that are not logical cores, this commit introduces the macro MAIN_LOG() to Gatekeeper's log library to be used in these contexts.
If req_queue_init() fails before _all_ request queues are initiated, sol_stage2() calls cleanup_sol(), which, in turn, triggers a segmentation fault. This commit solves this problem by adding list_initiated() to include/list.h, and using it to test if the request queues are initiated in cleanup_sol() before freeing the associated resources.
The original configuration of SOL blocks assumes that the bandwidth of the back interface of a Gatekeeper server is representative of the bandwidth of the destination network. This assumption does not hold in production deployments of Gatekeeper. For example, Gatekeeper servers typically operate in networks with higher speeds (e.g., 40Gbps) than the protected destination (e.g., 10Gbps). This commit introduces the parameter destination_bw_gbps to address this reality.
This commit fixes two miscalculations in the size of mbuf pools: 1. calculate_mempool_config_para() was not accounting for multiple members in bonded interfaces; and 2. Although unlikely, a GK or GT instance might receive all the packets, so the instances must account for this worst case.
Owner
Author
|
This pull request was successfully tested in production. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original version of the bonding driver required applications to set many parameters of the members of a bonded interface directly. This is no longer the case, and this pull request reviews the initialization code of network interfaces to accomplish the following: