-
Notifications
You must be signed in to change notification settings - Fork 21
Add negative_packet_loss_mode pass option for Mellanox nic as traffic… #172
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,8 +230,8 @@ def process_options (): | |
| parser.add_argument('--negative-packet-loss', | ||
| dest='negative_packet_loss_mode', | ||
| help='What to do when negative packet loss is encountered', | ||
| default = 'quit', | ||
| choices = [ 'fail', 'quit', 'retry-to-fail', 'retry-to-quit' ] | ||
| default = 'pass', | ||
| choices = [ 'pass', 'fail', 'quit', 'retry-to-fail', 'retry-to-quit' ] | ||
| ) | ||
| parser.add_argument('--search-granularity', | ||
| dest='search_granularity', | ||
|
|
@@ -1887,9 +1887,10 @@ def evaluate_trial(trial_params, trial_stats): | |
| if trial_stats['directional'][direction]['active']: | ||
| if trial_stats['directional'][direction]['rx_lost_packets_pct'] < 0: | ||
| trial_result = trial_params['negative_packet_loss_mode'] | ||
| bs_logger("\t(trial failed requirement, negative direction packet loss, direction: %s, trial result status: modified, trial result: %s)" % | ||
| (direction, | ||
| trial_result)) | ||
| if trial_result != 'pass': | ||
| bs_logger("\t(trial failed requirement, negative direction packet loss, direction: %s, trial result status: modified, trial result: %s)" % | ||
| (direction, | ||
| trial_result)) | ||
|
Comment on lines
1889
to
+1893
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The way this is written it is possible that if other trial criteria would have already resulted in a failing trial result that encountering a negative packet loss "error" would negate that existing failure when |
||
|
|
||
| requirement_msg = "passed" | ||
| result_msg = "unmodified" | ||
|
|
@@ -1905,6 +1906,8 @@ def evaluate_trial(trial_params, trial_stats): | |
| commify(trial_stats['directional'][direction]['rx_lost_packets']), | ||
| result_msg, | ||
| trial_result)) | ||
| if trial_result == 'fail': | ||
| return trial_result | ||
|
Comment on lines
+1909
to
+1910
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this prevents other code in the |
||
| else: | ||
| if 'latency_device_pair' in trial_params and trial_params['latency_device_pair'] != '--': | ||
| # for the latency device pair, trial_params['loss_granularity'] == 'segment' == 'device' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot change the default behavior for this result.