Commit Graph

360 Commits

Author SHA1 Message Date
Ghanshyam Mann 6ed93f8448 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: I9da248ee774c038c99bf452898ac8658aa337aad
2024-02-24 11:41:53 -08:00
Zuul 27915c67c8 Merge "Skip failure on setting inactive interface as bond's primary" 2023-09-29 14:17:13 +00:00
karthiksundaravel b4779a6b28 Skip failure on setting inactive interface as bond's primary
The ovs command to set the primary interface of the bond fails
when the interface is not active. This patch ignores the error
and proceeds with the remaining configuration.

Change-Id: I3592af4f357dca483fc7914133e1fc248d12f11a
2023-09-22 20:39:49 +05:30
Jaganathan Palanisamy 3d4faddb5b SR-IOV is not configured when the provider is not set
The default provider still remains as 'ifcfg' and when
its not specified, the SR-IOV PF configuration is skipped.
Adding the changes to support the same.

Change-Id: I17a5e68c6876db720d4b1096d75920aceb749750
2023-09-22 11:01:32 +05:30
Zuul fb4138fcae Merge "Apply the nmstate config all at once" 2023-09-14 07:02:18 +00:00
karthiksundaravel fd91e41154 Add infiniband support with nmstate provider
Adding support for infiniband using nmstate provider.
It also includes the unit testing for the same. However
its not tested end to end due to the non availability of hardware.

Change-Id: Ia597bc8d4c7c5766be86b39242216d709fd581fe
2023-09-05 13:48:48 +05:30
karthiksundaravel fc3e98bc2f Apply the nmstate config all at once
Group the configuration yamls of all the interfaces and apply
it once, so that any failures will automatically revert all the
configuration applied.

Change-Id: Ibbb8ba4b6ab0e4736b434f161f183ed6a101ed13
2023-09-05 12:47:25 +05:30
karthiksundaravel d2f1423008 set the primary interface for ovs bond (nmstate provider)
Set the OvsDB entry "other_config:bond-primary=<iface>"
for the bond. The patch also addresses the incorrect
hierarchy for OvsDB used while parsing the ovs_options.
It also includes an option to support ovs_options having
other-config as well as other_config.

Change-Id: I5f7feb9d41d877c965f31b8d9023b196fe5a3635
2023-09-05 05:27:35 +00:00
Karthik S 803840f65f Add SR-IOV, NIC Part support using nmstate provider
Added support for SR-IOV and NIC Partitioning use cases
using nmstate provider. The implementation still uses the
dual parse of templates similar to the one in ifcfg provider.
Now the udev rules, sriov_config and sriov_config service will
not be used.

Change-Id: Iec98f3cacc061b37c6ecf6d53f453fd078791b16
2023-08-31 12:29:05 +05:30
Zuul 16e0dc74a4 Merge "Renamed variable/method names to suit the usages." 2023-08-31 06:00:20 +00:00
Karthik S 8134e6ce5f Renamed variable/method names to suit the usages.
Change-Id: I435d0e0ac93943bd57621d993f85a31536a3dbdc
2023-07-17 13:38:17 +05:30
Karthik S c70bb48e57 Add VLAN support for nmstate provider
It includes support for VLANs over type interface, ovs bridge,
linux bonds

Change-Id: I2c0cec5918f680a3fff7e22126b06441185f7975
2023-07-13 14:39:41 +05:30
Karthik S 24c8cd3266 Add ovs bridge/bond support with nmstate
Added support for ovs-bridge with nmstate. Nmstate requires an
OvS interafce to be attached to the bridge where the settings like
MTU, IP address could be applied. This interface is created internaly
to accomodate the same. Also ovs_extra / ovs_options support is also
added along with.

Change-Id: Ibe54b25486b1e68c56da03a5356c758b1ccf74b3
2023-06-22 10:16:51 +05:30
Zuul 9dfc7df316 Merge "Add linux bond support for nmstate provider" 2023-06-09 05:33:13 +00:00
Zuul 7cca2b6df2 Merge "Allow configuration of inactive DPDK devices as well" 2023-06-09 04:48:00 +00:00
Karthik S 447d07550d Add linux bond support for nmstate provider
Extend the support for linux bonds in nmstate provider.

Change-Id: I7602b121f3ad0f86e6925208d7691b4faff24686
2023-06-06 13:13:57 +05:30
waleedm 7996a2e79e Refactor check_configure_sriov to prevent dublicate adding sriov_pfs
Cuurent implementation of adding objects is dublicating adding
objects that have sriov_pf members.
The patch refactors check_configure_sriov to check if the object
itself or any of its tree members are sriov_pf so adding that object
will happen once

Closes-Bug: #2020100
Change-Id: I3895a5200bc97a294a8b5774c24972f1f58b40bf
2023-05-31 06:09:28 +00:00
waleedm b1a7c9c5f0 Fix breaking vf-lag functionality in os-net-config
Because of racing issue to activate vf-lag after moving the second
sriov_pf interface to switchdev mode in Nvidia\Mellanox nics, we may
bind sriov_vfs while the LAG is not active yet.
Another reason for breaking vf-lag functionality is that we are doing
ifdown/ifup for sriov_pfs after binding the vfs(in case of linux_bond
is member of ovs_bridge).

As a solution for this issue, we are doing the binding after assuring
the LAG is active, and also moving the ifdown/ifup before start binding

Closes-Bug: #2020085
Change-Id: If0cad8c856ee62064205b9a88f0148980653fcb2
2023-05-29 11:06:18 +00:00
Karthik S cb52368986 Allow configuration of inactive DPDK devices as well
When DPDK ports (Mellanox)  from a bond, are setup the link state
is expected to be active. The patch allows the configuration of
such ports even when the link state is inactive.

Change-Id: I516daad62989a9edb0db2a0255b94f04fddf12d2
2023-05-29 13:38:23 +05:30
Karthik S 0350a82f19 Add route table, routes, ip rules support for nmstate provider
Adding route table, routes, route rules for nmstate provider.
The supported ip rules options are from, to, iif, fwmark/mask
priority.
Supported RPDB rules type: blackhole, unreachable, prohibit

Change-Id: I12a705b132e54a15d0184cbe683d10419dbac8f6
2023-05-04 10:02:06 +05:30
Karthik S 29028c14d7 Add ethtool_opts support for nmstate provider
Handle the ethtool_opts for nmstate provider.
The supported options are -G, -C, -K, -A, -s, --set-ring,
--coalesce, --features, --offload, --change.

Change-Id: Iddc336507dfcb03b4228fc36bf9eca6c4a6cf7de
2023-04-20 22:18:10 +05:30
Zuul 28bbc60d47 Merge "Adding Ethernet interface for nmstate provider" 2023-03-20 10:23:53 +00:00
Karthik S 638c9cefd9 Adding Ethernet interface for nmstate provider
Adding support for Ethernet interface with nmstate provider

Co-authored-by: Dan Sneddon <dsneddon@redhat.com>
Co-authored-by: Viji Candappa <vcandapp@redhat.com>

Change-Id: Ia6f6c6e73bf52a741ccf8b354a203a2befb7cf3e
2023-03-17 11:08:43 +05:30
waleedm 3e73bd8c83 Fix PKEY_ID value in ifcfg file of infiniband child interface
In the current implementation of ifcfg file in os-net-config,
the high bit of the PKEY_ID setting is not being set, while
the high bit of the pkey in the DEVICE setting is being set.

However, due to a change in NetworkManager [1],
it is no longer necessary to set the high bit of the pkey in
the DEVICE setting, but applying this change in os-net-config
is causing compatibility issues with older versions of NetworkManager.

To address this issue, this patch proposes setting the high bit
for both the PKEY_ID and pkey in DEVICE settings in the ifcfg file.
This approach would work for all versions of NetworkManager
and maintain compatibility with older versions.

[1] 33f2f82a09

Closes-Bug: #2007372
Change-Id: I7b4f063508c4d9518ca706e62cf1368fba2d069e
2023-02-15 09:47:41 +00:00
Zuul 9f92b485e0 Merge "os-net-config runs ethtool command without restarting interfaces" 2023-01-18 08:04:32 +00:00
Karthik S c99f19ce78 Add ethtool_opts config for sriov VF
SR-IOV VFs used for NIC partitioning shall include ethtool_opts
configuration as well.

