Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Devlink functional tests #110

Closed
wants to merge 1 commit into from
Closed

Conversation

AndriyLozovyyPLV
Copy link
Collaborator

Add Devlink functional test cases:

  • test_devlink_basic[l2]
  • test_devlink_basic[l3]
  • test_devlink_basic[l4]
  • test_devlink_random
  • test_devlink_policer_log

Depends on: #109

@@ -116,5 +117,6 @@
'suite_functional_qos',
'suite_functional_ipv4',
'suite_functional_ipv6',
'suite_functional_l1']
'suite_functional_l1',
'suite_functional_devlink']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comma at the end of line and move ] to next line. It will be easier to merge conflicts in future

Randomize applying rule by choosing src/dst field
Args:
tc_rule (dict): Dict with tc_rule
rule_selectors (dict): Dict with rule selectros
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectors*

rule = {'action': {'trap': '',
'police': {'rate': f'{policer_rate}bps', 'burst': policer_rate + 1000,
'conform-exceed': '', 'drop': ''}},
'want_ip': True if traffic in ['l3', 'l4'] else False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'want_ip': True if traffic in ['l3', 'l4'] else False,
'want_ip': traffic in ['l3', 'l4'],

'want_ip': want_ip,
'want_port': want_port,
'want_tcp': choice([True, False]) if want_port else False,
'want_vlan_ethtype': True if want_ip and want_vlan else False}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'want_vlan_ethtype': True if want_ip and want_vlan else False}
'want_vlan_ethtype': want_ip and want_vlan}

@@ -126,14 +126,15 @@ async def tcutil_cleanup_tc_rules(dent_dev, swp_tgen_ports, swp_tc_rules):


def tcutil_tc_rules_to_tgen_streams(swp_tc_rules, streams=None, start=0, cnt=None,
frame_rate_pps=10, frame_size=256):
frame_rate_pps=10, frame_size=256, frame_rate_type=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
frame_rate_pps=10, frame_size=256, frame_rate_type=None):
frame_rate_pps=10, frame_size=256, frame_rate_type='pps_rate'):

Signed-off-by: Andriy Lozovyy <andriy.lozovyy@plvision.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR Created public PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants