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
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
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
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
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
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
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
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
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
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
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
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
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
The reconfiguration of an already configured SR-IOV device
in HW Offload mode trigger an unbind/bind operation leading to failures
Change-Id: I004ef317133e77bdfd971f1ac66e15d4e695cea7
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
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>
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
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
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
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
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
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
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
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
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
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
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