Change-Id: Ia5e95daac6d8766a222d8bdde3e233475e203fa9
2022-12-13 12:58:02 +00:00
Keigo Noha 1b2987ca3f os-net-config runs ethtool command without restarting interfaces
Previously, adding or modifying ETHTOOL_OPTS causes restarting
interfaces. It causes a downtime though ETHTOOL_OPTS can be applied
without restarting interfaces.
This change will apply ETHTOOL_OPTS via ethtool command when the option
is added or modified without restarting interfaces.

Closes-Bug: #1800237
Change-Id: I6445685b00ec98788426d0786e78c6d3750c9910
2022-12-09 15:18:52 +09:00
Karthik S 23d97d35af Avoid reconfiguring SR-IOV devices during stack update
The reconfiguration of an already configured SR-IOV device
in HW Offload mode trigger an unbind/bind operation leading to failures

Change-Id: I004ef317133e77bdfd971f1ac66e15d4e695cea7
2022-12-04 21:52:37 +05:30
vcandappa e752fbac78 Mellanox NICs' ifcfg-scripts should not be removed when no CONFIG change exists
os-net-config is triggering reconfiguration/flapping of
mellanox nics even when there are no changes in the NIC configs.
Added check to NOT remove ifcfg-* scripts for Mellonox NICs when
DPDK/Bond is enabled

Resolves: rhbz#2131248
Change-Id: Ida0c78ba7784d452165999af4dd955b0129cfdaf
2022-11-03 11:59:14 +05:30
Zuul 12a27f35c7 Merge "Add mac-size-table to all OVS bridges" 2022-05-31 21:26:25 +00:00
Jakub Libosvar d8c7e7ed83 Add mac-size-table to all OVS bridges
The default mac table size may not be sufficient for the
provider bridges. If the mac table overflows, it has been
observed that ovs-vswitchd clocks 100% CPU. So this patch
configures the mac table size of the provider bridges.

The patch does similar to what
88aa5c9184
implements in puppet. However, the puppet changes are not
persistent across reboots, therefore it's better to save it
in the OVS database.

