-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #328 from Jaganathancse/ovn_dpdk_config_changes
NFV OvS DPDK Configuration Changes
- Loading branch information
Showing
13 changed files
with
541 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
======================== | ||
Role - edpm_ovs_dpdk | ||
======================== | ||
|
||
Usage | ||
~~~~~ | ||
|
||
This Ansible role allows to do the following tasks: | ||
|
||
* Configure the required OvS DPDK configuration | ||
based on the OvS DPDK edpm ansible variables. | ||
|
||
* Remove any existing OvS DPDK configuration based | ||
on the OvS DPDK edpm ansible variables. | ||
|
||
Here is an example of a playbook: | ||
|
||
.. code-block:: YAML | ||
- name: "Configure OvS DPDK Configs" | ||
include_role: | ||
name: "osp.edpm.edpm_ovs_dpdk" | ||
vars: | ||
edpm_ovs_dpdk_pmd_core_list: "1,13,3,15" | ||
edpm_ovs_dpdk_lcore_list: "0,12" | ||
edpm_ovs_dpdk_socket_memory: "4096" | ||
edpm_ovs_dpdk_memory_channels: 4 | ||
edpm_ovs_dpdk_vhost_postcopy_support: tru | ||
edpm_nova_libvirt_vhostuser_socket_group: 'hugetlbfs' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
|
||
- name: Configure OvS DPDK | ||
hosts: all | ||
strategy: linear | ||
become: true | ||
tasks: | ||
- name: Configure OvS DPDK configs | ||
ansible.builtin.import_role: | ||
name: osp.edpm.edpm_ovs_dpdk | ||
tags: | ||
- edpm_ovs_dpdk |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
|
||
DOCUMENTATION: | ||
name: cpu_mask | ||
author: "EDPM team" | ||
version_added: 2.9 | ||
short_description: Calculates cpu mask for the list of CPus. | ||
description: | | ||
This filter will take the list of CPUs and will convert | ||
that to a cpu mask value. | ||
EXAMPLES: | | ||
"{{ cpu_list | osp.edpm.cpu_mask }}" | ||
RETURN: | ||
_value: | ||
description: | ||
type: string |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
|
||
# All variables intended for modification should be placed in this file. | ||
|
||
# All variables within this role should have a prefix of "edpm_ovs_dpdk" | ||
edpm_ovs_dpdk_pmd_core_list: "" | ||
edpm_ovs_dpdk_lcore_list: "" | ||
edpm_ovs_dpdk_memory_channels: 4 | ||
edpm_ovs_dpdk_extra: "" | ||
edpm_ovs_dpdk_socket_memory: "" | ||
edpm_ovs_dpdk_revalidator_cores: "" | ||
edpm_ovs_dpdk_handler_cores: "" | ||
edpm_ovs_dpdk_emc_insertion_probablity: "" | ||
edpm_ovs_dpdk_enable_tso: false | ||
edpm_ovs_dpdk_pmd_auto_lb: false | ||
edpm_ovs_dpdk_pmd_load_threshold: "" | ||
edpm_ovs_dpdk_pmd_improvement_threshold: "" | ||
edpm_ovs_dpdk_pmd_rebal_interval: "" | ||
edpm_ovs_dpdk_vhost_postcopy_support: false | ||
edpm_ovs_dpdk_vhost_postcopy_ovs_options: "--mlockall=no" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
argument_specs: | ||
# ./roles/edpm_ovs_dpdk/tasks/main.yml entry point | ||
main: | ||
short_description: The main entry point for the edpm_ovs_dpdk role. | ||
options: | ||
edpm_ovs_dpdk_pmd_core_list: | ||
type: str | ||
default: "" | ||
description: OvS DPDK PMD Core list | ||
edpm_ovs_dpdk_lcore_list: | ||
type: str | ||
default: "" | ||
description: OvS DPDK LCore list | ||
edpm_ovs_dpdk_memory_channels: | ||
type: int | ||
default: 4 | ||
description: OvS DPDK memory channels | ||
edpm_ovs_dpdk_extra: | ||
type: str | ||
default: "" | ||
description: OvS DPDK extra configs | ||
edpm_ovs_dpdk_socket_memory: | ||
type: str | ||
default: "" | ||
description: OvS DPDK Socket Memory | ||
edpm_ovs_dpdk_revalidator_cores: | ||
type: str | ||
default: "" | ||
description: DPDK revalidator core list | ||
edpm_ovs_dpdk_handler_cores: | ||
type: str | ||
default: "" | ||
description: OvS DPDK handler Core list | ||
edpm_ovs_dpdk_emc_insertion_probablity: | ||
type: str | ||
default: "" | ||
description: OvS DPDK EMAC insertion probablity | ||
edpm_ovs_dpdk_enable_tso: | ||
type: bool | ||
default: false | ||
description: OvS DPDK TSO enable or not | ||
edpm_ovs_dpdk_pmd_auto_lb: | ||
type: bool | ||
default: false | ||
description: OvS DPDK PMD auto load balance enable or not | ||
edpm_ovs_dpdk_pmd_load_threshold: | ||
type: str | ||
default: "" | ||
description: OvS DPDK PMD load threshold | ||
edpm_ovs_dpdk_pmd_improvement_threshold: | ||
type: str | ||
default: "" | ||
description: OvS DPDK PMD improvement threshold | ||
edpm_ovs_dpdk_pmd_rebal_interval: | ||
type: str | ||
default: "" | ||
description: OvS DPDK PMD rebalance interval | ||
edpm_ovs_dpdk_vhost_postcopy_support: | ||
type: bool | ||
default: false | ||
description: OvS DPDK vhost postcopy support enable or not | ||
edpm_ovs_dpdk_vhost_postcopy_ovs_options: | ||
type: str | ||
default: "" | ||
description: OvS DPDK vhost postcopy ovs options |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
|
||
galaxy_info: | ||
namespace: openstack | ||
author: OpenStack | ||
description: EDPM OpenStack Role -- edpm_ovs_dpdk | ||
company: Red Hat | ||
license: Apache-2.0 | ||
min_ansible_version: '2.9' | ||
# | ||
# Provide a list of supported platforms, and for each platform a list of versions. | ||
# If you don't wish to enumerate all versions for a particular platform, use 'all'. | ||
# To view available platforms and versions (or releases), visit: | ||
# https://galaxy.ansible.com/api/v1/platforms/ | ||
# | ||
platforms: | ||
- name: 'EL' | ||
versions: | ||
- '8' | ||
- '9' | ||
|
||
galaxy_tags: | ||
- edpm | ||
|
||
|
||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. | ||
dependencies: [] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
collections: | ||
- name: community.general |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
|
||
- name: Converge | ||
become: true | ||
hosts: all | ||
roles: | ||
- role: "osp.edpm.edpm_ovs_dpdk" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
options: | ||
role-file: collections.yml | ||
driver: | ||
name: podman | ||
platforms: | ||
- command: /sbin/init | ||
dockerfile: ../../../../molecule/common/Containerfile.j2 | ||
image: ${EDPM_ANSIBLE_MOLECULE_IMAGE:-"ubi9/ubi-init"} | ||
name: instance | ||
privileged: true | ||
registry: | ||
url: ${EDPM_ANSIBLE_MOLECULE_REGISTRY:-"registry.access.redhat.com"} | ||
ulimits: | ||
- host | ||
provisioner: | ||
log: true | ||
name: ansible | ||
scenario: | ||
test_sequence: | ||
- dependency | ||
- destroy | ||
- create | ||
- prepare | ||
- converge | ||
- destroy | ||
verifier: | ||
name: ansible |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 Red Hat, Inc. | ||
# All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
|
||
- name: Prepare test_deps | ||
hosts: all | ||
roles: | ||
- role: ../../../../molecule/common/test_deps | ||
test_deps_setup_edpm: true | ||
test_deps_setup_stream: true | ||
- role: env_data |
Oops, something went wrong.