Change-Id: Ic0334aaad83bd94b604fbd84fcc21d3520e9d400
Related-bug: #1779706
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2022-05-16 15:11:05 -04:00
Takashi Kajinami 88a4c885f6 Format json output properly
str(dict) or print(dict) format a dict value into an invalid json
string because it uses single quotes(') instead of double quotes(").

This also fixes the log messages which mentions 'JSON' but doesn't
convert a dict value to a valid json string.

Closes-Bug: #1973566
Change-Id: I2398e3881310746f349e2c9a89c64956efbc13b2
2022-05-16 14:28:05 +09:00
Karthik S 9ef27075eb Fix failure in dpdk driver binding with VF during reboot
On a start/reboot, os-net sriov_config.service is run to
create VFs for nic-partitioned devices. If vfio-pci driver
is bound to any of the VFs, the VF initialisation doesn't occur properly.
The VF creation has to be completed before driverctl vfio-pci
binding AND all network interface configs. Since the order of
sriov_config service or driverctl could not be set due to cyclic
dependencies, the driverctl --nosave is used for every reboots
for VFs that needs driver override. This is required in case of
DPDK - NIC Partitioning.

Change-Id: I3b3712eedf6d909f5d65ecbb1763f9dc11b04c31
2022-03-15 05:42:54 +00:00
Zuul 9c3f1f5804 Merge "Revert "Updating sriov_config.service to run before driverctl.slice and network-pre"" 2022-03-07 20:39:37 +00:00
Karthik S 8fae2de810 Revert "Updating sriov_config.service to run before driverctl.slice and network-pre"
This reverts commit 70ed00293b.

Reason for revert: The change in dependencies is creating a regression for regular DPDK (non nic partitioning) + SR-IOV use cases.
The DPDK interfaces are not bound with vfio-pci driver during  reboots, resulting in complete disruption in networks attached to the port.

Change-Id: If501de94d88d8536d8532f2b5ffbad59f4780c57
2022-03-01 09:52:26 +00:00
Zuul f97f3f1102 Merge "For linux bond over VFs, disable spoofcheck by default" 2022-01-31 11:08:14 +00:00
Zuul 617d954eea Merge "ovs-dpdk: Add support for n_rxq_desc and n_txq_desc" 2022-01-29 04:52:07 +00:00
Karthik S 404bafa095 For linux bond over VFs, disable spoofcheck by default
In case of linux bonds using NIC Partitioning, the spoofcheck shall
be disabled for it to work well with mellanox cards as well as
intel cards.

Change-Id: Ib3cc7e3287e6332b0ab11e3a227396f9dd62ee51
2022-01-28 06:26:29 +00:00
waleedm 7c7b3267a8 Adding steering_mode config to sriov_pf object
The Current behavioure is to enable smfs software steering
by default when moving to switchdev, in some cases we need
it to be in dmfs mode (FW steering), so adding steering_mode
config to sriov_pf object to make it configrable

Change-Id: If607c83c4309c636ccbe03789410f2a2301258d2
2022-01-19 08:37:46 +00:00
Zuul 2eaf566867 Merge "vDPA support for CentOS9" 2022-01-06 07:08:48 +00:00
Takashi Kajinami 5945c73882 ovs-dpdk: Add support for n_rxq_desc and n_txq_desc
This change introduces support for n_rxq_desc and n_txq_desc for
ovs dpdk interface and ovs dpdk bond, so that users can customize
these queue size parameters.

Change-Id: I35ae1aa25566f7820e30d3d527affcd80c052aa9
2021-12-14 18:38:57 +09:00
waleedm 99a9aa0da8 Fix log message related to pkey_id
pkey only supports base 10 or base 16 int numbers

Change-Id: Ia2214f24e20eaba3a24da1d13b88113512f009d9
2021-12-14 08:14:29 +00:00
Zuul d0c65d0e2f Merge "The default max/min tx rates shall not halt deployment" 2021-12-03 09:00:34 +00:00
Karthik S 44eab2297f The default max/min tx rates shall not halt deployment
The default configuration of max_tx_rate and min_tx_rate is 0.
Some of the SR-IOV driver implementation throws up the error for
the default values and the errors shall be safely handled instead
of raising an exception.

Change-Id: I0e6ee35e327d36ddc1b792de1ee48bad609bc3ad
2021-12-02 03:48:42 +00:00
Karthik S 3ee0c463ca Notify the need for overriding the default driver for Mellanox NIC
In case of mellanox cards, the interfaces used for DPDK ports
shall not be bound with vfio-pci (default) driver. An explicit error
message shall be thrown when the required drivers are not specified
in the user templates.

Change-Id: I69b362079905c3957504e4958abfeeb9923cf07f
2021-12-02 03:38:22 +00:00
David Vallee Delisle b30304d706 vDPA support for CentOS9
Multiple things changed between latest release of CentOS8 and CentOS9
that affects the vDPA stack:
- The vhost devices are no longer created automatically by the kernel
  module, we need to use the newly introduced vdpa command.
- The naming of the interfaces has changed drastically and they are no
  more triggering the udev rules.
- The udev devices are lacking some easily matchable attributes so we
  need to match by MAC address.

We're also moving a few functions from utils/sriov_config to the new
common library for easier maintenance.

Change-Id: I1d718c8d949ac04c560a726f54b64aea0b162081
2021-11-30 07:35:11 -05:00
David Vallee Delisle ca522c25ed Moving is_mellanox_interface to common
This will allow us to use it inside sriov_config as well.

Change-Id: I910eac9b0c5d20a5875b7e6c3469a6feeb1d62fd
2021-11-16 12:13:29 -05:00
David Vallee Delisle aa4ba26cf1 Adding logging to file
It's important to support logging to a file for troubleshooting purpose.
It's also important to rotate this file as it might grow quite large
over time.

Also, creating a common module where we can move gradually functions
that are common to any other modules. We currently can't import utils
from sriov_config for example because utils is already importing
sriov_config. This leads to duplicate code which is harder to maintain.

Change-Id: Ieafc2adc0247efc47130cd5ea29c59a140feaf0c
2021-11-16 12:05:54 -05:00
Zuul 5ed22d9da4 Merge "Add ifcfg-* scripts on boot for Mellanox NIC interface" 2021-11-11 05:31:28 +00:00
vcandappa e5c50e8cf3 Add ifcfg-* scripts on boot for Mellanox NIC interface
When OvsDpdkPort is configured on compute node using Mellanox NIC interface,
the NetworkManager-wait-online service fails after compute boot.
This fix creates a seperate ifcfg-* interface with nm_controll and dhcp
disabled for these Mellanox ports (used as OvsDpdkPort/DpdkBond)

Change-Id: I03d709f59e9550409f42747c4593cd85dd1380c9
2021-11-10 09:48:44 +05:30